Skip to content

Commit ad32c8a

Browse files
crypto: Handle EVP changes in OpenSSL 3
OpenSSL 3 changes the padding behavior of EVP_DecryptFinal_ex(), which causes our decryption to fail. It is the opnion of the OpenSSL developers that mod_auth_gssapi's use of this function was incorrect. Patch suggested by Tomáš Mráz. Related: openssl/openssl#16351 Signed-off-by: Robbie Harwood <rharwood@redhat.com>
1 parent a84b9a3 commit ad32c8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ apr_status_t UNSEAL_BUFFER(apr_pool_t *p, struct seal_key *skey,
262262

263263
totlen += outlen;
264264
outlen = plain->length - totlen;
265-
ret = EVP_DecryptFinal_ex(ctx, plain->value, &outlen);
265+
ret = EVP_DecryptFinal_ex(ctx, plain->value + totlen, &outlen);
266266
if (ret == 0) goto done;
267267

268268
totlen += outlen;

0 commit comments

Comments
 (0)