diff options
Diffstat (limited to 'src/regress/lib/libcrypto/free')
| -rw-r--r-- | src/regress/lib/libcrypto/free/Makefile | 29 | ||||
| -rw-r--r-- | src/regress/lib/libcrypto/free/freenull.awk | 60 | ||||
| -rw-r--r-- | src/regress/lib/libcrypto/free/freenull.c.head | 28 | ||||
| -rw-r--r-- | src/regress/lib/libcrypto/free/freenull.c.tail | 28 |
4 files changed, 0 insertions, 145 deletions
diff --git a/src/regress/lib/libcrypto/free/Makefile b/src/regress/lib/libcrypto/free/Makefile deleted file mode 100644 index 4e8a7ed38d..0000000000 --- a/src/regress/lib/libcrypto/free/Makefile +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.3 2018/08/31 17:35:21 tb Exp $ | ||
| 2 | |||
| 3 | TESTS = \ | ||
| 4 | freenull | ||
| 5 | |||
| 6 | PROG = ${TESTS} | ||
| 7 | |||
| 8 | REGRESS_TARGETS= all_tests | ||
| 9 | |||
| 10 | LDADD= -lcrypto | ||
| 11 | DPADD= ${LIBCRYPTO} ${LIBSSL} | ||
| 12 | LDFLAGS+= -lcrypto | ||
| 13 | CFLAGS+= -DLIBRESSL_INTERNAL | ||
| 14 | |||
| 15 | CLEANFILES+= freenull.c freenull.c.body freenull.c.tmp | ||
| 16 | |||
| 17 | freenull.c: freenull.awk ../../../../lib/libcrypto/Symbols.list | ||
| 18 | awk -f ${.CURDIR}/freenull.awk \ | ||
| 19 | < ${BSDSRCDIR}/lib/libcrypto/Symbols.list > freenull.c.body | ||
| 20 | cat ${.CURDIR}/freenull.c.head freenull.c.body \ | ||
| 21 | ${.CURDIR}/freenull.c.tail > freenull.c.tmp | ||
| 22 | mv freenull.c.tmp freenull.c | ||
| 23 | |||
| 24 | all_tests: ${TESTS} | ||
| 25 | @for test in $>; do \ | ||
| 26 | ./$$test; \ | ||
| 27 | done | ||
| 28 | |||
| 29 | .include <bsd.regress.mk> | ||
diff --git a/src/regress/lib/libcrypto/free/freenull.awk b/src/regress/lib/libcrypto/free/freenull.awk deleted file mode 100644 index 95719da956..0000000000 --- a/src/regress/lib/libcrypto/free/freenull.awk +++ /dev/null | |||
| @@ -1,60 +0,0 @@ | |||
| 1 | # $OpenBSD: freenull.awk,v 1.1 2018/07/10 20:53:30 tb Exp $ | ||
| 2 | # Copyright (c) 2018 Theo Buehler <tb@openbsd.org> | ||
| 3 | # | ||
| 4 | # Permission to use, copy, modify, and distribute this software for any | ||
| 5 | # purpose with or without fee is hereby granted, provided that the above | ||
| 6 | # copyright notice and this permission notice appear in all copies. | ||
| 7 | # | ||
| 8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 15 | |||
| 16 | # usage: awk -f freenull.awk < Symbols.list > freenull.c.body | ||
| 17 | |||
| 18 | # Skip this function because it calls abort(3). | ||
| 19 | /^CRYPTO_dbg_free/ { | ||
| 20 | next | ||
| 21 | } | ||
| 22 | |||
| 23 | # Skip *_free functions that take more than one or no argument. | ||
| 24 | /^ASN1_item_ex_free$/ || | ||
| 25 | /^ASN1_item_free$/ || | ||
| 26 | /^ASN1_primitive_free$/ || | ||
| 27 | /^ASN1_template_free$/ || | ||
| 28 | /^CONF_modules_free$/ || | ||
| 29 | /^EVP_PKEY_asn1_set_free$/ || | ||
| 30 | /^OBJ_sigid_free$/ || | ||
| 31 | /^X509V3_section_free$/ || | ||
| 32 | /^X509V3_string_free$/ || | ||
| 33 | /^asn1_enc_free$/ || | ||
| 34 | /^sk_pop_free$/ { | ||
| 35 | next | ||
| 36 | } | ||
| 37 | |||
| 38 | # Skip functions that are prototyped in a .c file. | ||
| 39 | /^BIO_CONNECT_free$/ || | ||
| 40 | /^CRYPTO_free$/ || | ||
| 41 | /^EC_PRIVATEKEY_free$/ || | ||
| 42 | /^ECPARAMETERS_free$/ || | ||
| 43 | /^ECPKPARAMETERS_free$/ || | ||
| 44 | /^NETSCAPE_ENCRYPTED_PKEY_free$/ || | ||
| 45 | /^NETSCAPE_PKEY_free$/ || | ||
| 46 | /^X9_62_CHARACTERISTIC_TWO_free$/ || | ||
| 47 | /^X9_62_PENTANOMIAL_free$/ { | ||
| 48 | next | ||
| 49 | } | ||
| 50 | |||
| 51 | /^ENGINE_free$/ { | ||
| 52 | printf("#ifndef OPENSSL_NO_ENGINE\n") | ||
| 53 | printf("\tENGINE_free(NULL);\n") | ||
| 54 | printf("#endif\n") | ||
| 55 | next | ||
| 56 | } | ||
| 57 | |||
| 58 | /_free$/ { | ||
| 59 | printf("\t%s(NULL);\n", $0) | ||
| 60 | } | ||
diff --git a/src/regress/lib/libcrypto/free/freenull.c.head b/src/regress/lib/libcrypto/free/freenull.c.head deleted file mode 100644 index 0331368e21..0000000000 --- a/src/regress/lib/libcrypto/free/freenull.c.head +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | /* $OpenBSD: freenull.c.head,v 1.3 2019/11/02 15:38:46 jsing Exp $ */ | ||
| 2 | |||
| 3 | #include <openssl/asn1.h> | ||
| 4 | #include <openssl/cmac.h> | ||
| 5 | #include <openssl/cms.h> | ||
| 6 | #include <openssl/comp.h> | ||
| 7 | #include <openssl/conf_api.h> | ||
| 8 | #include <openssl/dso.h> | ||
| 9 | #ifndef OPENSSL_NO_ENGINE | ||
| 10 | #include <openssl/engine.h> | ||
| 11 | #endif | ||
| 12 | #include <openssl/gost.h> | ||
| 13 | #include <openssl/hmac.h> | ||
| 14 | #include <openssl/ocsp.h> | ||
| 15 | #include <openssl/pkcs12.h> | ||
| 16 | #include <openssl/ts.h> | ||
| 17 | #include <openssl/ui.h> | ||
| 18 | #include <openssl/txt_db.h> | ||
| 19 | #include <openssl/x509.h> | ||
| 20 | #include <openssl/x509v3.h> | ||
| 21 | |||
| 22 | #include <err.h> | ||
| 23 | #include <stdio.h> | ||
| 24 | #include <string.h> | ||
| 25 | |||
| 26 | int | ||
| 27 | main(int argc, char **argv) | ||
| 28 | { | ||
diff --git a/src/regress/lib/libcrypto/free/freenull.c.tail b/src/regress/lib/libcrypto/free/freenull.c.tail deleted file mode 100644 index e83e9e4aa2..0000000000 --- a/src/regress/lib/libcrypto/free/freenull.c.tail +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | /* $OpenBSD: freenull.c.tail,v 1.2 2018/07/10 20:55:57 tb Exp $ */ | ||
| 2 | |||
| 3 | BIO_free_all(NULL); | ||
| 4 | NCONF_free_data(NULL); | ||
| 5 | _CONF_free_data(NULL); | ||
| 6 | |||
| 7 | lh_FUNCTION_free(NULL); | ||
| 8 | |||
| 9 | sk_ASN1_OBJECT_pop_free(NULL, NULL); | ||
| 10 | sk_CONF_VALUE_pop_free(NULL, NULL); | ||
| 11 | sk_GENERAL_NAME_pop_free(NULL, NULL); | ||
| 12 | sk_OCSP_CERTID_free(NULL); | ||
| 13 | sk_OPENSSL_STRING_free(NULL); | ||
| 14 | sk_PKCS12_SAFEBAG_pop_free(NULL, NULL); | ||
| 15 | sk_PKCS7_pop_free(NULL, NULL); | ||
| 16 | sk_X509_ATTRIBUTE_free(NULL); | ||
| 17 | sk_X509_CRL_pop_free(NULL, NULL); | ||
| 18 | sk_X509_EXTENSION_pop_free(NULL, NULL); | ||
| 19 | sk_X509_INFO_free(NULL); | ||
| 20 | sk_X509_INFO_pop_free(NULL, NULL); | ||
| 21 | sk_X509_NAME_ENTRY_pop_free(NULL, NULL); | ||
| 22 | sk_X509_free(NULL); | ||
| 23 | sk_X509_pop_free(NULL, NULL); | ||
| 24 | |||
| 25 | printf("PASS\n"); | ||
| 26 | |||
| 27 | return 0; | ||
| 28 | } | ||
