ua_plugin_pki.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. #ifndef UA_PLUGIN_PKI_H_
  5. #define UA_PLUGIN_PKI_H_
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. #include "ua_types.h"
  10. #include "ua_server.h"
  11. /**
  12. * Public Key Infrastructure Integration
  13. * =====================================
  14. * This file contains interface definitions for integration in a Public Key
  15. * Infrastructure (PKI). Currently only one plugin interface is defined.
  16. *
  17. * Certificate Verification
  18. * ------------------------
  19. * This plugin verifies that the origin of the certificate is trusted. It does
  20. * not assign any access rights/roles to the holder of the certificate.
  21. *
  22. * Usually, implementations of the certificate verification plugin provide an
  23. * initialization method that takes a trust-list and a revocation-list as input.
  24. * The lifecycle of the plugin is attached to a server or client config. The
  25. * ``deleteMembers`` method is called automatically when the config is
  26. * destroyed. */
  27. struct UA_CertificateVerification;
  28. typedef struct UA_CertificateVerification UA_CertificateVerification;
  29. struct UA_CertificateVerification {
  30. void *context;
  31. UA_StatusCode (*verifyCertificate)(void *verificationContext,
  32. const UA_ByteString *certificate);
  33. void (*deleteMembers)(UA_CertificateVerification *cv);
  34. };
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38. #endif /* UA_PLUGIN_PKI_H_ */