testing_policy.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 OPEN62541_TESTING_POLICY_H
  5. #define OPEN62541_TESTING_POLICY_H
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. #include "ua_plugin_securitypolicy.h"
  10. #include "ua_plugin_log.h"
  11. typedef struct funcs_called {
  12. bool asym_enc;
  13. bool asym_dec;
  14. bool sym_enc;
  15. bool sym_dec;
  16. bool asym_sign;
  17. bool asym_verify;
  18. bool sym_sign;
  19. bool sym_verify;
  20. bool newContext;
  21. bool deleteContext;
  22. bool makeCertificateThumbprint;
  23. bool generateKey;
  24. bool generateNonce;
  25. bool setLocalSymEncryptingKey;
  26. bool setLocalSymSigningKey;
  27. bool setLocalSymIv;
  28. bool setRemoteSymEncryptingKey;
  29. bool setRemoteSymSigningKey;
  30. bool setRemoteSymIv;
  31. } funcs_called;
  32. typedef struct key_sizes {
  33. size_t sym_enc_blockSize;
  34. size_t sym_sig_keyLen;
  35. size_t sym_enc_keyLen;
  36. size_t asym_rmt_sig_size;
  37. size_t asym_lcl_sig_size;
  38. size_t asym_rmt_ptext_blocksize;
  39. size_t asym_rmt_blocksize;
  40. size_t asym_rmt_enc_key_size;
  41. size_t asym_lcl_enc_key_size;
  42. } key_sizes;
  43. UA_StatusCode UA_EXPORT
  44. TestingPolicy(UA_SecurityPolicy *policy, UA_ByteString localCertificate,
  45. funcs_called *fCalled, const key_sizes *kSizes);
  46. #ifdef __cplusplus
  47. }
  48. #endif
  49. #endif //OPEN62541_TESTING_POLICY_H