summaryrefslogtreecommitdiffstats
path: root/src/crypto/x509v3/v3_purp.c
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2015-09-25 00:44:37 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-09-25 00:44:37 +0000
commite246de8f184e644debf965ecdca552f006b56881 (patch)
treedc62c249d595198e0d99e43890019d21e901fbec /src/crypto/x509v3/v3_purp.c
parentc737bc23bc868fff21e5c1b95940813f709ea550 (diff)
parent00bc53f6f4436972b7a8dcf2c1e5fd0ad7515872 (diff)
downloadexternal_boringssl-e246de8f184e644debf965ecdca552f006b56881.zip
external_boringssl-e246de8f184e644debf965ecdca552f006b56881.tar.gz
external_boringssl-e246de8f184e644debf965ecdca552f006b56881.tar.bz2
am 00bc53f6: am a04d78d3: Revert "external/boringssl: sync with upstream."
* commit '00bc53f6f4436972b7a8dcf2c1e5fd0ad7515872': Revert "external/boringssl: sync with upstream."
Diffstat (limited to 'src/crypto/x509v3/v3_purp.c')
-rw-r--r--src/crypto/x509v3/v3_purp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/crypto/x509v3/v3_purp.c b/src/crypto/x509v3/v3_purp.c
index f53c0f1..8ae8a06 100644
--- a/src/crypto/x509v3/v3_purp.c
+++ b/src/crypto/x509v3/v3_purp.c
@@ -128,7 +128,7 @@ int X509_check_purpose(X509 *x, int id, int ca)
int X509_PURPOSE_set(int *p, int purpose)
{
if(X509_PURPOSE_get_by_id(purpose) == -1) {
- OPENSSL_PUT_ERROR(X509V3, X509V3_R_INVALID_PURPOSE);
+ OPENSSL_PUT_ERROR(X509V3, X509_PURPOSE_set, X509V3_R_INVALID_PURPOSE);
return 0;
}
*p = purpose;
@@ -191,7 +191,7 @@ int X509_PURPOSE_add(int id, int trust, int flags,
/* Need a new entry */
if(idx == -1) {
if(!(ptmp = OPENSSL_malloc(sizeof(X509_PURPOSE)))) {
- OPENSSL_PUT_ERROR(X509V3, ERR_R_MALLOC_FAILURE);
+ OPENSSL_PUT_ERROR(X509V3, X509_PURPOSE_add, ERR_R_MALLOC_FAILURE);
return 0;
}
ptmp->flags = X509_PURPOSE_DYNAMIC;
@@ -201,7 +201,7 @@ int X509_PURPOSE_add(int id, int trust, int flags,
name_dup = BUF_strdup(name);
sname_dup = BUF_strdup(sname);
if (name_dup == NULL || sname_dup == NULL) {
- OPENSSL_PUT_ERROR(X509V3, ERR_R_MALLOC_FAILURE);
+ OPENSSL_PUT_ERROR(X509V3, X509_PURPOSE_add, ERR_R_MALLOC_FAILURE);
if (name_dup != NULL)
OPENSSL_free(name_dup);
if (sname_dup != NULL)
@@ -232,12 +232,12 @@ int X509_PURPOSE_add(int id, int trust, int flags,
/* If its a new entry manage the dynamic table */
if(idx == -1) {
if(!xptable && !(xptable = sk_X509_PURPOSE_new(xp_cmp))) {
- OPENSSL_PUT_ERROR(X509V3, ERR_R_MALLOC_FAILURE);
+ OPENSSL_PUT_ERROR(X509V3, X509_PURPOSE_add, ERR_R_MALLOC_FAILURE);
xptable_free(ptmp);
return 0;
}
if (!sk_X509_PURPOSE_push(xptable, ptmp)) {
- OPENSSL_PUT_ERROR(X509V3, ERR_R_MALLOC_FAILURE);
+ OPENSSL_PUT_ERROR(X509V3, X509_PURPOSE_add, ERR_R_MALLOC_FAILURE);
xptable_free(ptmp);
return 0;
}