]> WPIA git - cassiopeia.git/blobdiff - src/crypto/remoteSigner.cpp
add: signing of OCSP certificates
[cassiopeia.git] / src / crypto / remoteSigner.cpp
index 64ccebf36166b0db30bcf8ef639199f623fa4d3d..c06af91bc3a48700300c6cd89fdb774d1e1289cb 100644 (file)
@@ -44,7 +44,13 @@ std::shared_ptr<SignedCertificate> RemoteSigner::sign( std::shared_ptr<TBSCertif
     }
 
     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 );