diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/ecdsa/ecdsa.h | 7 | ||||
| -rw-r--r-- | src/lib/libcrypto/ecdsa/ecs_asn1.c | 14 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ecdsa/ecdsa.h b/src/lib/libcrypto/ecdsa/ecdsa.h index c4e107eee5..7b0a25468a 100644 --- a/src/lib/libcrypto/ecdsa/ecdsa.h +++ b/src/lib/libcrypto/ecdsa/ecdsa.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ecdsa.h,v 1.8 2019/01/19 01:17:41 tb Exp $ */ | 1 | /* $OpenBSD: ecdsa.h,v 1.9 2022/01/05 20:39:04 tb Exp $ */ |
| 2 | /** | 2 | /** |
| 3 | * \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions | 3 | * \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions |
| 4 | * \author Written by Nils Larsch for the OpenSSL project | 4 | * \author Written by Nils Larsch for the OpenSSL project |
| @@ -140,6 +140,11 @@ ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len); | |||
| 140 | */ | 140 | */ |
| 141 | void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); | 141 | void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); |
| 142 | 142 | ||
| 143 | #if defined(LIBRESSL_OPAQUE_ECDSA) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 144 | const BIGNUM *ECDSA_SIG_get0_r(const ECDSA_SIG *sig); | ||
| 145 | const BIGNUM *ECDSA_SIG_get0_s(const ECDSA_SIG *sig); | ||
| 146 | #endif | ||
| 147 | |||
| 143 | /** Setter for r and s fields of ECDSA_SIG | 148 | /** Setter for r and s fields of ECDSA_SIG |
| 144 | * \param sig pointer to ECDSA_SIG pointer | 149 | * \param sig pointer to ECDSA_SIG pointer |
| 145 | * \param r pointer to BIGNUM for r (may be NULL) | 150 | * \param r pointer to BIGNUM for r (may be NULL) |
diff --git a/src/lib/libcrypto/ecdsa/ecs_asn1.c b/src/lib/libcrypto/ecdsa/ecs_asn1.c index e463858669..9a7a04468b 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.9 2018/03/17 15:24:44 tb Exp $ */ | 1 | /* $OpenBSD: ecs_asn1.c,v 1.10 2022/01/05 20:39:04 tb 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 | * |
| @@ -123,6 +123,18 @@ ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps) | |||
| 123 | *ps = sig->s; | 123 | *ps = sig->s; |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | const BIGNUM * | ||
| 127 | ECDSA_SIG_get0_r(const ECDSA_SIG *sig) | ||
| 128 | { | ||
| 129 | return sig->r; | ||
| 130 | } | ||
| 131 | |||
| 132 | const BIGNUM * | ||
| 133 | ECDSA_SIG_get0_s(const ECDSA_SIG *sig) | ||
| 134 | { | ||
| 135 | return sig->s; | ||
| 136 | } | ||
| 137 | |||
| 126 | int | 138 | int |
| 127 | ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s) | 139 | ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s) |
| 128 | { | 140 | { |
