diff options
author | jsing <> | 2022-06-25 16:15:18 +0000 |
---|---|---|
committer | jsing <> | 2022-06-25 16:15:18 +0000 |
commit | 1d19a6a87bdf14afc50458119a6f47ca1a457aca (patch) | |
tree | e24f4023b782fb3ac866ff68d41b7cd10522ac52 /src/lib/libcrypto/asn1/asn1.h | |
parent | 3ab41ace1e3881927ef311ca2f0e8f2a30cf07a1 (diff) | |
download | openbsd-1d19a6a87bdf14afc50458119a6f47ca1a457aca.tar.gz openbsd-1d19a6a87bdf14afc50458119a6f47ca1a457aca.tar.bz2 openbsd-1d19a6a87bdf14afc50458119a6f47ca1a457aca.zip |
Reuse ASN1_INTEGER functions for ASN1_ENUMERATED_{get,set}()
Instead of having a separate get/set implementation, reuse the ASN1_INTEGER
code. Also prepare to provide ASN1_ENUMERATED_{get,set}_int64().
ok beck@ tb@
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/asn1/asn1.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/asn1.h b/src/lib/libcrypto/asn1/asn1.h index d6adb0d22e..0db0b1d8fe 100644 --- a/src/lib/libcrypto/asn1/asn1.h +++ b/src/lib/libcrypto/asn1/asn1.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: asn1.h,v 1.63 2022/06/25 15:39:12 jsing Exp $ */ | 1 | /* $OpenBSD: asn1.h,v 1.64 2022/06/25 16:15:18 jsing 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 | * |
@@ -759,6 +759,10 @@ long ASN1_INTEGER_get(const ASN1_INTEGER *a); | |||
759 | ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai); | 759 | ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai); |
760 | BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn); | 760 | BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn); |
761 | 761 | ||
762 | #ifdef LIBRESSL_INTERNAL | ||
763 | int ASN1_ENUMERATED_get_int64(int64_t *out_val, const ASN1_ENUMERATED *aenum); | ||
764 | int ASN1_ENUMERATED_set_int64(ASN1_ENUMERATED *aenum, int64_t val); | ||
765 | #endif | ||
762 | int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v); | 766 | int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v); |
763 | long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a); | 767 | long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a); |
764 | ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai); | 768 | ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai); |