ua_transport_binary_secure.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. #ifndef OPCUA_TRANSPORT_BINARY_SECURE_H_
  2. #define OPCUA_TRANSPORT_BINARY_SECURE_H_
  3. #include "ua_types.h"
  4. #include "ua_transport.h"
  5. #include "ua_transport_binary.h"
  6. typedef struct {
  7. UA_UInt32 secureChannelId;
  8. UA_SymmetricAlgorithmSecurityHeader tokenId;
  9. UA_DateTime createdAt;
  10. UA_Int32 revisedLifetime;
  11. } SL_ChannelSecurityToken;
  12. typedef struct SL_Channel {
  13. UA_String secureChannelId;
  14. TL_Connection* tlConnection;
  15. Session *session; // equals UA_Null iff no session is active
  16. UA_AsymmetricAlgorithmSecurityHeader remoteAsymAlgSettings;
  17. UA_AsymmetricAlgorithmSecurityHeader localAsymAlgSettings;
  18. UA_SequenceHeader sequenceHeader;
  19. UA_UInt32 securityMode;
  20. UA_ByteString remoteNonce;
  21. UA_ByteString localNonce;
  22. UA_UInt32 connectionState;
  23. SL_ChannelSecurityToken securityToken;
  24. } SL_Channel;
  25. UA_Int32 SL_Process(SL_Channel* channel, const UA_ByteString* msg, UA_UInt32* offset);
  26. UA_Int32 SL_Channel_new(TL_Connection *connection, const UA_ByteString* msg, UA_UInt32* offset); // this function is called from the OpenSecureChannel service
  27. #endif /* OPCUA_TRANSPORT_BINARY_SECURE_H_ */