summaryrefslogtreecommitdiff
path: root/vchat-ssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vchat-ssl.c')
-rwxr-xr-xvchat-ssl.c12
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
311void vc_x509store_setflags(vc_x509store_t *store, int flags) 319void vc_x509store_setflags(vc_x509store_t *store, int flags)