}
send( conn, head, RecordHeader::SignerCommand::SET_SIGNATURE_TYPE, cert->md );
- send( conn, head, RecordHeader::SignerCommand::SET_PROFILE, cert->profile );
+
+ if( !cert->ocspCA.empty() ) {
+ send( conn, head, RecordHeader::SignerCommand::SET_OCSP_TARGET_CA, cert->ocspCA );
+ } else {
+ send( conn, head, RecordHeader::SignerCommand::SET_PROFILE, cert->profile );
+ }
+
send( conn, head, RecordHeader::SignerCommand::SET_WISH_FROM, cert->wishFrom );
send( conn, head, RecordHeader::SignerCommand::SET_WISH_TO, cert->wishTo );
}
std::shared_ptr<BIGNUM> ser( ASN1_INTEGER_to_BN( X509_get_serialNumber( pem.get() ), NULL ), BN_free );
- std::shared_ptr<char> serStr(
- BN_bn2hex( ser.get() ),
- []( char* p ) {
- OPENSSL_free( p );
- } ); // OPENSSL_free is a macro...
+ auto freeMem = []( char *p ) {
+ OPENSSL_free( p );
+ }; // OPENSSL_free is a macro...
+ std::shared_ptr<char> serStr( BN_bn2hex( ser.get() ), freeMem );
extractTimes( pem, result );