diff options
author | erdgeist <de@gsmk.de> | 2014-04-30 12:11:39 +0200 |
---|---|---|
committer | erdgeist <de@gsmk.de> | 2014-04-30 12:11:39 +0200 |
commit | 11ae08925e5c007eeadbaffc04a62e9d512d75c8 (patch) | |
tree | facecfb3c4521956275646446d52aa76362b5010 /vchat-ssl.c | |
parent | e3498cc30de01b4b8f5360eb31a18369107bbe2f (diff) | |
parent | 3c74b2a12a4a9e10fd768dad5ecb1f66f2be9afa (diff) |
merge github patches
Diffstat (limited to 'vchat-ssl.c')
-rwxr-xr-x | vchat-ssl.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/vchat-ssl.c b/vchat-ssl.c index 1a88b6c..91b25ba 100755 --- a/vchat-ssl.c +++ b/vchat-ssl.c | |||
@@ -163,7 +163,14 @@ int vc_connect_ssl( BIO **conn, vc_x509store_t *vc_store ) | |||
163 | /* Accept being connected, _if_ verification passed */ | 163 | /* Accept being connected, _if_ verification passed */ |
164 | if (sslp) { | 164 | if (sslp) { |
165 | long result = SSL_get_verify_result(sslp); | 165 | long result = SSL_get_verify_result(sslp); |
166 | 166 | #if 1 == 1 | |
167 | if (result == X509_V_OK) { | ||
168 | return 0; | ||
169 | } else if (getintoption(CF_IGNSSL)) { | ||
170 | writecf(FS_ERR, "[SSL VERIFY ERROR ] FAILURE IGNORED!!!"); | ||
171 | return 0; | ||
172 | } | ||
173 | #else | ||
167 | /* show & verify fingerprint */ | 174 | /* show & verify fingerprint */ |
168 | if (result == X509_V_OK) { | 175 | if (result == X509_V_OK) { |
169 | X509 *peercert = SSL_get_peer_certificate(sslp); | 176 | X509 *peercert = SSL_get_peer_certificate(sslp); |
@@ -227,6 +234,7 @@ int vc_connect_ssl( BIO **conn, vc_x509store_t *vc_store ) | |||
227 | } | 234 | } |
228 | } | 235 | } |
229 | } | 236 | } |
237 | #endif | ||
230 | } | 238 | } |
231 | } | 239 | } |
232 | } | 240 | } |
@@ -305,7 +313,7 @@ int vc_verify_callback(int ok, X509_STORE_CTX *store) | |||
305 | X509_verify_cert_error_string(store->error)); | 313 | X509_verify_cert_error_string(store->error)); |
306 | writecf(FS_ERR, tmpstr); | 314 | writecf(FS_ERR, tmpstr); |
307 | } | 315 | } |
308 | return ok; | 316 | return (ok | getintoption(CF_IGNSSL)); |
309 | } | 317 | } |
310 | 318 | ||
311 | void vc_x509store_setflags(vc_x509store_t *store, int flags) | 319 | void vc_x509store_setflags(vc_x509store_t *store, int flags) |