opcua_secureChannelLayer.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * opcua_secureChannelLayer.h
  3. *
  4. * Created on: Dec 19, 2013
  5. * Author: opcua
  6. */
  7. #ifndef OPCUA_SECURECHANNELLAYER_H_
  8. #define OPCUA_SECURECHANNELLAYER_H_
  9. #include "opcua_advancedDatatypes.h"
  10. #include "opcua_encodingLayer.h"
  11. #include "opcua_connectionHelper.h"
  12. static const Int32 SL_HEADER_LENGTH = 0;
  13. typedef struct _SL_OpenSecureChannelResponse
  14. {
  15. UInt32 ServerProtocolVersion;
  16. SL_ChannelSecurityToken SecurityToken;
  17. UA_String ServerNonce;
  18. }SL_Response;
  19. typedef struct _SL_SecureConversationMessageHeader
  20. {
  21. UInt32 MessageType;
  22. Byte IsFinal;
  23. UInt32 MessageSize;
  24. UInt32 SecureChannelId;
  25. }SL_SecureConversationMessageHeader;
  26. typedef struct _SL_AsymmetricAlgorithmSecurityHeader
  27. {
  28. UA_String SecurityPolicyUri;
  29. UA_String SenderCertificate;
  30. UA_String ReceiverThumbprint;
  31. }SL_AsymmetricAlgorithmSecurityHeader;
  32. typedef struct _SL_SequenceHeader
  33. {
  34. UInt32 SequenceNumber;
  35. UInt32 RequestId;
  36. }SL_SequenceHeader;
  37. /*
  38. * optional, only if there is encryption present
  39. */
  40. typedef struct _SL_AsymmetricAlgorithmSecurityFooter
  41. {
  42. Byte PaddingSize;
  43. Byte *Padding;
  44. UInt32 SignatureSize;
  45. Byte *Signature;
  46. }SL_AsymmetricAlgorithmSecurityFooter;
  47. /*
  48. typedef struct _SL_ResponseHeader
  49. {
  50. UA_DateTime timestamp;
  51. IntegerId requestHandle;
  52. UA_StatusCode serviceResult;
  53. UA_DiagnosticInfo serviceDiagnostics;
  54. UA_String *stringTable;
  55. UInt32 stringTableLength;
  56. UA_ExtensionObject additionalHeader;
  57. }SL_ResponseHeader;
  58. */
  59. #endif /* OPCUA_SECURECHANNELLAYER_H_ */