diff options
author | tb <> | 2024-05-09 20:56:52 +0000 |
---|---|---|
committer | tb <> | 2024-05-09 20:56:52 +0000 |
commit | c3bc07d8090f3567d7d5ac9be7bac3e82662d41f (patch) | |
tree | fe9c0545e64c2a28190c74a9238c8621c86a5ff8 /src | |
parent | cc1ccb3c131e74fcf78b37d834cb6cf83175ab37 (diff) | |
download | openbsd-c3bc07d8090f3567d7d5ac9be7bac3e82662d41f.tar.gz openbsd-c3bc07d8090f3567d7d5ac9be7bac3e82662d41f.tar.bz2 openbsd-c3bc07d8090f3567d7d5ac9be7bac3e82662d41f.zip |
Move openssl_dsa_meth below the methods it uses
no functional change
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_ossl.c | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_ossl.c b/src/lib/libcrypto/dsa/dsa_ossl.c index b92d0b8cee..3dad205a27 100644 --- a/src/lib/libcrypto/dsa/dsa_ossl.c +++ b/src/lib/libcrypto/dsa/dsa_ossl.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dsa_ossl.c,v 1.53 2023/08/03 18:53:55 tb Exp $ */ | 1 | /* $OpenBSD: dsa_ossl.c,v 1.54 2024/05/09 20:56:52 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -69,30 +69,6 @@ | |||
69 | #include "bn_local.h" | 69 | #include "bn_local.h" |
70 | #include "dsa_local.h" | 70 | #include "dsa_local.h" |
71 | 71 | ||
72 | static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa); | ||
73 | static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, | ||
74 | BIGNUM **rp); | ||
75 | static int dsa_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, | ||
76 | DSA *dsa); | ||
77 | static int dsa_init(DSA *dsa); | ||
78 | static int dsa_finish(DSA *dsa); | ||
79 | |||
80 | static DSA_METHOD openssl_dsa_meth = { | ||
81 | .name = "OpenSSL DSA method", | ||
82 | .dsa_do_sign = dsa_do_sign, | ||
83 | .dsa_sign_setup = dsa_sign_setup, | ||
84 | .dsa_do_verify = dsa_do_verify, | ||
85 | .init = dsa_init, | ||
86 | .finish = dsa_finish, | ||
87 | }; | ||
88 | |||
89 | const DSA_METHOD * | ||
90 | DSA_OpenSSL(void) | ||
91 | { | ||
92 | return &openssl_dsa_meth; | ||
93 | } | ||
94 | LCRYPTO_ALIAS(DSA_OpenSSL); | ||
95 | |||
96 | /* | 72 | /* |
97 | * Since DSA parameters are entirely arbitrary and checking them to be | 73 | * Since DSA parameters are entirely arbitrary and checking them to be |
98 | * consistent is very expensive, we cannot do so on every sign operation. | 74 | * consistent is very expensive, we cannot do so on every sign operation. |
@@ -436,6 +412,22 @@ dsa_finish(DSA *dsa) | |||
436 | return 1; | 412 | return 1; |
437 | } | 413 | } |
438 | 414 | ||
415 | static DSA_METHOD openssl_dsa_meth = { | ||
416 | .name = "OpenSSL DSA method", | ||
417 | .dsa_do_sign = dsa_do_sign, | ||
418 | .dsa_sign_setup = dsa_sign_setup, | ||
419 | .dsa_do_verify = dsa_do_verify, | ||
420 | .init = dsa_init, | ||
421 | .finish = dsa_finish, | ||
422 | }; | ||
423 | |||
424 | const DSA_METHOD * | ||
425 | DSA_OpenSSL(void) | ||
426 | { | ||
427 | return &openssl_dsa_meth; | ||
428 | } | ||
429 | LCRYPTO_ALIAS(DSA_OpenSSL); | ||
430 | |||
439 | DSA_SIG * | 431 | DSA_SIG * |
440 | DSA_SIG_new(void) | 432 | DSA_SIG_new(void) |
441 | { | 433 | { |