Hi! I'm using OpenSSL to generate an x.509 certificate used for document signing using pretty much the following:
require 'openssl' key = OpenSSL::PKey::RSA.generate(1024) pub = key.public_key ca = OpenSSL::X509::Name.parse("/C=US/ST=Here/L=There/O=Where/CN=mycompany.com") cert = OpenSSL::X509::Certificate.new cert.version = 2 cert.serial = 1 cert.subject = ca cert.issuer = ca cert.public_key = pub cert.not_before = Time.now - 24*60*60 cert.not_after = Time.now + 5*24*60*60*365 puts cert.to_pem My problem is that the certificate doesn't contain a signature algorithm. If I decode the certificate using http://certlogik.com/decoder I see that the certificate has signature algorith = NULL. I would expect it to be something like 'md5WithRSAEncryption'. Is there anyway to get the ruby OpenSSL library to add this piece of information? Thanks in advance. - Christian