summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa
diff options
context:
space:
mode:
authorjsing <>2014-07-11 08:44:49 +0000
committerjsing <>2014-07-11 08:44:49 +0000
commit8c3482db610348be15fb633bb52b0511c2cabbcf (patch)
tree0e726f9e971e00f4c8cd8afab71589803fc11b7f /src/lib/libcrypto/dsa
parenta336cdb63c1fe5d934826147bf5c19d317ced73b (diff)
downloadopenbsd-8c3482db610348be15fb633bb52b0511c2cabbcf.tar.gz
openbsd-8c3482db610348be15fb633bb52b0511c2cabbcf.tar.bz2
openbsd-8c3482db610348be15fb633bb52b0511c2cabbcf.zip
Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number of includes into the source files that actually need them. While here, also sort/group/tidy the includes. ok beck@ miod@
Diffstat (limited to 'src/lib/libcrypto/dsa')
-rw-r--r--src/lib/libcrypto/dsa/dsa_ameth.c10
-rw-r--r--src/lib/libcrypto/dsa/dsa_asn1.c7
-rw-r--r--src/lib/libcrypto/dsa/dsa_depr.c5
-rw-r--r--src/lib/libcrypto/dsa/dsa_gen.c6
-rw-r--r--src/lib/libcrypto/dsa/dsa_key.c4
-rw-r--r--src/lib/libcrypto/dsa/dsa_lib.c12
-rw-r--r--src/lib/libcrypto/dsa/dsa_ossl.c9
-rw-r--r--src/lib/libcrypto/dsa/dsa_pmeth.c11
-rw-r--r--src/lib/libcrypto/dsa/dsa_prn.c7
-rw-r--r--src/lib/libcrypto/dsa/dsa_sign.c5
-rw-r--r--src/lib/libcrypto/dsa/dsa_vrf.c3
11 files changed, 41 insertions, 38 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_ameth.c b/src/lib/libcrypto/dsa/dsa_ameth.c
index 1f08585e5f..73c58ec94c 100644
--- a/src/lib/libcrypto/dsa/dsa_ameth.c
+++ b/src/lib/libcrypto/dsa/dsa_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_ameth.c,v 1.11 2014/07/10 22:45:56 jsing Exp $ */ 1/* $OpenBSD: dsa_ameth.c,v 1.12 2014/07/11 08:44:48 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -60,14 +60,16 @@
60 60
61#include <openssl/opensslconf.h> 61#include <openssl/opensslconf.h>
62 62
63#include "cryptlib.h"
64#include <openssl/x509.h>
65#include <openssl/asn1.h> 63#include <openssl/asn1.h>
66#include <openssl/dsa.h>
67#include <openssl/bn.h> 64#include <openssl/bn.h>
65#include <openssl/dsa.h>
66#include <openssl/err.h>
67#include <openssl/x509.h>
68
68#ifndef OPENSSL_NO_CMS 69#ifndef OPENSSL_NO_CMS
69#include <openssl/cms.h> 70#include <openssl/cms.h>
70#endif 71#endif
72
71#include "asn1_locl.h" 73#include "asn1_locl.h"
72 74
73static int 75static int
diff --git a/src/lib/libcrypto/dsa/dsa_asn1.c b/src/lib/libcrypto/dsa/dsa_asn1.c
index cc03f29823..bbe091b928 100644
--- a/src/lib/libcrypto/dsa/dsa_asn1.c
+++ b/src/lib/libcrypto/dsa/dsa_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_asn1.c,v 1.11 2014/07/09 10:16:24 miod Exp $ */ 1/* $OpenBSD: dsa_asn1.c,v 1.12 2014/07/11 08:44:48 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -57,10 +57,11 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include "cryptlib.h" 60
61#include <openssl/dsa.h>
62#include <openssl/asn1.h> 61#include <openssl/asn1.h>
63#include <openssl/asn1t.h> 62#include <openssl/asn1t.h>
63#include <openssl/dsa.h>
64#include <openssl/err.h>
64#include <openssl/rand.h> 65#include <openssl/rand.h>
65 66
66/* Override the default new methods */ 67/* Override the default new methods */
diff --git a/src/lib/libcrypto/dsa/dsa_depr.c b/src/lib/libcrypto/dsa/dsa_depr.c
index d8ac6f9d92..472e329207 100644
--- a/src/lib/libcrypto/dsa/dsa_depr.c
+++ b/src/lib/libcrypto/dsa/dsa_depr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_depr.c,v 1.5 2014/07/10 22:45:56 jsing Exp $ */ 1/* $OpenBSD: dsa_depr.c,v 1.6 2014/07/11 08:44:48 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -63,10 +63,9 @@
63 63
64#ifndef OPENSSL_NO_SHA 64#ifndef OPENSSL_NO_SHA
65 65
66#include "cryptlib.h"
67#include <openssl/evp.h>
68#include <openssl/bn.h> 66#include <openssl/bn.h>
69#include <openssl/dsa.h> 67#include <openssl/dsa.h>
68#include <openssl/evp.h>
70#include <openssl/rand.h> 69#include <openssl/rand.h>
71#include <openssl/sha.h> 70#include <openssl/sha.h>
72 71
diff --git a/src/lib/libcrypto/dsa/dsa_gen.c b/src/lib/libcrypto/dsa/dsa_gen.c
index 491b4de5f9..d41e7562e1 100644
--- a/src/lib/libcrypto/dsa/dsa_gen.c
+++ b/src/lib/libcrypto/dsa/dsa_gen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_gen.c,v 1.14 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: dsa_gen.c,v 1.15 2014/07/11 08:44:48 jsing 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 *
@@ -63,11 +63,11 @@
63#include <stdio.h> 63#include <stdio.h>
64#include <string.h> 64#include <string.h>
65 65
66#include "cryptlib.h"
67#include <openssl/evp.h>
68#include <openssl/bn.h> 66#include <openssl/bn.h>
67#include <openssl/evp.h>
69#include <openssl/rand.h> 68#include <openssl/rand.h>
70#include <openssl/sha.h> 69#include <openssl/sha.h>
70
71#include "dsa_locl.h" 71#include "dsa_locl.h"
72 72
73int 73int
diff --git a/src/lib/libcrypto/dsa/dsa_key.c b/src/lib/libcrypto/dsa/dsa_key.c
index 723e1888df..4573ecbcce 100644
--- a/src/lib/libcrypto/dsa/dsa_key.c
+++ b/src/lib/libcrypto/dsa/dsa_key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_key.c,v 1.17 2014/07/10 22:45:56 jsing Exp $ */ 1/* $OpenBSD: dsa_key.c,v 1.18 2014/07/11 08:44:48 jsing 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 *
@@ -61,8 +61,8 @@
61 61
62#include <openssl/opensslconf.h> 62#include <openssl/opensslconf.h>
63 63
64#include "cryptlib.h"
65#ifndef OPENSSL_NO_SHA 64#ifndef OPENSSL_NO_SHA
65
66#include <openssl/bn.h> 66#include <openssl/bn.h>
67#include <openssl/dsa.h> 67#include <openssl/dsa.h>
68#include <openssl/rand.h> 68#include <openssl/rand.h>
diff --git a/src/lib/libcrypto/dsa/dsa_lib.c b/src/lib/libcrypto/dsa/dsa_lib.c
index 3bf8427d4c..97307134cd 100644
--- a/src/lib/libcrypto/dsa/dsa_lib.c
+++ b/src/lib/libcrypto/dsa/dsa_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_lib.c,v 1.19 2014/07/10 22:45:56 jsing Exp $ */ 1/* $OpenBSD: dsa_lib.c,v 1.20 2014/07/11 08:44:48 jsing 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 *
@@ -62,16 +62,16 @@
62 62
63#include <openssl/opensslconf.h> 63#include <openssl/opensslconf.h>
64 64
65#include "cryptlib.h" 65#include <openssl/asn1.h>
66#include <openssl/bn.h> 66#include <openssl/bn.h>
67#include <openssl/dsa.h> 67#include <openssl/dsa.h>
68#include <openssl/asn1.h> 68
69#ifndef OPENSSL_NO_ENGINE
70#include <openssl/engine.h>
71#endif
72#ifndef OPENSSL_NO_DH 69#ifndef OPENSSL_NO_DH
73#include <openssl/dh.h> 70#include <openssl/dh.h>
74#endif 71#endif
72#ifndef OPENSSL_NO_ENGINE
73#include <openssl/engine.h>
74#endif
75 75
76static const DSA_METHOD *default_DSA_method = NULL; 76static const DSA_METHOD *default_DSA_method = NULL;
77 77
diff --git a/src/lib/libcrypto/dsa/dsa_ossl.c b/src/lib/libcrypto/dsa/dsa_ossl.c
index 17119eb187..5bff836c50 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.19 2014/07/09 10:16:24 miod Exp $ */ 1/* $OpenBSD: dsa_ossl.c,v 1.20 2014/07/11 08:44:48 jsing 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 *
@@ -59,12 +59,13 @@
59/* Original version from Steven Schoch <schoch@sheba.arc.nasa.gov> */ 59/* Original version from Steven Schoch <schoch@sheba.arc.nasa.gov> */
60 60
61#include <stdio.h> 61#include <stdio.h>
62#include "cryptlib.h" 62
63#include <openssl/asn1.h>
63#include <openssl/bn.h> 64#include <openssl/bn.h>
64#include <openssl/sha.h>
65#include <openssl/dsa.h> 65#include <openssl/dsa.h>
66#include <openssl/err.h>
66#include <openssl/rand.h> 67#include <openssl/rand.h>
67#include <openssl/asn1.h> 68#include <openssl/sha.h>
68 69
69static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa); 70static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);
70static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, 71static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
diff --git a/src/lib/libcrypto/dsa/dsa_pmeth.c b/src/lib/libcrypto/dsa/dsa_pmeth.c
index 2e44e8d5dd..c7a2edfc94 100644
--- a/src/lib/libcrypto/dsa/dsa_pmeth.c
+++ b/src/lib/libcrypto/dsa/dsa_pmeth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_pmeth.c,v 1.9 2014/07/10 13:58:22 jsing Exp $ */ 1/* $OpenBSD: dsa_pmeth.c,v 1.10 2014/07/11 08:44:48 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -60,13 +60,14 @@
60#include <stdio.h> 60#include <stdio.h>
61#include <string.h> 61#include <string.h>
62 62
63#include "cryptlib.h"
64#include <openssl/asn1t.h> 63#include <openssl/asn1t.h>
65#include <openssl/x509.h>
66#include <openssl/evp.h>
67#include <openssl/bn.h> 64#include <openssl/bn.h>
68#include "evp_locl.h" 65#include <openssl/err.h>
66#include <openssl/evp.h>
67#include <openssl/x509.h>
68
69#include "dsa_locl.h" 69#include "dsa_locl.h"
70#include "evp_locl.h"
70 71
71/* DSA pkey context structure */ 72/* DSA pkey context structure */
72 73
diff --git a/src/lib/libcrypto/dsa/dsa_prn.c b/src/lib/libcrypto/dsa/dsa_prn.c
index 5a7423c831..60f4e6c760 100644
--- a/src/lib/libcrypto/dsa/dsa_prn.c
+++ b/src/lib/libcrypto/dsa/dsa_prn.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_prn.c,v 1.4 2014/07/09 10:16:24 miod Exp $ */ 1/* $OpenBSD: dsa_prn.c,v 1.5 2014/07/11 08:44:48 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -57,9 +57,10 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include "cryptlib.h" 60
61#include <openssl/evp.h>
62#include <openssl/dsa.h> 61#include <openssl/dsa.h>
62#include <openssl/err.h>
63#include <openssl/evp.h>
63 64
64int 65int
65DSA_print_fp(FILE *fp, const DSA *x, int off) 66DSA_print_fp(FILE *fp, const DSA *x, int off)
diff --git a/src/lib/libcrypto/dsa/dsa_sign.c b/src/lib/libcrypto/dsa/dsa_sign.c
index 40223a1d59..efeb35477c 100644
--- a/src/lib/libcrypto/dsa/dsa_sign.c
+++ b/src/lib/libcrypto/dsa/dsa_sign.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_sign.c,v 1.16 2014/07/09 10:16:24 miod Exp $ */ 1/* $OpenBSD: dsa_sign.c,v 1.17 2014/07/11 08:44:48 jsing 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 *
@@ -58,10 +58,9 @@
58 58
59/* Original version from Steven Schoch <schoch@sheba.arc.nasa.gov> */ 59/* Original version from Steven Schoch <schoch@sheba.arc.nasa.gov> */
60 60
61#include "cryptlib.h" 61#include <openssl/bn.h>
62#include <openssl/dsa.h> 62#include <openssl/dsa.h>
63#include <openssl/rand.h> 63#include <openssl/rand.h>
64#include <openssl/bn.h>
65 64
66DSA_SIG * 65DSA_SIG *
67DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) 66DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
diff --git a/src/lib/libcrypto/dsa/dsa_vrf.c b/src/lib/libcrypto/dsa/dsa_vrf.c
index b82fa41259..1965338f1f 100644
--- a/src/lib/libcrypto/dsa/dsa_vrf.c
+++ b/src/lib/libcrypto/dsa/dsa_vrf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_vrf.c,v 1.15 2014/07/09 10:16:24 miod Exp $ */ 1/* $OpenBSD: dsa_vrf.c,v 1.16 2014/07/11 08:44:48 jsing 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 *
@@ -58,7 +58,6 @@
58 58
59/* Original version from Steven Schoch <schoch@sheba.arc.nasa.gov> */ 59/* Original version from Steven Schoch <schoch@sheba.arc.nasa.gov> */
60 60
61#include "cryptlib.h"
62#include <openssl/dsa.h> 61#include <openssl/dsa.h>
63 62
64int 63int