diff options
author | jsing <> | 2015-09-29 13:54:40 +0000 |
---|---|---|
committer | jsing <> | 2015-09-29 13:54:40 +0000 |
commit | 85e1dd6e42a412bf15e88ce481b4efbef96053c7 (patch) | |
tree | 742ffab301d8bdb3b31aaef2b4c50dc018af8970 | |
parent | 709c2c131d5d5d3f3c8ecb110b01f3d5afa6ddfd (diff) | |
download | openbsd-85e1dd6e42a412bf15e88ce481b4efbef96053c7.tar.gz openbsd-85e1dd6e42a412bf15e88ce481b4efbef96053c7.tar.bz2 openbsd-85e1dd6e42a412bf15e88ce481b4efbef96053c7.zip |
Replace remaining M_ASN1_BIT_STRING_(new|free) macros with calls to
ASN1_BIT_STRING_(new|free).
ok beck@ doug@
-rw-r--r-- | src/lib/libcrypto/asn1/a_bitstr.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/ec/ec_asn1.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_bitst.c | 8 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/asn1/a_bitstr.c | 6 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/ec/ec_asn1.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/x509v3/v3_bitst.c | 8 |
6 files changed, 18 insertions, 18 deletions
diff --git a/src/lib/libcrypto/asn1/a_bitstr.c b/src/lib/libcrypto/asn1/a_bitstr.c index c0259ad815..c847b471d6 100644 --- a/src/lib/libcrypto/asn1/a_bitstr.c +++ b/src/lib/libcrypto/asn1/a_bitstr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: a_bitstr.c,v 1.22 2015/07/29 14:58:34 jsing Exp $ */ | 1 | /* $OpenBSD: a_bitstr.c,v 1.23 2015/09/29 13:54:40 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -140,7 +140,7 @@ c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **pp, long len) | |||
140 | } | 140 | } |
141 | 141 | ||
142 | if ((a == NULL) || ((*a) == NULL)) { | 142 | if ((a == NULL) || ((*a) == NULL)) { |
143 | if ((ret = M_ASN1_BIT_STRING_new()) == NULL) | 143 | if ((ret = ASN1_BIT_STRING_new()) == NULL) |
144 | return (NULL); | 144 | return (NULL); |
145 | } else | 145 | } else |
146 | ret = (*a); | 146 | ret = (*a); |
@@ -178,7 +178,7 @@ c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **pp, long len) | |||
178 | err: | 178 | err: |
179 | ASN1err(ASN1_F_C2I_ASN1_BIT_STRING, i); | 179 | ASN1err(ASN1_F_C2I_ASN1_BIT_STRING, i); |
180 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) | 180 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) |
181 | M_ASN1_BIT_STRING_free(ret); | 181 | ASN1_BIT_STRING_free(ret); |
182 | return (NULL); | 182 | return (NULL); |
183 | } | 183 | } |
184 | 184 | ||
diff --git a/src/lib/libcrypto/ec/ec_asn1.c b/src/lib/libcrypto/ec/ec_asn1.c index ae6ed63afd..44f1597896 100644 --- a/src/lib/libcrypto/ec/ec_asn1.c +++ b/src/lib/libcrypto/ec/ec_asn1.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ec_asn1.c,v 1.17 2015/09/10 14:29:22 jsing Exp $ */ | 1 | /* $OpenBSD: ec_asn1.c,v 1.18 2015/09/29 13:54:40 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
4 | */ | 4 | */ |
@@ -1459,7 +1459,7 @@ i2d_ECPrivateKey(EC_KEY * a, unsigned char **out) | |||
1459 | } | 1459 | } |
1460 | } | 1460 | } |
1461 | if (!(a->enc_flag & EC_PKEY_NO_PUBKEY) && a->pub_key != NULL) { | 1461 | if (!(a->enc_flag & EC_PKEY_NO_PUBKEY) && a->pub_key != NULL) { |
1462 | priv_key->publicKey = M_ASN1_BIT_STRING_new(); | 1462 | priv_key->publicKey = ASN1_BIT_STRING_new(); |
1463 | if (priv_key->publicKey == NULL) { | 1463 | if (priv_key->publicKey == NULL) { |
1464 | ECerr(EC_F_I2D_ECPRIVATEKEY, | 1464 | ECerr(EC_F_I2D_ECPRIVATEKEY, |
1465 | ERR_R_MALLOC_FAILURE); | 1465 | ERR_R_MALLOC_FAILURE); |
diff --git a/src/lib/libcrypto/x509v3/v3_bitst.c b/src/lib/libcrypto/x509v3/v3_bitst.c index 894608fadb..0670aa306e 100644 --- a/src/lib/libcrypto/x509v3/v3_bitst.c +++ b/src/lib/libcrypto/x509v3/v3_bitst.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_bitst.c,v 1.11 2015/07/29 16:13:48 jsing Exp $ */ | 1 | /* $OpenBSD: v3_bitst.c,v 1.12 2015/09/29 13:54:40 jsing Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -144,7 +144,7 @@ v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, | |||
144 | int i; | 144 | int i; |
145 | BIT_STRING_BITNAME *bnam; | 145 | BIT_STRING_BITNAME *bnam; |
146 | 146 | ||
147 | if (!(bs = M_ASN1_BIT_STRING_new())) { | 147 | if (!(bs = ASN1_BIT_STRING_new())) { |
148 | X509V3err(X509V3_F_V2I_ASN1_BIT_STRING, ERR_R_MALLOC_FAILURE); | 148 | X509V3err(X509V3_F_V2I_ASN1_BIT_STRING, ERR_R_MALLOC_FAILURE); |
149 | return NULL; | 149 | return NULL; |
150 | } | 150 | } |
@@ -157,7 +157,7 @@ v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, | |||
157 | bnam->bitnum, 1)) { | 157 | bnam->bitnum, 1)) { |
158 | X509V3err(X509V3_F_V2I_ASN1_BIT_STRING, | 158 | X509V3err(X509V3_F_V2I_ASN1_BIT_STRING, |
159 | ERR_R_MALLOC_FAILURE); | 159 | ERR_R_MALLOC_FAILURE); |
160 | M_ASN1_BIT_STRING_free(bs); | 160 | ASN1_BIT_STRING_free(bs); |
161 | return NULL; | 161 | return NULL; |
162 | } | 162 | } |
163 | break; | 163 | break; |
@@ -167,7 +167,7 @@ v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, | |||
167 | X509V3err(X509V3_F_V2I_ASN1_BIT_STRING, | 167 | X509V3err(X509V3_F_V2I_ASN1_BIT_STRING, |
168 | X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT); | 168 | X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT); |
169 | X509V3_conf_err(val); | 169 | X509V3_conf_err(val); |
170 | M_ASN1_BIT_STRING_free(bs); | 170 | ASN1_BIT_STRING_free(bs); |
171 | return NULL; | 171 | return NULL; |
172 | } | 172 | } |
173 | } | 173 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/a_bitstr.c b/src/lib/libssl/src/crypto/asn1/a_bitstr.c index c0259ad815..c847b471d6 100644 --- a/src/lib/libssl/src/crypto/asn1/a_bitstr.c +++ b/src/lib/libssl/src/crypto/asn1/a_bitstr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: a_bitstr.c,v 1.22 2015/07/29 14:58:34 jsing Exp $ */ | 1 | /* $OpenBSD: a_bitstr.c,v 1.23 2015/09/29 13:54:40 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -140,7 +140,7 @@ c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **pp, long len) | |||
140 | } | 140 | } |
141 | 141 | ||
142 | if ((a == NULL) || ((*a) == NULL)) { | 142 | if ((a == NULL) || ((*a) == NULL)) { |
143 | if ((ret = M_ASN1_BIT_STRING_new()) == NULL) | 143 | if ((ret = ASN1_BIT_STRING_new()) == NULL) |
144 | return (NULL); | 144 | return (NULL); |
145 | } else | 145 | } else |
146 | ret = (*a); | 146 | ret = (*a); |
@@ -178,7 +178,7 @@ c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **pp, long len) | |||
178 | err: | 178 | err: |
179 | ASN1err(ASN1_F_C2I_ASN1_BIT_STRING, i); | 179 | ASN1err(ASN1_F_C2I_ASN1_BIT_STRING, i); |
180 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) | 180 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) |
181 | M_ASN1_BIT_STRING_free(ret); | 181 | ASN1_BIT_STRING_free(ret); |
182 | return (NULL); | 182 | return (NULL); |
183 | } | 183 | } |
184 | 184 | ||
diff --git a/src/lib/libssl/src/crypto/ec/ec_asn1.c b/src/lib/libssl/src/crypto/ec/ec_asn1.c index ae6ed63afd..44f1597896 100644 --- a/src/lib/libssl/src/crypto/ec/ec_asn1.c +++ b/src/lib/libssl/src/crypto/ec/ec_asn1.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ec_asn1.c,v 1.17 2015/09/10 14:29:22 jsing Exp $ */ | 1 | /* $OpenBSD: ec_asn1.c,v 1.18 2015/09/29 13:54:40 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
4 | */ | 4 | */ |
@@ -1459,7 +1459,7 @@ i2d_ECPrivateKey(EC_KEY * a, unsigned char **out) | |||
1459 | } | 1459 | } |
1460 | } | 1460 | } |
1461 | if (!(a->enc_flag & EC_PKEY_NO_PUBKEY) && a->pub_key != NULL) { | 1461 | if (!(a->enc_flag & EC_PKEY_NO_PUBKEY) && a->pub_key != NULL) { |
1462 | priv_key->publicKey = M_ASN1_BIT_STRING_new(); | 1462 | priv_key->publicKey = ASN1_BIT_STRING_new(); |
1463 | if (priv_key->publicKey == NULL) { | 1463 | if (priv_key->publicKey == NULL) { |
1464 | ECerr(EC_F_I2D_ECPRIVATEKEY, | 1464 | ECerr(EC_F_I2D_ECPRIVATEKEY, |
1465 | ERR_R_MALLOC_FAILURE); | 1465 | ERR_R_MALLOC_FAILURE); |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_bitst.c b/src/lib/libssl/src/crypto/x509v3/v3_bitst.c index 894608fadb..0670aa306e 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_bitst.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_bitst.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_bitst.c,v 1.11 2015/07/29 16:13:48 jsing Exp $ */ | 1 | /* $OpenBSD: v3_bitst.c,v 1.12 2015/09/29 13:54:40 jsing Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -144,7 +144,7 @@ v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, | |||
144 | int i; | 144 | int i; |
145 | BIT_STRING_BITNAME *bnam; | 145 | BIT_STRING_BITNAME *bnam; |
146 | 146 | ||
147 | if (!(bs = M_ASN1_BIT_STRING_new())) { | 147 | if (!(bs = ASN1_BIT_STRING_new())) { |
148 | X509V3err(X509V3_F_V2I_ASN1_BIT_STRING, ERR_R_MALLOC_FAILURE); | 148 | X509V3err(X509V3_F_V2I_ASN1_BIT_STRING, ERR_R_MALLOC_FAILURE); |
149 | return NULL; | 149 | return NULL; |
150 | } | 150 | } |
@@ -157,7 +157,7 @@ v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, | |||
157 | bnam->bitnum, 1)) { | 157 | bnam->bitnum, 1)) { |
158 | X509V3err(X509V3_F_V2I_ASN1_BIT_STRING, | 158 | X509V3err(X509V3_F_V2I_ASN1_BIT_STRING, |
159 | ERR_R_MALLOC_FAILURE); | 159 | ERR_R_MALLOC_FAILURE); |
160 | M_ASN1_BIT_STRING_free(bs); | 160 | ASN1_BIT_STRING_free(bs); |
161 | return NULL; | 161 | return NULL; |
162 | } | 162 | } |
163 | break; | 163 | break; |
@@ -167,7 +167,7 @@ v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, | |||
167 | X509V3err(X509V3_F_V2I_ASN1_BIT_STRING, | 167 | X509V3err(X509V3_F_V2I_ASN1_BIT_STRING, |
168 | X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT); | 168 | X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT); |
169 | X509V3_conf_err(val); | 169 | X509V3_conf_err(val); |
170 | M_ASN1_BIT_STRING_free(bs); | 170 | ASN1_BIT_STRING_free(bs); |
171 | return NULL; | 171 | return NULL; |
172 | } | 172 | } |
173 | } | 173 | } |