if( time != "" ) {
const unsigned char* data = ( unsigned char* )( time.data() );
- d2i_ASN1_UTCTIME( &rev->revocationDate, &data, time.size() );
+ d2i_ASN1_TIME( &rev->revocationDate, &data, time.size() );
} else {
X509_REVOKED_set_revocationDate( rev, tmptm.get() );
}
X509_CRL_add0_revoked( crl.get(), rev );
- int len = i2d_ASN1_UTCTIME( tmptm.get(), NULL );
+ int len = i2d_ASN1_TIME( tmptm.get(), NULL );
unsigned char* buffer = ( unsigned char* ) OPENSSL_malloc( len );
unsigned char* pos = buffer;
- i2d_ASN1_UTCTIME( tmptm.get(), &pos );
+ i2d_ASN1_TIME( tmptm.get(), &pos );
std::string rettime = std::string( ( char* ) buffer, len );
OPENSSL_free( buffer );
return rettime;
std::string CRL::getSignature() {
int len = i2d_X509_ALGOR( crl->sig_alg, NULL );
len += i2d_ASN1_BIT_STRING( crl->signature, NULL );
- len += i2d_ASN1_UTCTIME( crl->crl->lastUpdate, NULL );
- len += i2d_ASN1_UTCTIME( crl->crl->nextUpdate, NULL );
+ len += i2d_ASN1_TIME( crl->crl->lastUpdate, NULL );
+ len += i2d_ASN1_TIME( crl->crl->nextUpdate, NULL );
unsigned char* buffer = ( unsigned char* ) OPENSSL_malloc( len );
unsigned char* pos = buffer;
i2d_X509_ALGOR( crl->sig_alg, &pos );
i2d_ASN1_BIT_STRING( crl->signature, &pos );
- i2d_ASN1_UTCTIME( crl->crl->lastUpdate, &pos );
- i2d_ASN1_UTCTIME( crl->crl->nextUpdate, &pos );
+ i2d_ASN1_TIME( crl->crl->lastUpdate, &pos );
+ i2d_ASN1_TIME( crl->crl->nextUpdate, &pos );
std::string res = std::string( ( char* ) buffer, len );
OPENSSL_free( buffer );
const unsigned char* buffer = data;
d2i_X509_ALGOR( &crl->sig_alg, &buffer, signature.size() );
d2i_ASN1_BIT_STRING( &crl->signature, &buffer, signature.size() + data - buffer );
- d2i_ASN1_UTCTIME( &crl->crl->lastUpdate, &buffer, signature.size() + data - buffer );
- d2i_ASN1_UTCTIME( &crl->crl->nextUpdate, &buffer, signature.size() + data - buffer );
+ d2i_ASN1_TIME( &crl->crl->lastUpdate, &buffer, signature.size() + data - buffer );
+ d2i_ASN1_TIME( &crl->crl->nextUpdate, &buffer, signature.size() + data - buffer );
}
case RecordHeader::SignerResult::REVOKED: {
const unsigned char* buffer2 = ( const unsigned char* ) payload.data();
const unsigned char* pos = buffer2;
- ASN1_UTCTIME* time = d2i_ASN1_UTCTIME( NULL, &pos, payload.size() );
- ASN1_UTCTIME_free( time );
+ ASN1_TIME* time = d2i_ASN1_TIME( NULL, &pos, payload.size() );
+ ASN1_TIME_free( time );
std::string rest = payload.substr( pos - buffer2 );
crl->revoke( serial, payload.substr( 0, pos - buffer2 ) );
crl->setSignature( rest );