diff options
Diffstat (limited to 'src/lib/libcrypto/asn1')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_type.c | 8 | ||||
| -rw-r--r-- | src/lib/libcrypto/asn1/p8_pkey.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/asn1/a_type.c b/src/lib/libcrypto/asn1/a_type.c index 502db42a73..0615de1ccb 100644 --- a/src/lib/libcrypto/asn1/a_type.c +++ b/src/lib/libcrypto/asn1/a_type.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_type.c,v 1.28 2025/05/10 05:54:38 tb Exp $ */ | 1 | /* $OpenBSD: a_type.c,v 1.29 2025/12/05 14:19:27 tb 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 | * |
| @@ -227,14 +227,14 @@ int | |||
| 227 | ASN1_TYPE_get_octetstring(const ASN1_TYPE *a, unsigned char *data, int max_len) | 227 | ASN1_TYPE_get_octetstring(const ASN1_TYPE *a, unsigned char *data, int max_len) |
| 228 | { | 228 | { |
| 229 | int ret, num; | 229 | int ret, num; |
| 230 | unsigned char *p; | 230 | const unsigned char *p; |
| 231 | 231 | ||
| 232 | if ((a->type != V_ASN1_OCTET_STRING) || | 232 | if ((a->type != V_ASN1_OCTET_STRING) || |
| 233 | (a->value.octet_string == NULL)) { | 233 | (a->value.octet_string == NULL)) { |
| 234 | ASN1error(ASN1_R_DATA_IS_WRONG); | 234 | ASN1error(ASN1_R_DATA_IS_WRONG); |
| 235 | return (-1); | 235 | return (-1); |
| 236 | } | 236 | } |
| 237 | p = ASN1_STRING_data(a->value.octet_string); | 237 | p = ASN1_STRING_get0_data(a->value.octet_string); |
| 238 | ret = ASN1_STRING_length(a->value.octet_string); | 238 | ret = ASN1_STRING_length(a->value.octet_string); |
| 239 | if (ret < max_len) | 239 | if (ret < max_len) |
| 240 | num = ret; | 240 | num = ret; |
| @@ -298,7 +298,7 @@ ASN1_TYPE_get_int_octetstring(const ASN1_TYPE *at, long *num, unsigned char *dat | |||
| 298 | len = ASN1_STRING_length(ios->value); | 298 | len = ASN1_STRING_length(ios->value); |
| 299 | if (len > max_len) | 299 | if (len > max_len) |
| 300 | len = max_len; | 300 | len = max_len; |
| 301 | memcpy(data, ASN1_STRING_data(ios->value), len); | 301 | memcpy(data, ASN1_STRING_get0_data(ios->value), len); |
| 302 | } | 302 | } |
| 303 | 303 | ||
| 304 | ret = ASN1_STRING_length(ios->value); | 304 | ret = ASN1_STRING_length(ios->value); |
diff --git a/src/lib/libcrypto/asn1/p8_pkey.c b/src/lib/libcrypto/asn1/p8_pkey.c index bdb0c39ad5..a5e82ef7ff 100644 --- a/src/lib/libcrypto/asn1/p8_pkey.c +++ b/src/lib/libcrypto/asn1/p8_pkey.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p8_pkey.c,v 1.25 2024/07/08 14:48:49 beck Exp $ */ | 1 | /* $OpenBSD: p8_pkey.c,v 1.26 2025/12/05 14:19:27 tb 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 | */ |
| @@ -168,7 +168,7 @@ PKCS8_pkey_get0(const ASN1_OBJECT **ppkalg, const unsigned char **pk, | |||
| 168 | if (ppkalg != NULL) | 168 | if (ppkalg != NULL) |
| 169 | *ppkalg = p8->pkeyalg->algorithm; | 169 | *ppkalg = p8->pkeyalg->algorithm; |
| 170 | if (pk != NULL) { | 170 | if (pk != NULL) { |
| 171 | *pk = ASN1_STRING_data(p8->pkey); | 171 | *pk = ASN1_STRING_get0_data(p8->pkey); |
| 172 | *ppklen = ASN1_STRING_length(p8->pkey); | 172 | *ppklen = ASN1_STRING_length(p8->pkey); |
| 173 | } | 173 | } |
| 174 | if (pa != NULL) | 174 | if (pa != NULL) |
