Skip to content

Commit

Permalink
fixup! Further extend the SSL_free_buffers testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcaswell committed May 16, 2024
1 parent 8e40d82 commit 37defd3
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion test/sslbuffertest.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,19 @@
* or in the file LICENSE in the source distribution.
*/

/*
* We need access to the deprecated low level Engine APIs for legacy purposes
* when the deprecated calls are not hidden
*/
#ifndef OPENSSL_NO_DEPRECATED_3_0
# define OPENSSL_SUPPRESS_DEPRECATED
#endif

#include <string.h>
#include <openssl/ssl.h>
#include <openssl/bio.h>
#include <openssl/err.h>
#include <openssl/engine.h>

#include "internal/packet.h"

Expand Down Expand Up @@ -300,7 +309,13 @@ static int test_free_buffers(int test)
end:
SSL_free(clientssl);
SSL_free(serverssl);

#ifndef OPENSSL_NO_DYNAMIC_ENGINE
if (e != NULL) {
ENGINE_unregister_ciphers(e);
ENGINE_finish(e);
ENGINE_free(e);
}
#endif
return result;
}

Expand Down

0 comments on commit 37defd3

Please sign in to comment.