mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 17:17:06 +02:00
BUG/MINOR: ssl: fix error messages for OCSP loading
The error messages for OCSP in ssl_sock_load_crt_file_into_ckch() add a double extension to the filename, that can be confusing. The messages reference a .issuer.issuer file.
This commit is contained in:
parent
f0eb3739ac
commit
786188f6bf
@ -3007,7 +3007,7 @@ static int ssl_sock_load_crt_file_into_ckch(const char *path, BIO *buf, struct c
|
|||||||
snprintf(fp, MAXPATHLEN+1, "%s.issuer", path);
|
snprintf(fp, MAXPATHLEN+1, "%s.issuer", path);
|
||||||
if (stat(fp, &st) == 0) {
|
if (stat(fp, &st) == 0) {
|
||||||
if (BIO_read_filename(in, fp) <= 0) {
|
if (BIO_read_filename(in, fp) <= 0) {
|
||||||
memprintf(err, "%s '%s.issuer' is present but cannot be read or parsed'.\n",
|
memprintf(err, "%s '%s' is present but cannot be read or parsed'.\n",
|
||||||
*err ? *err : "", fp);
|
*err ? *err : "", fp);
|
||||||
ret = 1;
|
ret = 1;
|
||||||
goto end;
|
goto end;
|
||||||
@ -3015,14 +3015,14 @@ static int ssl_sock_load_crt_file_into_ckch(const char *path, BIO *buf, struct c
|
|||||||
|
|
||||||
issuer = PEM_read_bio_X509_AUX(in, NULL, NULL, NULL);
|
issuer = PEM_read_bio_X509_AUX(in, NULL, NULL, NULL);
|
||||||
if (!issuer) {
|
if (!issuer) {
|
||||||
memprintf(err, "%s '%s.issuer' is present but cannot be read or parsed'.\n",
|
memprintf(err, "%s '%s' is present but cannot be read or parsed'.\n",
|
||||||
*err ? *err : "", fp);
|
*err ? *err : "", fp);
|
||||||
ret = 1;
|
ret = 1;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (X509_check_issued(ckch->ocsp_issuer, ckch->cert) != X509_V_OK) {
|
if (X509_check_issued(ckch->ocsp_issuer, ckch->cert) != X509_V_OK) {
|
||||||
memprintf(err, "%s '%s.issuer' is not an issuer'.\n",
|
memprintf(err, "%s '%s' is not an issuer'.\n",
|
||||||
*err ? *err : "", fp);
|
*err ? *err : "", fp);
|
||||||
ret = 1;
|
ret = 1;
|
||||||
goto end;
|
goto end;
|
||||||
|
Loading…
Reference in New Issue
Block a user