Skip to content

Commit

Permalink
Merge d248472 into 2addf00
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-apple authored Sep 10, 2021
2 parents 2addf00 + d248472 commit 1039542
Show file tree
Hide file tree
Showing 5 changed files with 357 additions and 242 deletions.
8 changes: 4 additions & 4 deletions src/messaging/ApplicationExchangeDispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ bool ApplicationExchangeDispatch::MessagePermitted(uint16_t protocol, uint8_t ty
{
case static_cast<uint8_t>(Protocols::SecureChannel::MsgType::PBKDFParamRequest):
case static_cast<uint8_t>(Protocols::SecureChannel::MsgType::PBKDFParamResponse):
case static_cast<uint8_t>(Protocols::SecureChannel::MsgType::PASE_Spake2p1):
case static_cast<uint8_t>(Protocols::SecureChannel::MsgType::PASE_Spake2p2):
case static_cast<uint8_t>(Protocols::SecureChannel::MsgType::PASE_Spake2p3):
case static_cast<uint8_t>(Protocols::SecureChannel::MsgType::PASE_Spake2pError):
case static_cast<uint8_t>(Protocols::SecureChannel::MsgType::PASE_Pake1):
case static_cast<uint8_t>(Protocols::SecureChannel::MsgType::PASE_Pake2):
case static_cast<uint8_t>(Protocols::SecureChannel::MsgType::PASE_Pake3):
case static_cast<uint8_t>(Protocols::SecureChannel::MsgType::PASE_PakeError):
case static_cast<uint8_t>(Protocols::SecureChannel::MsgType::CASE_SigmaR1):
case static_cast<uint8_t>(Protocols::SecureChannel::MsgType::CASE_SigmaR2):
case static_cast<uint8_t>(Protocols::SecureChannel::MsgType::CASE_SigmaR3):
Expand Down
15 changes: 10 additions & 5 deletions src/protocols/secure_channel/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ enum class MsgType : uint8_t
// Password-based session establishment Message Types
PBKDFParamRequest = 0x20,
PBKDFParamResponse = 0x21,
PASE_Spake2p1 = 0x22,
PASE_Spake2p2 = 0x23,
PASE_Spake2p3 = 0x24,
PASE_Spake2pError = 0x2F,
PASE_Pake1 = 0x22,
PASE_Pake2 = 0x23,
PASE_Pake3 = 0x24,
PASE_PakeError = 0x2F,

// Certificate-based session establishment Message Types
CASE_SigmaR1 = 0x30,
Expand All @@ -72,7 +72,12 @@ enum class MsgType : uint8_t
};

// Placeholder value for the ProtocolCode field when the GeneralCode is Success or Continue.
constexpr uint16_t kProtocolCodeSuccess = 0x0000;
constexpr uint16_t kProtocolCodeSuccess = 0x0000;
constexpr uint16_t kProtocolCodeNoSharedRoot = 0x0001;
constexpr uint16_t kProtocolCodeInvalidParam = 0x0002;
constexpr uint16_t kProtocolCodeCloseSession = 0x0003;
constexpr uint16_t kProtocolCodeBusy = 0x0004;
constexpr uint16_t kProtocolCodeSessionNotFound = 0x0005;

// Placeholder value for the ProtocolCode field when there is no additional protocol-specific code to provide more information.
constexpr uint16_t kProtocolCodeGeneralFailure = 0xFFFF;
Expand Down
Loading

0 comments on commit 1039542

Please sign in to comment.