- std::vector<char> buffer( 2048 * 4 );
- int length = conn->read( buffer.data(), buffer.size() );
+ payload = parseCommandChunked( head, conn );
+
+ std::string tgtName = ca->path + std::string( "/ca.crl" );
+ auto crl = std::make_shared<CRL>( tgtName );
+ std::string date;
+
+ if( static_cast<RecordHeader::SignerResult>( head.command ) != RecordHeader::SignerResult::REVOKED ) {
+ throw std::runtime_error( "Protocol violation" );
+ }
+
+ const unsigned char* buffer2 = reinterpret_cast<const unsigned char*>( payload.data() );
+ const unsigned char* pos = buffer2;
+ ASN1_TIME* time = d2i_ASN1_TIME( NULL, &pos, payload.size() );
+ ASN1_TIME_free( time );
+ date = payload.substr( 0, pos - buffer2 );
+ std::string rest = payload.substr( pos - buffer2 );