]> WPIA git - cassiopeia.git/blobdiff - src/io/recordHandler.cpp
Fix: uninitialized fields
[cassiopeia.git] / src / io / recordHandler.cpp
index 2ba71c2675b821080fc39617523d6bd0096b4bc0..67214e327496d904e083591a5a29cf662a007446 100644 (file)
@@ -38,7 +38,9 @@ public:
     std::vector<std::string> serials;
 
     RecordHandlerSession( DefaultRecordHandler* parent, std::shared_ptr<Signer> signer, std::shared_ptr<SSL_CTX> ctx, std::shared_ptr<BIO> output ) :
-        tbs( new TBSCertificate() ) {
+        sessid( 0 ),
+        lastCommandCount( 0 ),
+        tbs( new TBSCertificate() ){
         this->parent = parent;
         this->signer = signer;
         time_t c_time;
@@ -221,14 +223,8 @@ public:
     }
 };
 
-DefaultRecordHandler::DefaultRecordHandler( std::shared_ptr<Signer> signer, std::shared_ptr<BIO> bio ) :
-    currentSession() {
-
-    this->signer = signer;
-
-    ctx = generateSSLContext( true );
-
-    this->bio = bio;
+DefaultRecordHandler::DefaultRecordHandler( std::shared_ptr<Signer> signer, std::shared_ptr<BIO> bio )
+    : bio( bio ), ctx( generateSSLContext( true ) ), signer( signer ), currentSession() {
 }
 
 void DefaultRecordHandler::reset() {