This patch adds 3 new methods to OpenSSL::OCSP::CertificateId. These methods are useful when building an OCSP responder or doing comparison without repeatedly calling OpenSSL::OCSP::CertificateId#cmp_issuer
#issuer_name_hash
#issuer_key_hash
#signature_algorithm (returns string representation of alg used just like OpenSSL::X509::Certificate#signature_algorithm or OpenSSL::X509::Request#signature_algorithm)
Martin, I assigned this one to you since you helped me with the last OpenSSL patch I submitted, but let me know if it needs to be pointed another direction or what else I might need to do!
openssl: add some accessor methods for OCSP::CertificateId
ext/openssl/ossl_ocsp.c (ossl_ocspcid_get_issuer_name_hash,
ossl_ocspcid_get_issuer_key_hash, ossl_ocspcid_get_hash_algorithm):
Add accessor methods OCSP::CertificateId#issuer_name_hash,
#issuer_key_hash, #hash_algorithm.
Based on a patch provided by Paul Kehrer paul.l.kehrer@gmail.com. [ruby-core:48062] [Feature #7181]
test/openssl/test_ocsp.rb: Test these new methods.
Thanks, applied as r55411 with modifications. I made #issuer_{name,key}_hash return lowercase strings to match with the return of Digest#hexdigest and renamed #signature_algorithm to #hash_algorithm because this is not a signature.