def add_certificate(certfile, attributes, viewable: false, editable: false)
            if certfile.is_a?(OpenSSL::X509::Certificate)
                x509 = certfile
            else
                x509 = OpenSSL::X509::Certificate.new(certfile)
            end

            address_book = get_address_book

            cert = Certificate.new
            cert.Cert = x509.to_der
            cert.ID = address_book.NextID
            address_book.NextID += 1

            cert.Trust = attributes
            cert.Viewable = viewable
            cert.Editable = editable

            address_book.Entries.push(self << cert)
        end
def add_certificate(certfile, attributes, viewable: false, editable: false)
            if certfile.is_a?(OpenSSL::X509::Certificate)
                x509 = certfile
            else
                x509 = OpenSSL::X509::Certificate.new(certfile)
            end

            address_book = get_address_book

            cert = Certificate.new
            cert.Cert = x509.to_der
            cert.ID = address_book.NextID
            address_book.NextID += 1

            cert.Trust = attributes
            cert.Viewable = viewable
            cert.Editable = editable

            address_book.Entries.push(self << cert)
        end
Add a certificate into the address book