mirror of https://github.com/openssl/openssl.git
				
				
				
			PR: 1731 and maybe 2197
Clear error queue in a few places in SSL code where errors are expected so they don't stay in the queue.
This commit is contained in:
		
							parent
							
								
									162de2f2b5
								
							
						
					
					
						commit
						7b52778eff
					
				| 
						 | 
				
			
			@ -886,6 +886,8 @@ unsigned long dtls1_output_cert_chain(SSL *s, X509 *x)
 | 
			
		|||
  			}
 | 
			
		||||
  
 | 
			
		||||
		X509_verify_cert(&xs_ctx);
 | 
			
		||||
		/* Don't leave errors in the queue */
 | 
			
		||||
		ERR_clear_error();
 | 
			
		||||
		for (i=0; i < sk_X509_num(xs_ctx.chain); i++)
 | 
			
		||||
  			{
 | 
			
		||||
			x = sk_X509_value(xs_ctx.chain, i);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -352,6 +352,8 @@ unsigned long ssl3_output_cert_chain(SSL *s, X509 *x)
 | 
			
		|||
				return(0);
 | 
			
		||||
				}
 | 
			
		||||
			X509_verify_cert(&xs_ctx);
 | 
			
		||||
			/* Don't leave errors in the queue */
 | 
			
		||||
			ERR_clear_error();
 | 
			
		||||
			for (i=0; i < sk_X509_num(xs_ctx.chain); i++)
 | 
			
		||||
				{
 | 
			
		||||
				x = sk_X509_value(xs_ctx.chain, i);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -755,6 +755,8 @@ int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack,
 | 
			
		|||
			sk_X509_NAME_push(stack,xn);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	ERR_clear_error();
 | 
			
		||||
 | 
			
		||||
	if (0)
 | 
			
		||||
		{
 | 
			
		||||
err:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue