- X509_CRL_set_lastUpdate( crl.get(), tmptm.get() );
-
- if( !X509_time_adj_ex( tmptm.get(), 1, 10, NULL ) ) {
- // error
+ c.setTimes( from, to );
+ signlog << "FINE: Setting extensions." << std::endl;
+ c.setExtensions( ca->ca, cert->SANs, prof );
+ signlog << "FINE: Signed" << std::endl;
+ std::shared_ptr<SignedCertificate> output = c.sign( ca->caKey, cert->md );
+ signlog << "FINE: all went well" << std::endl;
+ std::string fn = writeBackFile( num, output->certificate, ca->path );
+ if( fn.empty() ) {
+ signlog << "ERROR: failed to get filename for storage of signed certificate." << std::endl;
+ throw "Storage location could not be determined";