summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/free/freenull.c
diff options
context:
space:
mode:
authortb <>2018-04-14 07:18:37 +0000
committertb <>2018-04-14 07:18:37 +0000
commit1e9445503c3ea65f8c138ab5dc555db0f1db91a7 (patch)
tree27f20ba7d1bd380c7995e6d349ae1b5f8b90cc6d /src/regress/lib/libcrypto/free/freenull.c
parenta32b35170819e9b07e0183d19aee21b9a246943b (diff)
downloadopenbsd-1e9445503c3ea65f8c138ab5dc555db0f1db91a7.tar.gz
openbsd-1e9445503c3ea65f8c138ab5dc555db0f1db91a7.tar.bz2
openbsd-1e9445503c3ea65f8c138ab5dc555db0f1db91a7.zip
Make ENGINE_free() succeed on NULL. Matches OpenSSL's behavior and
simplifies the caller side. tested by & ok inoguchi; discussed with schwarze
Diffstat (limited to 'src/regress/lib/libcrypto/free/freenull.c')
-rw-r--r--src/regress/lib/libcrypto/free/freenull.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/regress/lib/libcrypto/free/freenull.c b/src/regress/lib/libcrypto/free/freenull.c
index 5fe6c1a3ed..89cbd82539 100644
--- a/src/regress/lib/libcrypto/free/freenull.c
+++ b/src/regress/lib/libcrypto/free/freenull.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: freenull.c,v 1.6 2018/02/07 05:07:39 jsing Exp $ */ 1/* $OpenBSD: freenull.c,v 1.7 2018/04/14 07:18:37 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2017 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2017 Bob Beck <beck@openbsd.org>
4 * 4 *
@@ -17,6 +17,9 @@
17 17
18#include <openssl/asn1.h> 18#include <openssl/asn1.h>
19#include <openssl/ocsp.h> 19#include <openssl/ocsp.h>
20#ifndef OPENSSL_NO_ENGINE
21#include <openssl/engine.h>
22#endif
20#include <openssl/pkcs12.h> 23#include <openssl/pkcs12.h>
21#include <openssl/ts.h> 24#include <openssl/ts.h>
22#include <openssl/ui.h> 25#include <openssl/ui.h>
@@ -55,6 +58,9 @@ main(int argc, char **argv)
55 EC_KEY_free(NULL); 58 EC_KEY_free(NULL);
56 EC_POINT_clear_free(NULL); 59 EC_POINT_clear_free(NULL);
57 EC_POINT_free(NULL); 60 EC_POINT_free(NULL);
61#ifndef OPENSSL_NO_ENGINE
62 ENGINE_free(NULL);
63#endif
58 EVP_CIPHER_CTX_free(NULL); 64 EVP_CIPHER_CTX_free(NULL);
59 EVP_PKEY_CTX_free(NULL); 65 EVP_PKEY_CTX_free(NULL);
60 EVP_PKEY_free(NULL); 66 EVP_PKEY_free(NULL);