Skip to content

Commit

Permalink
BUG/MINOR: lua: Wrong OCSP CID after modifying an SSL certficate (LUA)
Browse files Browse the repository at this point in the history
This bugfix is the same as the following one:
    "BUG/MINOR: ssl_ckch: Wrong OCSP CID after modifying an SSL certficate"
where the OCSP CID had to be reset when updating a certificate.

Must be backported to 2.8.
  • Loading branch information
haproxyFred authored and wlallemand committed Dec 6, 2023
1 parent 75f5977 commit 917f7c7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hlua.c
Original file line number Diff line number Diff line change
Expand Up @@ -12911,6 +12911,13 @@ __LJMP static int hlua_ckch_set(lua_State *L)
goto end;
}

/* Reset the OCSP CID */
if (cert_ext->type == CERT_TYPE_PEM || cert_ext->type == CERT_TYPE_KEY ||
cert_ext->type == CERT_TYPE_ISSUER) {
OCSP_CERTID_free(new_ckchs->data->ocsp_cid);
new_ckchs->data->ocsp_cid = NULL;
}

/* apply the change on the duplicate */
if (cert_ext->load(filename, payload, data, &err) != 0) {
memprintf(&err, "%sCan't load the payload for '%s'", err ? err : "", cert_ext->ext);
Expand Down

0 comments on commit 917f7c7

Please sign in to comment.