View | Details | Raw Unified | Return to bug 198401
Collapse All | Expand All

(-)security/sslscan/files/patch-sslscan.c (-2 / +112 lines)
Lines 1-5 Link Here
1
--- ./sslscan.c.orig	2009-09-01 14:35:59.000000000 +0200
1
--- sslscan.c.orig	2009-09-01 14:35:59.000000000 +0200
2
+++ ./sslscan.c	2011-06-21 17:36:13.000000000 +0200
2
+++ sslscan.c	2015-03-07 23:26:34.286277205 +0100
3
@@ -41,6 +41,7 @@
3
@@ -41,6 +41,7 @@
4
 #include <openssl/pkcs12.h>
4
 #include <openssl/pkcs12.h>
5
 #include <openssl/x509.h>
5
 #include <openssl/x509.h>
Lines 8-10 Link Here
8
 
8
 
9
 // Defines...
9
 // Defines...
10
 #define false 0
10
 #define false 0
11
@@ -563,6 +564,7 @@
12
 					}
13
 					if (options->xmlOutput != 0)
14
 						fprintf(options->xmlOutput, " sslversion=\"");
15
+#ifndef OPENSSL_NO_SSL2
16
 					if (sslCipherPointer->sslMethod == SSLv2_client_method())
17
 					{
18
 						if (options->xmlOutput != 0)
19
@@ -571,8 +573,11 @@
20
 							printf("SSLv2 || ");
21
 						else
22
 							printf("SSLv2  ");
23
-					}
24
-					else if (sslCipherPointer->sslMethod == SSLv3_client_method())
25
+					} 
26
+					else
27
+#endif
28
+#ifndef OPENSSL_NO_SSL3
29
+					if (sslCipherPointer->sslMethod == SSLv3_client_method())
30
 					{
31
 						if (options->xmlOutput != 0)
32
 							fprintf(options->xmlOutput, "SSLv3\" bits=\"");
33
@@ -582,6 +587,7 @@
34
 							printf("SSLv3  ");
35
 					}
36
 					else
37
+#endif
38
 					{
39
 						if (options->xmlOutput != 0)
40
 							fprintf(options->xmlOutput, "TLSv1\" bits=\"");
41
@@ -688,6 +694,7 @@
42
 						cipherStatus = SSL_connect(ssl);
43
 						if (cipherStatus == 1)
44
 						{
45
+#ifndef OPENSSL_NO_SSL2
46
 							if (sslMethod == SSLv2_client_method())
47
 							{
48
 								if (options->xmlOutput != 0)
49
@@ -697,7 +704,10 @@
50
 								else
51
 									printf("    SSLv2  ");
52
 							}
53
-							else if (sslMethod == SSLv3_client_method())
54
+							else 
55
+#endif
56
+#ifndef OPENSSL_NO_SSL3
57
+							if (sslMethod == SSLv3_client_method())
58
 							{
59
 								if (options->xmlOutput != 0)
60
 									fprintf(options->xmlOutput, "  <defaultcipher sslversion=\"SSLv3\" bits=\"");
61
@@ -707,6 +717,7 @@
62
 									printf("    SSLv3  ");
63
 							}
64
 							else
65
+#endif
66
 							{
67
 								if (options->xmlOutput != 0)
68
 									fprintf(options->xmlOutput, "  <defaultcipher sslversion=\"TLSv1\" bits=\"");
69
@@ -1192,18 +1203,26 @@
70
 		switch (options->sslVersion)
71
 		{
72
 			case ssl_all:
73
+#ifndef OPENSSL_NO_SSL2
74
 				status = defaultCipher(options, SSLv2_client_method());
75
 				if (status != false)
76
+#endif
77
+#ifndef OPENSSL_NO_SSL3
78
 					status = defaultCipher(options, SSLv3_client_method());
79
 				if (status != false)
80
+#endif
81
 					status = defaultCipher(options, TLSv1_client_method());
82
 				break;
83
+#ifndef OPENSSL_NO_SSL2
84
 			case ssl_v2:
85
 				status = defaultCipher(options, SSLv2_client_method());
86
 				break;
87
+#endif
88
+#ifndef OPENSSL_NO_SSL3
89
 			case ssl_v3:
90
 				status = defaultCipher(options, SSLv3_client_method());
91
 				break;
92
+#endif
93
 			case tls_v1:
94
 				status = defaultCipher(options, TLSv1_client_method());
95
 				break;
96
@@ -1415,16 +1434,24 @@
97
 			switch (options.sslVersion)
98
 			{
99
 				case ssl_all:
100
+#ifndef OPENSSL_NO_SSL2
101
 					populateCipherList(&options, SSLv2_client_method());
102
+#endif
103
+#ifndef OPENSSL_NO_SSL3
104
 					populateCipherList(&options, SSLv3_client_method());
105
+#endif
106
 					populateCipherList(&options, TLSv1_client_method());
107
 					break;
108
+#ifndef OPENSSL_NO_SSL2
109
 				case ssl_v2:
110
 					populateCipherList(&options, SSLv2_client_method());
111
 					break;
112
+#endif
113
+#ifndef OPENSSL_NO_SSL3
114
 				case ssl_v3:
115
 					populateCipherList(&options, SSLv3_client_method());
116
 					break;
117
+#endif
118
 				case tls_v1:
119
 					populateCipherList(&options, TLSv1_client_method());
120
 					break;

Return to bug 198401