asn_public.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* asn_public.h
  2. *
  3. * Copyright (C) 2006-2020 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_ASN_PUBLIC_H
  22. #define CTAO_CRYPT_ASN_PUBLIC_H
  23. /* pull in compatibility for each of the includes */
  24. #include <cyassl/ctaocrypt/types.h>
  25. #include <cyassl/ctaocrypt/types.h>
  26. #include <cyassl/ctaocrypt/ecc.h>
  27. #ifdef WOLFSSL_CERT_GEN
  28. #include <cyassl/ctaocrypt/rsa.h>
  29. #endif
  30. #include <wolfssl/wolfcrypt/asn_public.h>
  31. #ifdef WOLFSSL_CERT_GEN
  32. #define InitCert wc_InitCert
  33. #define MakeCert wc_MakeCert
  34. #ifdef WOLFSSL_CERT_REQ
  35. #define MakeCertReq wc_MakeCertReq
  36. #endif
  37. #define SignCert wc_SignCert
  38. #define MakeSelfCert wc_MakeSelfCert
  39. #define SetIssuer wc_SetIssuer
  40. #define SetSubject wc_SetSubject
  41. #ifdef WOLFSSL_ALT_NAMES
  42. #define SetAltNames wc_SetAltNames
  43. #endif
  44. #define SetIssuerBuffer wc_SetIssuerBuffer
  45. #define SetSubjectBuffer wc_SetSubjectBuffer
  46. #define SetAltNamesBuffer wc_SetAltNamesBuffer
  47. #define SetDatesBuffer wc_SetDatesBuffer
  48. #ifdef HAVE_NTRU
  49. #define MakeNtruCert wc_MakeNtruCert
  50. #endif
  51. #endif /* WOLFSSL_CERT_GEN */
  52. #if defined(WOLFSSL_KEY_GEN) || defined(WOLFSSL_CERT_GEN)
  53. #define DerToPem wc_DerToPem
  54. #endif
  55. #ifdef HAVE_ECC
  56. /* private key helpers */
  57. #define EccPrivateKeyDecode wc_EccPrivateKeyDecode
  58. #define EccKeyToDer wc_EccKeyToDer
  59. #endif
  60. /* DER encode signature */
  61. #define EncodeSignature wc_EncodeSignature
  62. #define GetCTC_HashOID wc_GetCTC_HashOID
  63. #endif /* CTAO_CRYPT_ASN_PUBLIC_H */