diff options
author | jsing <> | 2015-07-24 15:51:49 +0000 |
---|---|---|
committer | jsing <> | 2015-07-24 15:51:49 +0000 |
commit | 82aa6bf66c75dde9769f9c2eea0a9e7a9502d70c (patch) | |
tree | ea8e923acd49ff87c796788195e38c7fb6052957 /src/lib/libcrypto/ecdsa | |
parent | 69f8a103298106869ae8f84c3c47cd591bfbb4be (diff) | |
download | openbsd-82aa6bf66c75dde9769f9c2eea0a9e7a9502d70c.tar.gz openbsd-82aa6bf66c75dde9769f9c2eea0a9e7a9502d70c.tar.bz2 openbsd-82aa6bf66c75dde9769f9c2eea0a9e7a9502d70c.zip |
Expand ASN.1 template macros - no change in generated assembly.
Diffstat (limited to 'src/lib/libcrypto/ecdsa')
-rw-r--r-- | src/lib/libcrypto/ecdsa/ecs_asn1.c | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/src/lib/libcrypto/ecdsa/ecs_asn1.c b/src/lib/libcrypto/ecdsa/ecs_asn1.c index 4cd5c1bd21..34c3ce0497 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.4 2015/02/10 04:01:26 jsing Exp $ */ | 1 | /* $OpenBSD: ecs_asn1.c,v 1.5 2015/07/24 15:51:49 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 | * |
@@ -57,10 +57,32 @@ | |||
57 | #include <openssl/err.h> | 57 | #include <openssl/err.h> |
58 | #include <openssl/asn1t.h> | 58 | #include <openssl/asn1t.h> |
59 | 59 | ||
60 | ASN1_SEQUENCE(ECDSA_SIG) = { | 60 | static const ASN1_TEMPLATE ECDSA_SIG_seq_tt[] = { |
61 | ASN1_SIMPLE(ECDSA_SIG, r, CBIGNUM), | 61 | { |
62 | ASN1_SIMPLE(ECDSA_SIG, s, CBIGNUM) | 62 | .flags = 0, |
63 | } ASN1_SEQUENCE_END(ECDSA_SIG) | 63 | .tag = 0, |
64 | .offset = offsetof(ECDSA_SIG, r), | ||
65 | .field_name = "r", | ||
66 | .item = &CBIGNUM_it, | ||
67 | }, | ||
68 | { | ||
69 | .flags = 0, | ||
70 | .tag = 0, | ||
71 | .offset = offsetof(ECDSA_SIG, s), | ||
72 | .field_name = "s", | ||
73 | .item = &CBIGNUM_it, | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | const ASN1_ITEM ECDSA_SIG_it = { | ||
78 | .itype = ASN1_ITYPE_SEQUENCE, | ||
79 | .utype = V_ASN1_SEQUENCE, | ||
80 | .templates = ECDSA_SIG_seq_tt, | ||
81 | .tcount = sizeof(ECDSA_SIG_seq_tt) / sizeof(ASN1_TEMPLATE), | ||
82 | .funcs = NULL, | ||
83 | .size = sizeof(ECDSA_SIG), | ||
84 | .sname = "ECDSA_SIG", | ||
85 | }; | ||
64 | 86 | ||
65 | DECLARE_ASN1_FUNCTIONS_const(ECDSA_SIG) | 87 | DECLARE_ASN1_FUNCTIONS_const(ECDSA_SIG) |
66 | DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECDSA_SIG, ECDSA_SIG) | 88 | DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECDSA_SIG, ECDSA_SIG) |