diff options
author | jsing <> | 2022-09-03 16:01:23 +0000 |
---|---|---|
committer | jsing <> | 2022-09-03 16:01:23 +0000 |
commit | d0cf54fdf2a9431fe817cbc6f9a450c5ae431bef (patch) | |
tree | d9f88e7afb11bde7d7ebd46c83b3f0037af70b32 /src | |
parent | 683000615ee42607c643c323988c280f7edb4247 (diff) | |
download | openbsd-d0cf54fdf2a9431fe817cbc6f9a450c5ae431bef.tar.gz openbsd-d0cf54fdf2a9431fe817cbc6f9a450c5ae431bef.tar.bz2 openbsd-d0cf54fdf2a9431fe817cbc6f9a450c5ae431bef.zip |
Stop using CBIGNUM_it internal to libcrypto.
CBIGNUM_it is supposed to be the "clear bignum" or "secure" bignum - that
is one which zeros its memory after use and ensures that the constant time
flags are set... in LibreSSL we always do both of these things for BIGNUMs,
so just use BIGNUM_it instead.
ok tb@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/asn1/asn1t.h | 7 | ||||
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_asn1.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/ecdsa/ecs_asn1.c | 6 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/lib/libcrypto/asn1/asn1t.h b/src/lib/libcrypto/asn1/asn1t.h index d02fde4ced..bb49be286f 100644 --- a/src/lib/libcrypto/asn1/asn1t.h +++ b/src/lib/libcrypto/asn1/asn1t.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: asn1t.h,v 1.21 2022/05/12 19:11:14 jsing Exp $ */ | 1 | /* $OpenBSD: asn1t.h,v 1.22 2022/09/03 16:01:23 jsing 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 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -882,11 +882,14 @@ extern const ASN1_ITEM ASN1_BOOLEAN_it; | |||
882 | extern const ASN1_ITEM ASN1_TBOOLEAN_it; | 882 | extern const ASN1_ITEM ASN1_TBOOLEAN_it; |
883 | extern const ASN1_ITEM ASN1_FBOOLEAN_it; | 883 | extern const ASN1_ITEM ASN1_FBOOLEAN_it; |
884 | extern const ASN1_ITEM ASN1_SEQUENCE_it; | 884 | extern const ASN1_ITEM ASN1_SEQUENCE_it; |
885 | extern const ASN1_ITEM CBIGNUM_it; | ||
886 | extern const ASN1_ITEM BIGNUM_it; | 885 | extern const ASN1_ITEM BIGNUM_it; |
887 | extern const ASN1_ITEM LONG_it; | 886 | extern const ASN1_ITEM LONG_it; |
888 | extern const ASN1_ITEM ZLONG_it; | 887 | extern const ASN1_ITEM ZLONG_it; |
889 | 888 | ||
889 | #ifndef LIBRESSL_INTERNAL | ||
890 | extern const ASN1_ITEM CBIGNUM_it; | ||
891 | #endif | ||
892 | |||
890 | DECLARE_STACK_OF(ASN1_VALUE) | 893 | DECLARE_STACK_OF(ASN1_VALUE) |
891 | 894 | ||
892 | /* Functions used internally by the ASN1 code */ | 895 | /* Functions used internally by the ASN1 code */ |
diff --git a/src/lib/libcrypto/dsa/dsa_asn1.c b/src/lib/libcrypto/dsa/dsa_asn1.c index daa970e316..47e544c9cb 100644 --- a/src/lib/libcrypto/dsa/dsa_asn1.c +++ b/src/lib/libcrypto/dsa/dsa_asn1.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dsa_asn1.c,v 1.24 2022/01/14 08:29:06 tb Exp $ */ | 1 | /* $OpenBSD: dsa_asn1.c,v 1.25 2022/09/03 16:01:23 jsing 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 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -97,14 +97,14 @@ static const ASN1_TEMPLATE DSA_SIG_seq_tt[] = { | |||
97 | .tag = 0, | 97 | .tag = 0, |
98 | .offset = offsetof(DSA_SIG, r), | 98 | .offset = offsetof(DSA_SIG, r), |
99 | .field_name = "r", | 99 | .field_name = "r", |
100 | .item = &CBIGNUM_it, | 100 | .item = &BIGNUM_it, |
101 | }, | 101 | }, |
102 | { | 102 | { |
103 | .flags = 0, | 103 | .flags = 0, |
104 | .tag = 0, | 104 | .tag = 0, |
105 | .offset = offsetof(DSA_SIG, s), | 105 | .offset = offsetof(DSA_SIG, s), |
106 | .field_name = "s", | 106 | .field_name = "s", |
107 | .item = &CBIGNUM_it, | 107 | .item = &BIGNUM_it, |
108 | }, | 108 | }, |
109 | }; | 109 | }; |
110 | 110 | ||
diff --git a/src/lib/libcrypto/ecdsa/ecs_asn1.c b/src/lib/libcrypto/ecdsa/ecs_asn1.c index 9a7a04468b..d4cbf1e308 100644 --- a/src/lib/libcrypto/ecdsa/ecs_asn1.c +++ b/src/lib/libcrypto/ecdsa/ecs_asn1.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecs_asn1.c,v 1.10 2022/01/05 20:39:04 tb Exp $ */ | 1 | /* $OpenBSD: ecs_asn1.c,v 1.11 2022/09/03 16:01:23 jsing Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 2000-2002 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2000-2002 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -63,14 +63,14 @@ static const ASN1_TEMPLATE ECDSA_SIG_seq_tt[] = { | |||
63 | .tag = 0, | 63 | .tag = 0, |
64 | .offset = offsetof(ECDSA_SIG, r), | 64 | .offset = offsetof(ECDSA_SIG, r), |
65 | .field_name = "r", | 65 | .field_name = "r", |
66 | .item = &CBIGNUM_it, | 66 | .item = &BIGNUM_it, |
67 | }, | 67 | }, |
68 | { | 68 | { |
69 | .flags = 0, | 69 | .flags = 0, |
70 | .tag = 0, | 70 | .tag = 0, |
71 | .offset = offsetof(ECDSA_SIG, s), | 71 | .offset = offsetof(ECDSA_SIG, s), |
72 | .field_name = "s", | 72 | .field_name = "s", |
73 | .item = &CBIGNUM_it, | 73 | .item = &BIGNUM_it, |
74 | }, | 74 | }, |
75 | }; | 75 | }; |
76 | 76 | ||