- c.setIssuerNameFrom( prof.ca->ca );
- c.setPubkeyFrom( req );
-
- std::shared_ptr<BIGNUM> ser;
- std::string num;
- std::tie( ser, num ) = nextSerial( prof );
- c.setSerialNumber( ser.get() );
- c.setTimes( 0, 60 * 60 * 24 * 10 );
- signlog << "FINE: Setting extensions." << std::endl;
- c.setExtensions( prof.ca->ca, cert->SANs, prof );
- signlog << "FINE: Signed" << std::endl;
- std::shared_ptr<SignedCertificate> output = c.sign( prof.ca->caKey, cert->md );
- signlog << "FINE: all went well" << std::endl;
- signlog << "FINE: crt went to: " << writeBackFile( num, output->certificate, prof.ca->path ) << std::endl;
- output->log = signlog.str();
- return output;
-}