- auto cert = std::make_shared<TBSCertificate>();
- cert->ocspCA = profileName;
- cert->wishFrom = "now";
- cert->wishTo = "1y";
- cert->md = "sha512";
-
- logger::note( "INFO: Message Digest: ", cert->md );
-
- for( auto& SAN : cert->SANs ) {
- logger::notef( "INFO: SAN %s: %s", SAN->type, SAN->content );
- }
-
- for( auto& AVA : cert->AVAs ) {
- logger::notef( "INFO: AVA %s: %s", AVA->name, AVA->value );
- }
-
- cert->csr_content = req;
- cert->csr_type = "CSR";
- auto nAVA = std::make_shared<AVA>();
- nAVA->name = "CN";
- nAVA->value = "OCSP Responder";
- cert->AVAs.push_back( nAVA );
-
- std::shared_ptr<SignedCertificate> res = sign->sign( cert );
-
- if( !res ) {
- logger::error( "OCSP Cert signing failed." );
- continue;
- }
-
- writeFile( crtName, res->certificate );
- logger::notef( "Cert log: %s", res->log );
+ signOCSP( sign, profileName, req, crtName, failName );