diff options
| author | tb <> | 2025-12-05 14:19:27 +0000 |
|---|---|---|
| committer | tb <> | 2025-12-05 14:19:27 +0000 |
| commit | 9d2d9214b79d3c58a92235befe0378b7ada96773 (patch) | |
| tree | 526d0c6e6e79d5cde410d3592176246f57583320 /src/lib/libcrypto/ts/ts_rsp_verify.c | |
| parent | f3f05f0cf8c30a990193e332e26fdd8e54b3f59b (diff) | |
| download | openbsd-9d2d9214b79d3c58a92235befe0378b7ada96773.tar.gz openbsd-9d2d9214b79d3c58a92235befe0378b7ada96773.tar.bz2 openbsd-9d2d9214b79d3c58a92235befe0378b7ada96773.zip | |
Replace trivial uses of ASN1_STRING_data()
Almost entirely mechanical diff that ensures that for read-only accesses
we use the const correct ASN1_STRING_get0_data(). Arguably, in most
places the better fix would be to reach into ASN1_STRING but then we
have to think and bikeshed...
ok beck kenjiro
Diffstat (limited to 'src/lib/libcrypto/ts/ts_rsp_verify.c')
| -rw-r--r-- | src/lib/libcrypto/ts/ts_rsp_verify.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ts/ts_rsp_verify.c b/src/lib/libcrypto/ts/ts_rsp_verify.c index d38bb3b460..e9a778bb88 100644 --- a/src/lib/libcrypto/ts/ts_rsp_verify.c +++ b/src/lib/libcrypto/ts/ts_rsp_verify.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ts_rsp_verify.c,v 1.31 2025/05/10 05:54:39 tb Exp $ */ | 1 | /* $OpenBSD: ts_rsp_verify.c,v 1.32 2025/12/05 14:19:27 tb Exp $ */ |
| 2 | /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL | 2 | /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL |
| 3 | * project 2002. | 3 | * project 2002. |
| 4 | */ | 4 | */ |
| @@ -667,7 +667,7 @@ TS_get_status_text(STACK_OF(ASN1_UTF8STRING) *text) | |||
| 667 | ASN1_UTF8STRING *current = sk_ASN1_UTF8STRING_value(text, i); | 667 | ASN1_UTF8STRING *current = sk_ASN1_UTF8STRING_value(text, i); |
| 668 | if (i > 0) | 668 | if (i > 0) |
| 669 | strlcat(result, "/", length); | 669 | strlcat(result, "/", length); |
| 670 | strlcat(result, (const char *)ASN1_STRING_data(current), length); | 670 | strlcat(result, (const char *)ASN1_STRING_get0_data(current), length); |
| 671 | } | 671 | } |
| 672 | return result; | 672 | return result; |
| 673 | } | 673 | } |
| @@ -771,7 +771,7 @@ TS_check_imprints(X509_ALGOR *algor_a, unsigned char *imprint_a, unsigned len_a, | |||
| 771 | 771 | ||
| 772 | /* Compare octet strings. */ | 772 | /* Compare octet strings. */ |
| 773 | ret = len_a == (unsigned) ASN1_STRING_length(b->hashed_msg) && | 773 | ret = len_a == (unsigned) ASN1_STRING_length(b->hashed_msg) && |
| 774 | memcmp(imprint_a, ASN1_STRING_data(b->hashed_msg), len_a) == 0; | 774 | memcmp(imprint_a, ASN1_STRING_get0_data(b->hashed_msg), len_a) == 0; |
| 775 | 775 | ||
| 776 | err: | 776 | err: |
| 777 | if (!ret) | 777 | if (!ret) |
