diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-03-14 04:16:42 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-03-23 13:15:06 +0000 |
commit | f422a51486a3ab415153eccdc3c3746c53da01f4 (patch) | |
tree | 7048cd4c4b3857f13ee0468d9059a0e24b17c885 /crypto/x509v3/v3_sxnet.c | |
parent | 2ecd32a1f8f0643ae7b38f59bbaf9f0d6ef326fe (diff) |
Remove old ASN.1 code.
Remove old M_ASN1_ macros and replace any occurences with the corresponding
function.
Remove d2i_ASN1_bytes, d2i_ASN1_SET, i2d_ASN1_SET: no longer used internally.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/x509v3/v3_sxnet.c')
-rw-r--r-- | crypto/x509v3/v3_sxnet.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crypto/x509v3/v3_sxnet.c b/crypto/x509v3/v3_sxnet.c index df1384abaf..ecd1ec6ffb 100644 --- a/crypto/x509v3/v3_sxnet.c +++ b/crypto/x509v3/v3_sxnet.c @@ -117,7 +117,7 @@ static int sxnet_i2r(X509V3_EXT_METHOD *method, SXNET *sx, BIO *out, tmp = i2s_ASN1_INTEGER(NULL, id->zone); BIO_printf(out, "\n%*sZone: %s, User: ", indent, "", tmp); OPENSSL_free(tmp); - M_ASN1_OCTET_STRING_print(out, id->user); + ASN1_STRING_print(out, id->user); } return 1; } @@ -166,9 +166,9 @@ int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, char *user, int userlen) { ASN1_INTEGER *izone = NULL; - if (!(izone = M_ASN1_INTEGER_new()) || !ASN1_INTEGER_set(izone, lzone)) { + if (!(izone = ASN1_INTEGER_new()) || !ASN1_INTEGER_set(izone, lzone)) { X509V3err(X509V3_F_SXNET_ADD_ID_ULONG, ERR_R_MALLOC_FAILURE); - M_ASN1_INTEGER_free(izone); + ASN1_INTEGER_free(izone); return 0; } return SXNET_add_id_INTEGER(psx, izone, user, userlen); @@ -214,7 +214,7 @@ int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *zone, char *user, if (userlen == -1) userlen = strlen(user); - if (!M_ASN1_OCTET_STRING_set(id->user, user, userlen)) + if (!ASN1_OCTET_STRING_set(id->user, (unsigned char *)user, userlen)) goto err; if (!sk_SXNETID_push(sx->ids, id)) goto err; @@ -238,7 +238,7 @@ ASN1_OCTET_STRING *SXNET_get_id_asc(SXNET *sx, char *zone) return NULL; } oct = SXNET_get_id_INTEGER(sx, izone); - M_ASN1_INTEGER_free(izone); + ASN1_INTEGER_free(izone); return oct; } @@ -246,13 +246,13 @@ ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone) { ASN1_INTEGER *izone = NULL; ASN1_OCTET_STRING *oct; - if (!(izone = M_ASN1_INTEGER_new()) || !ASN1_INTEGER_set(izone, lzone)) { + if (!(izone = ASN1_INTEGER_new()) || !ASN1_INTEGER_set(izone, lzone)) { X509V3err(X509V3_F_SXNET_GET_ID_ULONG, ERR_R_MALLOC_FAILURE); - M_ASN1_INTEGER_free(izone); + ASN1_INTEGER_free(izone); return NULL; } oct = SXNET_get_id_INTEGER(sx, izone); - M_ASN1_INTEGER_free(izone); + ASN1_INTEGER_free(izone); return oct; } @@ -262,7 +262,7 @@ ASN1_OCTET_STRING *SXNET_get_id_INTEGER(SXNET *sx, ASN1_INTEGER *zone) int i; for (i = 0; i < sk_SXNETID_num(sx->ids); i++) { id = sk_SXNETID_value(sx->ids, i); - if (!M_ASN1_INTEGER_cmp(id->zone, zone)) + if (!ASN1_INTEGER_cmp(id->zone, zone)) return id->user; } return NULL; |