Skip to content
  • Kazuki Yamaguchi's avatar
    e2bf3659
    [ruby/openssl] pkcs7: keep private key when duplicating PKCS7_SIGNER_INFO · e2bf3659
    Kazuki Yamaguchi authored
    ASN1_dup() will not copy the 'pkey' field of a PKCS7_SIGNER_INFO object
    by design; it is a temporary field kept until the PKCS7 structure is
    finalized. Let's bump reference counter of the pkey in the original
    object and use it in the new object, too.
    
    This commit also removes PKCS7#add_signer's routine to add the
    content-type attribute as a signed attribute automatically. This
    behavior was not documented or tested. This change should not break any
    working user code since the method was completely useless without the
    change above.
    
    https://github.com/ruby/openssl/commit/20ca7a27a8
    e2bf3659
    [ruby/openssl] pkcs7: keep private key when duplicating PKCS7_SIGNER_INFO
    Kazuki Yamaguchi authored
    ASN1_dup() will not copy the 'pkey' field of a PKCS7_SIGNER_INFO object
    by design; it is a temporary field kept until the PKCS7 structure is
    finalized. Let's bump reference counter of the pkey in the original
    object and use it in the new object, too.
    
    This commit also removes PKCS7#add_signer's routine to add the
    content-type attribute as a signed attribute automatically. This
    behavior was not documented or tested. This change should not break any
    working user code since the method was completely useless without the
    change above.
    
    https://github.com/ruby/openssl/commit/20ca7a27a8
Loading