Properly handle missing SSL certificate
According to OpenSSL document (https://www.openssl.org/docs/manmaster/ssl/SSL_get_verify_result.html), when using SSL_get_verify_result(), the existence of certificate needs to be checked. However, in current code, it does not. Therefore, certificate existence check is required for correctly handling the exception. Closes #1549
This commit is contained in:
		
							parent
							
								
									0826e7d353
								
							
						
					
					
						commit
						50463ca832
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
					@ -569,9 +569,8 @@ ssl_do_connect (server * serv)
 | 
				
			||||||
							 NULL, 0);
 | 
												 NULL, 0);
 | 
				
			||||||
		} else
 | 
							} else
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			g_snprintf (buf, sizeof (buf), " * No Certificate");
 | 
								g_snprintf (buf, sizeof (buf), "No Certificate");
 | 
				
			||||||
			EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL,
 | 
								goto conn_fail;
 | 
				
			||||||
							 NULL, 0);
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		chiper_info = _SSL_get_cipher_info (serv->ssl);	/* static buffer */
 | 
							chiper_info = _SSL_get_cipher_info (serv->ssl);	/* static buffer */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue