]> WPIA git - cassiopeia.git/commitdiff
add: Enable SPKAC
authorFelix Dörre <felix@dogcraft.de>
Sat, 3 Jan 2015 13:57:53 +0000 (14:57 +0100)
committerBenny Baumann <BenBE@geshi.org>
Sat, 24 Jan 2015 17:31:30 +0000 (18:31 +0100)
src/recordHandler.cpp
src/remoteSigner.cpp

index 6869e02d1eb193620cd4c69239c07de66aa2850b..9900496a1a301b4fe31d214e495c1f8435515850 100644 (file)
@@ -109,12 +109,18 @@ public:
         }
 
         switch( ( RecordHeader::SignerCommand ) head.command ) {
-        case RecordHeader::SignerCommand::SET_CSR: // setCSR
+        case RecordHeader::SignerCommand::SET_CSR:
             tbs->csr_content = data;
             tbs->csr_type = "CSR";
             ( *log ) << "INFO: CSR read:" << std::endl << tbs->csr_content;
             break;
 
+        case RecordHeader::SignerCommand::SET_SPKAC:
+            tbs->csr_content = data;
+            tbs->csr_type = "SPKAC";
+            ( *log ) << "INFO: SPKAC read:" << std::endl << tbs->csr_content;
+            break;
+
         case RecordHeader::SignerCommand::SET_SIGNATURE_TYPE:
             tbs->md = data;
             break;
index 18ad28a70146c1b94268cda66092368deee1b976..439bcf8ab44308e298197129e5f625ed2b19e384 100644 (file)
@@ -36,6 +36,8 @@ std::shared_ptr<SignedCertificate> RemoteSigner::sign( std::shared_ptr<TBSCertif
 
     if( cert->csr_type == "CSR" ) {
         send( conn, head, RecordHeader::SignerCommand::SET_CSR, cert->csr_content );
+    } else if( cert->csr_type == "SPKAC" ) {
+        send( conn, head, RecordHeader::SignerCommand::SET_SPKAC, cert->csr_content );
     } else {
         std::cout << "Unknown csr_type: " << cert->csr_type;
         return std::shared_ptr<SignedCertificate>();