Merge pull request #170 from mfleisz/cryptofix

core: Fixed error in crypto_print_name causing it to always return NULL
This commit is contained in:
Otavio Salvador
2011-10-21 06:42:52 -07:00

View File

@@ -287,7 +287,7 @@ char* crypto_print_name(X509_NAME* name)
if(X509_NAME_print_ex(outBIO, name, 0, XN_FLAG_ONELINE) > 0) if(X509_NAME_print_ex(outBIO, name, 0, XN_FLAG_ONELINE) > 0)
{ {
unsigned long size = BIO_number_written(outBIO); unsigned long size = BIO_number_written(outBIO);
char* buffer = xzalloc(size); buffer = xzalloc(size);
memset(buffer, 0, size); memset(buffer, 0, size);
BIO_read(outBIO, buffer, size); BIO_read(outBIO, buffer, size);
} }