Method: Passifier::Signing#sign
- Defined in:
- lib/passifier/signing.rb
#sign(content) ⇒ String
Sign the given content
28 29 30 31 32 |
# File 'lib/passifier/signing.rb', line 28 def sign(content) key = OpenSSL::PKey::RSA.new(@key, @pass_phrase) certificate = OpenSSL::X509::Certificate.new(@certificate) OpenSSL::PKCS7.sign(certificate, key, content, nil, OpenSSL::PKCS7::BINARY | OpenSSL::PKCS7::NOATTR | OpenSSL::PKCS7::DETACHED).to_der end |