Commit a9edfc3ee96bb1e6223ad7295c2f8dee1a87ca60
1 parent
7b26407c
Exists in
master
and in
3 other branches
Fixing CRL expiration test.
Showing
1 changed file
with
1 additions
and
19 deletions
Show diff stats
src/lib3270/ssl/ctx_init.c
| @@ -119,7 +119,7 @@ int lib3270_check_X509_crl(H3270 *hSession, SSL_ERROR_MESSAGE * message) | @@ -119,7 +119,7 @@ int lib3270_check_X509_crl(H3270 *hSession, SSL_ERROR_MESSAGE * message) | ||
| 119 | const ASN1_TIME * next_update = X509_CRL_get0_nextUpdate(hSession->ssl.crl.cert); | 119 | const ASN1_TIME * next_update = X509_CRL_get0_nextUpdate(hSession->ssl.crl.cert); |
| 120 | #endif | 120 | #endif |
| 121 | 121 | ||
| 122 | - if(X509_cmp_current_time(next_update)) | 122 | + if(X509_cmp_current_time(next_update) == 1) |
| 123 | { | 123 | { |
| 124 | int day, sec; | 124 | int day, sec; |
| 125 | if(ASN1_TIME_diff(&day, &sec, NULL, next_update)) | 125 | if(ASN1_TIME_diff(&day, &sec, NULL, next_update)) |
| @@ -165,24 +165,6 @@ int lib3270_check_X509_crl(H3270 *hSession, SSL_ERROR_MESSAGE * message) | @@ -165,24 +165,6 @@ int lib3270_check_X509_crl(H3270 *hSession, SSL_ERROR_MESSAGE * message) | ||
| 165 | { | 165 | { |
| 166 | X509_STORE_add_crl(store, hSession->ssl.crl.cert); | 166 | X509_STORE_add_crl(store, hSession->ssl.crl.cert); |
| 167 | trace_ssl(hSession,"CRL was added to cert store\n"); | 167 | trace_ssl(hSession,"CRL was added to cert store\n"); |
| 168 | - | ||
| 169 | - //time_t next_update = ASN1_GetTimeT(X509_CRL_get0_nextUpdate(hSession->ssl.crl.cert)); | ||
| 170 | - | ||
| 171 | -#ifdef DEBUG | ||
| 172 | - { | ||
| 173 | - int day, sec; | ||
| 174 | - | ||
| 175 | - if(ASN1_TIME_diff(&day, &sec, NULL, X509_CRL_get0_nextUpdate(hSession->ssl.crl.cert))) | ||
| 176 | - { | ||
| 177 | - debug("CRL Expiration: %d day(x) %d second(s)",day,sec); | ||
| 178 | - } | ||
| 179 | - | ||
| 180 | - time_t now = time(NULL); | ||
| 181 | - debug("********************* CMP_TIME=%d",X509_cmp_time(X509_CRL_get0_nextUpdate(hSession->ssl.crl.cert), &now)); | ||
| 182 | - | ||
| 183 | - } | ||
| 184 | -#endif // DEBUG | ||
| 185 | - | ||
| 186 | } | 168 | } |
| 187 | 169 | ||
| 188 | X509_VERIFY_PARAM *param = X509_VERIFY_PARAM_new(); | 170 | X509_VERIFY_PARAM *param = X509_VERIFY_PARAM_new(); |