settings_comp.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* settings_comp.h
  2. *
  3. * Copyright (C) 2006-2021 wolfSSL Inc.
  4. *
  5. * This file is part of wolfSSL.
  6. *
  7. * wolfSSL is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * wolfSSL is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  20. */
  21. #ifndef CTAO_CRYPT_SETTINGS_C_H
  22. #define CTAO_CRYPT_SETTINGS_C_H
  23. /* since fips overrides rsa.h map compatibility here */
  24. #if !defined(NO_RSA)
  25. #ifdef WOLFSSL_KEY_GEN
  26. #define RsaKeyToDer wc_RsaKeyToDer
  27. #endif
  28. #define RsaPrivateKeyDecode wc_RsaPrivateKeyDecode
  29. #define RsaPublicKeyDecode wc_RsaPublicKeyDecode
  30. #define RsaPublicKeyDecodeRaw wc_RsaPublicKeyDecodeRaw
  31. #endif /* have rsa and HAVE_FIPS */
  32. /* Macro redefinitions for compatibility */
  33. #if defined(WOLFSSL_SHA512) && !defined(CYASSL_SHA512)
  34. #define CYASSL_SHA512
  35. #endif
  36. #if defined(WOLFSSL_SHA384) && !defined(CYASSL_SHA384)
  37. #define CYASSL_SHA384
  38. #endif
  39. #if defined(WOLFSSL_LEANPSK) && !defined(CYASSL_LEANPSK)
  40. #define CYASSL_LEANPSK
  41. #endif
  42. #if defined(NO_WOLFSSL_MEMORY) && !defined(NO_CYASSL_MEMORY)
  43. #define NO_CYASSL_MEMORY
  44. #endif
  45. #if defined(WOLFSSL_KEY_GEN) && !defined(CYASSL_KEY_GEN)
  46. #define CYASSL_KEY_GEN
  47. #endif
  48. /* AES */
  49. #if defined(WOLFSSL_AES_DIRECT) && !defined(CYASSL_AES_DIRECT)
  50. #define CYASSL_AES_DIRECT
  51. #endif
  52. #if defined(WOLFSSL_AES_COUNTER) && !defined(CYASSL_AES_COUNTER)
  53. #define CYASSL_AES_COUNTER
  54. #endif
  55. /* DES */
  56. #if defined(WOLFSSL_DES_ECB) && !defined(CYASSL_DES_ECB)
  57. #define CYASSL_DES_ECB
  58. #endif
  59. #endif /* CTAO_CRYPT_SETTINGS_C_H */