pki_default.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
  2. * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
  3. *
  4. * Copyright 2018 (c) Mark Giraud, Fraunhofer IOSB
  5. * Copyright 2019 (c) Kalycito Infotech Private Limited
  6. */
  7. #ifndef UA_PKI_CERTIFICATE_H_
  8. #define UA_PKI_CERTIFICATE_H_
  9. #include <open62541/plugin/pki.h>
  10. _UA_BEGIN_DECLS
  11. /* Default implementation that accepts all certificates */
  12. UA_EXPORT void
  13. UA_CertificateVerification_AcceptAll(UA_CertificateVerification *cv);
  14. #ifdef UA_ENABLE_ENCRYPTION
  15. /* Accept certificates based on a trust-list and a revocation-list. Based on
  16. * mbedTLS. */
  17. UA_EXPORT UA_StatusCode
  18. UA_CertificateVerification_Trustlist(UA_CertificateVerification *cv,
  19. const UA_ByteString *certificateTrustList,
  20. size_t certificateTrustListSize,
  21. const UA_ByteString *certificateIssuerList,
  22. size_t certificateIssuerListSize,
  23. const UA_ByteString *certificateRevocationList,
  24. size_t certificateRevocationListSize);
  25. #if __linux__ /* Linux only so far */
  26. UA_EXPORT UA_StatusCode
  27. UA_CertificateVerification_CertFolders(UA_CertificateVerification *cv,
  28. const char *trustListFolder,
  29. const char *issuerListFolder,
  30. const char *revocationListFolder);
  31. #endif
  32. #endif
  33. _UA_END_DECLS
  34. #endif /* UA_PKI_CERTIFICATE_H_ */