small change in error handling

This commit is contained in:
John Jones 2017-02-22 11:48:14 -05:00
parent ddb1274596
commit e4a4226f5d

View file

@ -82,7 +82,6 @@ int libp2p_crypto_encoding_x509_der_to_private_key(unsigned char* der, size_t de
private_key->P = *(rsa->P.p); private_key->P = *(rsa->P.p);
private_key->Q = *(rsa->Q.p); private_key->Q = *(rsa->Q.p);
private_key->QP = *(rsa->QP.p); private_key->QP = *(rsa->QP.p);
}
// now put the public DER format in. // now put the public DER format in.
private_key->der = malloc(sizeof(char) * der_length); private_key->der = malloc(sizeof(char) * der_length);
@ -92,6 +91,7 @@ int libp2p_crypto_encoding_x509_der_to_private_key(unsigned char* der, size_t de
private_key->der_length = der_length; private_key->der_length = der_length;
//NOTE: the public DER stuff is done in rsa.c //NOTE: the public DER stuff is done in rsa.c
}
mbedtls_pk_free(&ctx); mbedtls_pk_free(&ctx);