blob: db035ad583dfc1399b562c58fcec350aed035c15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
In the corner case that the global OpenSSL has an invalid command like
MinProtocol = TLSv1.0
(Due to OpenSSL's idiosyncrasies MinProtocol = TLSv1 would be correct)
the SSL_ctx_new function leaves the errors for parsing the config file
on the stack.
OpenSSL: error:14187180:SSL routines:ssl_do_config:bad value
Since the later functions, especially the one of loading the
certificates expected a clean error this error got reported at the
wrong place.
Print the warnings with crypto_msg when we detect that we are in this
situation (this also clears the stack).
---
src/openvpn/ssl_openssl.c | 10 ++++++++++
1 file changed, 10 insertions(+)
Index: trunk/src/openvpn/ssl_openssl.c
===================================================================
--- trunk.orig/src/openvpn/ssl_openssl.c
+++ trunk/src/openvpn/ssl_openssl.c
@@ -120,6 +120,11 @@ tls_ctx_server_new(struct tls_root_ctx *
crypto_msg(M_WARN, "Warning: TLS server context initialisation "
"has warnings.");
}
+ if (ERR_peek_error() != 0)
+ {
+ crypto_msg(M_WARN, "Warning: TLS server context initialisation "
+ "has warnings.");
+ }
}
void
@@ -135,6 +140,11 @@ tls_ctx_client_new(struct tls_root_ctx *
}
if (ERR_peek_error() != 0)
{
+ crypto_msg(M_WARN, "Warning: TLS client context initialisation "
+ "has warnings.");
+ }
+ if (ERR_peek_error() != 0)
+ {
crypto_msg(M_WARN, "Warning: TLS client context initialisation "
"has warnings.");
}
|