ua_securechannel.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef UA_SECURECHANNEL_H_
  2. #define UA_SECURECHANNEL_H_
  3. #include "ua_types_generated.h"
  4. #include "ua_transport.h"
  5. #include "ua_connection.h"
  6. /**
  7. * @ingroup internal
  8. *
  9. * @defgroup securechannel SecureChannel
  10. */
  11. struct UA_Session;
  12. typedef struct UA_Session UA_Session;
  13. struct UA_SecureChannel {
  14. UA_MessageSecurityMode securityMode;
  15. UA_ChannelSecurityToken securityToken; // the channelId is contained in the securityToken
  16. UA_AsymmetricAlgorithmSecurityHeader clientAsymAlgSettings;
  17. UA_AsymmetricAlgorithmSecurityHeader serverAsymAlgSettings;
  18. UA_ByteString clientNonce;
  19. UA_ByteString serverNonce;
  20. UA_UInt32 requestId;
  21. UA_UInt32 sequenceNumber;
  22. UA_Connection *connection; // make this more generic when http connections exist
  23. UA_Session *session;
  24. };
  25. UA_Int32 UA_SecureChannel_init(UA_SecureChannel *channel);
  26. UA_Int32 UA_SecureChannel_deleteMembers(UA_SecureChannel *channel);
  27. UA_Int32 UA_SecureChannel_delete(UA_SecureChannel *channel);
  28. UA_Boolean UA_SecureChannel_compare(UA_SecureChannel *sc1, UA_SecureChannel *sc2);
  29. UA_Int32 UA_SecureChannel_generateNonce(UA_ByteString *nonce);
  30. UA_Int32 UA_SecureChannel_updateRequestId(UA_SecureChannel *channel, UA_UInt32 requestId);
  31. UA_Int32 UA_SecureChannel_updateSequenceNumber(UA_SecureChannel *channel, UA_UInt32 sequenceNumber);
  32. #endif /* UA_SECURECHANNEL_H_ */