diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-04-24 13:28:57 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-04-24 13:28:57 +0000 |
commit | 6e781e8e076545b5a15e189bbaccbd7aae60d03b (patch) | |
tree | 67d66d12fefd9b1082b0b0b1557f9c09a11355a1 /crypto/pkcs12/p12_attr.c | |
parent | ad38bedbac71059fa85ee84888e308d50ae6f593 (diff) | |
download | openssl-6e781e8e076545b5a15e189bbaccbd7aae60d03b.tar.gz |
Delete the unnecessary ERR and ERRC lines in makefiles, add some functionality
to error code script: it can now find untranslatable function codes (usually
because the function is static and not defined in a header: occasionally because
of a typo...) and unreferenced function and reason codes. To see this try:
perl util/mkerr.pl -recurse -debug
Also fixed some typos in crypto/pkcs12 that this found :-)
Also tidy up some error calls that had to be all on one line: the old error
script couldn't find codes unless the call was all on one line.
Diffstat (limited to 'crypto/pkcs12/p12_attr.c')
-rw-r--r-- | crypto/pkcs12/p12_attr.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/crypto/pkcs12/p12_attr.c b/crypto/pkcs12/p12_attr.c index 220d7a67ea..0bd91e388c 100644 --- a/crypto/pkcs12/p12_attr.c +++ b/crypto/pkcs12/p12_attr.c @@ -151,7 +151,8 @@ int PKCS12_add_friendlyname_asc (PKCS12_SAFEBAG *bag, const char *name, unsigned char *uniname; int ret, unilen; if (!asc2uni(name, &uniname, &unilen)) { - PKCS12err(PKCS12_F_ADD_FRIENDLYNAME_ASC,ERR_R_MALLOC_FAILURE); + PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME_ASC, + ERR_R_MALLOC_FAILURE); return 0; } ret = PKCS12_add_friendlyname_uni (bag, uniname, unilen); @@ -169,34 +170,40 @@ int PKCS12_add_friendlyname_uni (PKCS12_SAFEBAG *bag, /* Zap ending double null if included */ if(!name[namelen - 1] && !name[namelen - 2]) namelen -= 2; if (!(fname = ASN1_TYPE_new ())) { - PKCS12err(PKCS12_F_ADD_FRIENDLYNAME_UNI,ERR_R_MALLOC_FAILURE); + PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI, + ERR_R_MALLOC_FAILURE); return 0; } fname->type = V_ASN1_BMPSTRING; if (!(bmp = ASN1_BMPSTRING_new())) { - PKCS12err(PKCS12_F_ADD_FRIENDLYNAME_UNI,ERR_R_MALLOC_FAILURE); + PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI, + ERR_R_MALLOC_FAILURE); return 0; } if (!(bmp->data = Malloc (namelen))) { - PKCS12err(PKCS12_F_ADD_FRIENDLYNAME_UNI,ERR_R_MALLOC_FAILURE); + PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI, + ERR_R_MALLOC_FAILURE); return 0; } memcpy (bmp->data, name, namelen); bmp->length = namelen; fname->value.bmpstring = bmp; if (!(attrib = X509_ATTRIBUTE_new ())) { - PKCS12err(PKCS12_F_ADD_FRIENDLYNAME_UNI,ERR_R_MALLOC_FAILURE); + PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI, + ERR_R_MALLOC_FAILURE); return 0; } attrib->object = OBJ_nid2obj(NID_friendlyName); if (!(attrib->value.set = sk_new(NULL))) { - PKCS12err(PKCS12_F_ADD_FRIENDLYNAME,ERR_R_MALLOC_FAILURE); + PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME, + ERR_R_MALLOC_FAILURE); return 0; } sk_push (attrib->value.set, (char *)fname); attrib->set = 1; if (!bag->attrib && !(bag->attrib = sk_new (NULL))) { - PKCS12err(PKCS12_F_ADD_FRIENDLYNAME_UNI, ERR_R_MALLOC_FAILURE); + PKCS12err(PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI, + ERR_R_MALLOC_FAILURE); return 0; } sk_push (bag->attrib, (char *)attrib); |