mirror of https://github.com/openssl/openssl.git
				
				
				
			Use X509_cmp_time() in -checkend option, to support GeneralizedTime.
This commit is contained in:
		
							parent
							
								
									41c70d47d7
								
							
						
					
					
						commit
						a37e22d866
					
				|  | @ -999,9 +999,9 @@ bad: | ||||||
| 
 | 
 | ||||||
| 	if (checkend) | 	if (checkend) | ||||||
| 		{ | 		{ | ||||||
| 		time_t tnow=time(NULL); | 		time_t tcheck=time(NULL) + checkoffset; | ||||||
| 
 | 
 | ||||||
| 		if (ASN1_UTCTIME_cmp_time_t(X509_get_notAfter(x), tnow+checkoffset) == -1) | 		if (X509_cmp_time(X509_get_notAfter(x), &tcheck) < 0) | ||||||
| 			{ | 			{ | ||||||
| 			BIO_printf(out,"Certificate will expire\n"); | 			BIO_printf(out,"Certificate will expire\n"); | ||||||
| 			ret=1; | 			ret=1; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue