diff options
| author | tb <> | 2018-04-14 07:18:37 +0000 |
|---|---|---|
| committer | tb <> | 2018-04-14 07:18:37 +0000 |
| commit | e2303054291a1a9cf6ea192af2df63e77c3f65fd (patch) | |
| tree | 27f20ba7d1bd380c7995e6d349ae1b5f8b90cc6d /src/regress/lib/libcrypto/free/freenull.c | |
| parent | 0c5418014797b1fadca3f270eb2f140fd6f5bdf8 (diff) | |
| download | openbsd-e2303054291a1a9cf6ea192af2df63e77c3f65fd.tar.gz openbsd-e2303054291a1a9cf6ea192af2df63e77c3f65fd.tar.bz2 openbsd-e2303054291a1a9cf6ea192af2df63e77c3f65fd.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.c | 8 |
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); |
