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_verify_ctx.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_verify_ctx.c')
| -rw-r--r-- | src/lib/libcrypto/ts/ts_verify_ctx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ts/ts_verify_ctx.c b/src/lib/libcrypto/ts/ts_verify_ctx.c index 23e2557308..b2b160c511 100644 --- a/src/lib/libcrypto/ts/ts_verify_ctx.c +++ b/src/lib/libcrypto/ts/ts_verify_ctx.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ts_verify_ctx.c,v 1.15 2025/05/10 05:54:39 tb Exp $ */ | 1 | /* $OpenBSD: ts_verify_ctx.c,v 1.16 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 2003. | 3 | * project 2003. |
| 4 | */ | 4 | */ |
| @@ -215,7 +215,7 @@ TS_REQ_to_TS_VERIFY_CTX(TS_REQ *req, TS_VERIFY_CTX *ctx) | |||
| 215 | ret->imprint_len = ASN1_STRING_length(msg); | 215 | ret->imprint_len = ASN1_STRING_length(msg); |
| 216 | if (!(ret->imprint = malloc(ret->imprint_len))) | 216 | if (!(ret->imprint = malloc(ret->imprint_len))) |
| 217 | goto err; | 217 | goto err; |
| 218 | memcpy(ret->imprint, ASN1_STRING_data(msg), ret->imprint_len); | 218 | memcpy(ret->imprint, ASN1_STRING_get0_data(msg), ret->imprint_len); |
| 219 | 219 | ||
| 220 | /* Setting nonce. */ | 220 | /* Setting nonce. */ |
| 221 | if ((nonce = TS_REQ_get_nonce(req)) != NULL) { | 221 | if ((nonce = TS_REQ_get_nonce(req)) != NULL) { |
