1 /* $NetBSD: crypto-headers.h,v 1.6 2023/06/19 23:10:48 christos Exp $ */ 2 3 #ifndef __crypto_header__ 4 #define __crypto_header__ 5 6 #ifndef PACKAGE_NAME 7 #error "need config.h" 8 #endif 9 10 #ifdef HAVE_HCRYPTO_W_OPENSSL 11 12 13 #define OPENSSL_DES_LIBDES_COMPATIBILITY 14 15 #include <openssl/evp.h> 16 #include <openssl/des.h> 17 #include <openssl/rc4.h> 18 #include <openssl/rc2.h> 19 #include <openssl/md4.h> 20 #include <openssl/md5.h> 21 #include <openssl/sha.h> 22 #include <openssl/ui.h> 23 #include <openssl/rand.h> 24 #include <openssl/engine.h> 25 #include <openssl/pkcs12.h> 26 #include <openssl/pem.h> 27 #include <openssl/hmac.h> 28 #include <openssl/ec.h> 29 #include <openssl/ecdsa.h> 30 #include <openssl/ecdh.h> 31 #if OPENSSL_VERSION_NUMBER < 0x10100000UL 32 # ifndef BN_is_negative 33 # define BN_set_negative(bn, flag) ((bn)->neg=(flag)?1:0) 34 # define BN_is_negative(bn) ((bn)->neg != 0) 35 # endif 36 #if OPENSSL_VERSION_NUMBER >= 0x30000000UL 37 # define EVP_rc4() EVP_CIPHER_fetch(NULL, "rc4", "provider=legacy") 38 #endif 39 #endif 40 41 #include <hcrypto/ui.h> 42 43 #else /* !HAVE_HCRYPTO_W_OPENSSL */ 44 45 #ifdef KRB5 46 #include <krb5/krb5-types.h> 47 #endif 48 49 #include <hcrypto/evp.h> 50 #include <hcrypto/des.h> 51 #include <hcrypto/md4.h> 52 #include <hcrypto/md5.h> 53 #include <hcrypto/sha.h> 54 #include <hcrypto/rc4.h> 55 #include <hcrypto/rc2.h> 56 #include <hcrypto/ui.h> 57 #include <hcrypto/rand.h> 58 #include <hcrypto/engine.h> 59 #include <hcrypto/pkcs12.h> 60 #include <hcrypto/hmac.h> 61 62 #endif 63 64 #endif /* __crypto_header__ */ 65