Skip to content

Signing certs with loaded pem files #46

Description

@timgurney-msm

I am doing something like this:
signing_key = OpenSSL::X509::Certificate.new File.read "intermediate.pem"
plain_cert = CertificateAuthority::Certificate.new
plain_cert.subject.common_name = "mydomain.com"
plain_cert.serial_number.number = 4
plain_cert.key_material.generate_key
plain_cert.parent = signing_key
plain_cert.sign!

just to test the loading and pems to sign client certs. and i get the following error:

gems/certificate_authority-0.1.6/lib/certificate_authority/certificate.rb:58:in sign!': undefined methoddistinguished_name' for #OpenSSL::X509::Certificate:0x00000001801438 (NoMethodError)

Am I missing something?

The root and intermediate were built using the example code and saved to disk using to_pem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions