asn_public.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* asn_public.h
  2. *
  3. * Copyright (C) 2006-2023 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. #endif /* WOLFSSL_CERT_GEN */
  49. #if defined(WOLFSSL_KEY_GEN) || defined(WOLFSSL_CERT_GEN)
  50. #define DerToPem wc_DerToPem
  51. #endif
  52. #ifdef HAVE_ECC
  53. /* private key helpers */
  54. #define EccPrivateKeyDecode wc_EccPrivateKeyDecode
  55. #define EccKeyToDer wc_EccKeyToDer
  56. #endif
  57. /* DER encode signature */
  58. #define EncodeSignature wc_EncodeSignature
  59. #define GetCTC_HashOID wc_GetCTC_HashOID
  60. #endif /* CTAO_CRYPT_ASN_PUBLIC_H */