ua_plugin_pki.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. *
  5. * Copyright 2018 (c) Mark Giraud, Fraunhofer IOSB
  6. */
  7. #ifndef UA_PLUGIN_PKI_H_
  8. #define UA_PLUGIN_PKI_H_
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #include "ua_types.h"
  13. #include "ua_server.h"
  14. /**
  15. * Public Key Infrastructure Integration
  16. * =====================================
  17. * This file contains interface definitions for integration in a Public Key
  18. * Infrastructure (PKI). Currently only one plugin interface is defined.
  19. *
  20. * Certificate Verification
  21. * ------------------------
  22. * This plugin verifies that the origin of the certificate is trusted. It does
  23. * not assign any access rights/roles to the holder of the certificate.
  24. *
  25. * Usually, implementations of the certificate verification plugin provide an
  26. * initialization method that takes a trust-list and a revocation-list as input.
  27. * The lifecycle of the plugin is attached to a server or client config. The
  28. * ``deleteMembers`` method is called automatically when the config is
  29. * destroyed. */
  30. struct UA_CertificateVerification;
  31. typedef struct UA_CertificateVerification UA_CertificateVerification;
  32. struct UA_CertificateVerification {
  33. void *context;
  34. UA_StatusCode (*verifyCertificate)(void *verificationContext,
  35. const UA_ByteString *certificate);
  36. void (*deleteMembers)(UA_CertificateVerification *cv);
  37. };
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif /* UA_PLUGIN_PKI_H_ */