summaryrefslogtreecommitdiffstats
path: root/crypto/ec/ec_asn1.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-10-27 18:51:04 +0000
committerDr. Stephen Henson <steve@openssl.org>2015-12-09 22:09:18 +0000
commit7236e3c8f78fbad0eedf8a78d783ee5d034f1661 (patch)
tree12c4c59e44e8fe30522a5fd97d0548adcd09df1b /crypto/ec/ec_asn1.c
parentef5b2ba6fb112ea1e433952ed81030bfe9dcc3f4 (diff)
Add ECDSA_SIG accessor.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/ec/ec_asn1.c')
-rw-r--r--crypto/ec/ec_asn1.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/crypto/ec/ec_asn1.c b/crypto/ec/ec_asn1.c
index 504fa3e7a5..8bd2de4e14 100644
--- a/crypto/ec/ec_asn1.c
+++ b/crypto/ec/ec_asn1.c
@@ -1303,8 +1303,6 @@ int i2o_ECPublicKey(EC_KEY *a, unsigned char **out)
return buf_len;
}
-#include <openssl/ecdsa.h>
-
ASN1_SEQUENCE(ECDSA_SIG) = {
ASN1_SIMPLE(ECDSA_SIG, r, CBIGNUM),
ASN1_SIMPLE(ECDSA_SIG, s, CBIGNUM)
@@ -1313,3 +1311,11 @@ ASN1_SEQUENCE(ECDSA_SIG) = {
DECLARE_ASN1_FUNCTIONS_const(ECDSA_SIG)
DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECDSA_SIG, ECDSA_SIG)
IMPLEMENT_ASN1_FUNCTIONS_const(ECDSA_SIG)
+
+void ECDSA_SIG_get0(BIGNUM **pr, BIGNUM **ps, ECDSA_SIG *sig)
+{
+ if (pr)
+ *pr = sig->r;
+ if (ps)
+ *ps = sig->s;
+}