summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2015-09-10 14:29:23 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2015-09-10 14:29:23 +0000
commitee72f801193e4a4723f717112af9589b99f62e23 (patch)
tree4b47651c1fa38c9fb7b6b0c183ce41a8d027c20c /lib
parent510692c64436c2bcda5983e51dc2292e0cb94da9 (diff)
Replace remaining M_ASN1_STRING_* macros with calls to ASN1_STRING_*.
This is not the same as the macro expansion, however the ASN1_STRING_* functions do match the macro expansions. ok doug@ miod@
Diffstat (limited to 'lib')
-rw-r--r--lib/libssl/src/crypto/asn1/evp_asn1.c18
-rw-r--r--lib/libssl/src/crypto/ec/ec_asn1.c10
-rw-r--r--lib/libssl/src/crypto/ts/ts_lib.c8
3 files changed, 18 insertions, 18 deletions
diff --git a/lib/libssl/src/crypto/asn1/evp_asn1.c b/lib/libssl/src/crypto/asn1/evp_asn1.c
index 5ee47517635..a982866f2e1 100644
--- a/lib/libssl/src/crypto/asn1/evp_asn1.c
+++ b/lib/libssl/src/crypto/asn1/evp_asn1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: evp_asn1.c,v 1.14 2015/07/29 14:58:34 jsing Exp $ */
+/* $OpenBSD: evp_asn1.c,v 1.15 2015/09/10 14:29:22 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -90,8 +90,8 @@ ASN1_TYPE_get_octetstring(ASN1_TYPE *a, unsigned char *data, int max_len)
ASN1err(ASN1_F_ASN1_TYPE_GET_OCTETSTRING, ASN1_R_DATA_IS_WRONG);
return (-1);
}
- p = M_ASN1_STRING_data(a->value.octet_string);
- ret = M_ASN1_STRING_length(a->value.octet_string);
+ p = ASN1_STRING_data(a->value.octet_string);
+ ret = ASN1_STRING_length(a->value.octet_string);
if (ret < max_len)
num = ret;
else
@@ -129,8 +129,8 @@ ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, unsigned char *data,
return (0);
}
- M_ASN1_STRING_length_set(osp, size);
- p = M_ASN1_STRING_data(osp);
+ ASN1_STRING_length_set(osp, size);
+ p = ASN1_STRING_data(osp);
ASN1_put_object(&p, 1,n, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL);
i2d_ASN1_INTEGER(&in, &p);
@@ -157,8 +157,8 @@ ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num, unsigned char *data,
if ((a->type != V_ASN1_SEQUENCE) || (a->value.sequence == NULL)) {
goto err;
}
- p = M_ASN1_STRING_data(a->value.sequence);
- length = M_ASN1_STRING_length(a->value.sequence);
+ p = ASN1_STRING_data(a->value.sequence);
+ length = ASN1_STRING_length(a->value.sequence);
c.pp = &p;
c.p = p;
@@ -180,14 +180,14 @@ ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num, unsigned char *data,
if (num != NULL)
*num = ASN1_INTEGER_get(ai);
- ret = M_ASN1_STRING_length(os);
+ ret = ASN1_STRING_length(os);
if (max_len > ret)
n = ret;
else
n = max_len;
if (data != NULL)
- memcpy(data, M_ASN1_STRING_data(os), n);
+ memcpy(data, ASN1_STRING_data(os), n);
if (0) {
err:
ASN1err(ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING,
diff --git a/lib/libssl/src/crypto/ec/ec_asn1.c b/lib/libssl/src/crypto/ec/ec_asn1.c
index 2e7e1746fa6..ae6ed63afdb 100644
--- a/lib/libssl/src/crypto/ec/ec_asn1.c
+++ b/lib/libssl/src/crypto/ec/ec_asn1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec_asn1.c,v 1.16 2015/07/29 14:58:34 jsing Exp $ */
+/* $OpenBSD: ec_asn1.c,v 1.17 2015/09/10 14:29:22 jsing Exp $ */
/*
* Written by Nils Larsch for the OpenSSL project.
*/
@@ -1367,8 +1367,8 @@ d2i_ECPrivateKey(EC_KEY ** a, const unsigned char **in, long len)
if (priv_key->privateKey) {
ret->priv_key = BN_bin2bn(
- M_ASN1_STRING_data(priv_key->privateKey),
- M_ASN1_STRING_length(priv_key->privateKey),
+ ASN1_STRING_data(priv_key->privateKey),
+ ASN1_STRING_length(priv_key->privateKey),
ret->priv_key);
if (ret->priv_key == NULL) {
ECerr(EC_F_D2I_ECPRIVATEKEY,
@@ -1391,8 +1391,8 @@ d2i_ECPrivateKey(EC_KEY ** a, const unsigned char **in, long len)
ECerr(EC_F_D2I_ECPRIVATEKEY, ERR_R_EC_LIB);
goto err;
}
- pub_oct = M_ASN1_STRING_data(priv_key->publicKey);
- pub_oct_len = M_ASN1_STRING_length(priv_key->publicKey);
+ pub_oct = ASN1_STRING_data(priv_key->publicKey);
+ pub_oct_len = ASN1_STRING_length(priv_key->publicKey);
/* save the point conversion form */
ret->conv_form = (point_conversion_form_t) (pub_oct[0] & ~0x01);
if (!EC_POINT_oct2point(ret->group, ret->pub_key,
diff --git a/lib/libssl/src/crypto/ts/ts_lib.c b/lib/libssl/src/crypto/ts/ts_lib.c
index ac5f65df94e..293564118fd 100644
--- a/lib/libssl/src/crypto/ts/ts_lib.c
+++ b/lib/libssl/src/crypto/ts/ts_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ts_lib.c,v 1.9 2015/07/29 14:58:34 jsing Exp $ */
+/* $OpenBSD: ts_lib.c,v 1.10 2015/09/10 14:29:22 jsing Exp $ */
/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL
* project 2002.
*/
@@ -137,14 +137,14 @@ TS_X509_ALGOR_print_bio(BIO *bio, const X509_ALGOR *alg)
int
TS_MSG_IMPRINT_print_bio(BIO *bio, TS_MSG_IMPRINT *a)
{
- const ASN1_OCTET_STRING *msg;
+ ASN1_OCTET_STRING *msg;
TS_X509_ALGOR_print_bio(bio, TS_MSG_IMPRINT_get_algo(a));
BIO_printf(bio, "Message data:\n");
msg = TS_MSG_IMPRINT_get_msg(a);
- BIO_dump_indent(bio, (const char *)M_ASN1_STRING_data(msg),
- M_ASN1_STRING_length(msg), 4);
+ BIO_dump_indent(bio, (const char *)ASN1_STRING_data(msg),
+ ASN1_STRING_length(msg), 4);
return 1;
}