- int len = i2d_X509_ALGOR( const_cast<X509_ALGOR*>( palg ), NULL );
- len += i2d_ASN1_BIT_STRING( const_cast<ASN1_BIT_STRING*>( psig ), NULL );
- len += i2d_ASN1_TIME( const_cast<ASN1_TIME*>( X509_CRL_get0_lastUpdate( crl.get() ) ), NULL );
- len += i2d_ASN1_TIME( const_cast<ASN1_TIME*>( X509_CRL_get0_nextUpdate( crl.get() ) ), NULL );
-
- unsigned char* buffer = ( unsigned char* ) OPENSSL_malloc( len );
- unsigned char* pos = buffer;
- i2d_X509_ALGOR( const_cast<X509_ALGOR*>( palg ), &pos );
- i2d_ASN1_BIT_STRING( const_cast<ASN1_BIT_STRING*>( psig ), &pos );
- i2d_ASN1_TIME( const_cast<ASN1_TIME*>( X509_CRL_get0_lastUpdate( crl.get() ) ), &pos );
- i2d_ASN1_TIME( const_cast<ASN1_TIME*>( X509_CRL_get0_nextUpdate( crl.get() ) ), &pos );
- std::string res = std::string( ( char* ) buffer, len );
+ int len = i2d_X509_ALGOR( const_cast<X509_ALGOR *>( palg ), NULL );
+ len += i2d_ASN1_BIT_STRING( const_cast<ASN1_BIT_STRING *>( psig ), NULL );
+ len += i2d_ASN1_TIME( const_cast<ASN1_TIME *>( X509_CRL_get0_lastUpdate( crl.get() ) ), NULL );
+ len += i2d_ASN1_TIME( const_cast<ASN1_TIME *>( X509_CRL_get0_nextUpdate( crl.get() ) ), NULL );
+
+ unsigned char *buffer = ( unsigned char * ) OPENSSL_malloc( len );
+ unsigned char *pos = buffer;
+ i2d_X509_ALGOR( const_cast<X509_ALGOR *>( palg ), &pos );
+ i2d_ASN1_BIT_STRING( const_cast<ASN1_BIT_STRING *>( psig ), &pos );
+ i2d_ASN1_TIME( const_cast<ASN1_TIME *>( X509_CRL_get0_lastUpdate( crl.get() ) ), &pos );
+ i2d_ASN1_TIME( const_cast<ASN1_TIME *>( X509_CRL_get0_nextUpdate( crl.get() ) ), &pos );
+ std::string res = std::string( ( char * ) buffer, len );