diff options
author | 2014-07-13 16:33:01 +0000 | |
---|---|---|
committer | 2014-07-13 16:33:01 +0000 | |
commit | 484525ad76009e0395d9ba81b4a41c1276bd2f0e (patch) | |
tree | fa899c7289946767194da58aa002d780e760318c /lib/libssl/src | |
parent | Rewrite i2d_SSL_SESSION to use the ASN1 primitives, rather than using the (diff) | |
download | wireguard-openbsd-484525ad76009e0395d9ba81b4a41c1276bd2f0e.tar.xz wireguard-openbsd-484525ad76009e0395d9ba81b4a41c1276bd2f0e.zip |
Expand the tlsext_sigalg macros. The end result is about the same number
of lines and much more readable.
ok miod@
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/ssl/t1_lib.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/lib/libssl/src/ssl/t1_lib.c b/lib/libssl/src/ssl/t1_lib.c index d82573fdb63..0966e78b4d1 100644 --- a/lib/libssl/src/ssl/t1_lib.c +++ b/lib/libssl/src/ssl/t1_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t1_lib.c,v 1.51 2014/07/13 16:03:10 beck Exp $ */ +/* $OpenBSD: t1_lib.c,v 1.52 2014/07/13 16:33:01 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -346,28 +346,31 @@ tls1_ec_nid2curve_id(int nid) } } - -/* List of supported signature algorithms and hashes. Should make this +/* + * List of supported signature algorithms and hashes. Should make this * customisable at some point, for now include everything we support. */ -#define tlsext_sigalg_rsa(md) md, TLSEXT_signature_rsa, +static unsigned char tls12_sigalgs[] = { + TLSEXT_hash_sha512, TLSEXT_signature_rsa, + TLSEXT_hash_sha512, TLSEXT_signature_dsa, + TLSEXT_hash_sha512, TLSEXT_signature_ecdsa, -#define tlsext_sigalg_dsa(md) md, TLSEXT_signature_dsa, + TLSEXT_hash_sha384, TLSEXT_signature_rsa, + TLSEXT_hash_sha384, TLSEXT_signature_dsa, + TLSEXT_hash_sha384, TLSEXT_signature_ecdsa, -#define tlsext_sigalg_ecdsa(md) md, TLSEXT_signature_ecdsa, + TLSEXT_hash_sha256, TLSEXT_signature_rsa, + TLSEXT_hash_sha256, TLSEXT_signature_dsa, + TLSEXT_hash_sha256, TLSEXT_signature_ecdsa, -#define tlsext_sigalg(md) \ - tlsext_sigalg_rsa(md) \ - tlsext_sigalg_dsa(md) \ - tlsext_sigalg_ecdsa(md) + TLSEXT_hash_sha224, TLSEXT_signature_rsa, + TLSEXT_hash_sha224, TLSEXT_signature_dsa, + TLSEXT_hash_sha224, TLSEXT_signature_ecdsa, -static unsigned char tls12_sigalgs[] = { - tlsext_sigalg(TLSEXT_hash_sha512) - tlsext_sigalg(TLSEXT_hash_sha384) - tlsext_sigalg(TLSEXT_hash_sha256) - tlsext_sigalg(TLSEXT_hash_sha224) - tlsext_sigalg(TLSEXT_hash_sha1) + TLSEXT_hash_sha1, TLSEXT_signature_rsa, + TLSEXT_hash_sha1, TLSEXT_signature_dsa, + TLSEXT_hash_sha1, TLSEXT_signature_ecdsa, }; int |