diff options
| author | tb <> | 2022-01-08 21:36:39 +0000 |
|---|---|---|
| committer | tb <> | 2022-01-08 21:36:39 +0000 |
| commit | 1d65cb0d3a77508bfc0bdcbc93feeea4c4cb6c2a (patch) | |
| tree | 466830b7a7d27e0ddc854b19bef96adc5c6550cf /src/lib/libcrypto/objects/objects.h | |
| parent | a86a04576d7e4fd3e48b1285a0a5593180210f5e (diff) | |
| download | openbsd-1d65cb0d3a77508bfc0bdcbc93feeea4c4cb6c2a.tar.gz openbsd-1d65cb0d3a77508bfc0bdcbc93feeea4c4cb6c2a.tar.bz2 openbsd-1d65cb0d3a77508bfc0bdcbc93feeea4c4cb6c2a.zip | |
Prepare to provide OBJ_length() and OBJ_get0_data()
OBJ_length() turns the int obj->length into a size_t, so add
an overflow check. While obj->length should never be negative,
who knows...
ok jsing
Diffstat (limited to 'src/lib/libcrypto/objects/objects.h')
| -rw-r--r-- | src/lib/libcrypto/objects/objects.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/libcrypto/objects/objects.h b/src/lib/libcrypto/objects/objects.h index 7a7ba82652..2aaaefd96b 100644 --- a/src/lib/libcrypto/objects/objects.h +++ b/src/lib/libcrypto/objects/objects.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: objects.h,v 1.13 2022/01/08 15:34:59 tb Exp $ */ | 1 | /* $OpenBSD: objects.h,v 1.14 2022/01/08 21:36:39 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 | * |
| @@ -1105,6 +1105,11 @@ int OBJ_create(const char *oid, const char *sn, const char *ln); | |||
| 1105 | void OBJ_cleanup(void); | 1105 | void OBJ_cleanup(void); |
| 1106 | int OBJ_create_objects(BIO *in); | 1106 | int OBJ_create_objects(BIO *in); |
| 1107 | 1107 | ||
| 1108 | #if defined(LIBRESSL_CRYPTO_INTERNAL) || defined(LIBRESSL_NEXT_API) | ||
| 1109 | size_t OBJ_length(const ASN1_OBJECT *obj); | ||
| 1110 | const unsigned char *OBJ_get0_data(const ASN1_OBJECT *obj); | ||
| 1111 | #endif | ||
| 1112 | |||
| 1108 | int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid); | 1113 | int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid); |
| 1109 | int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid); | 1114 | int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid); |
| 1110 | int OBJ_add_sigid(int signid, int dig_id, int pkey_id); | 1115 | int OBJ_add_sigid(int signid, int dig_id, int pkey_id); |
