SSP21-CPP
HandshakeError.h
1 //
2 // _ _ ______ _ _ _ _ _ _ _
3 // | \ | | | ____| | (_) | (_) | | | |
4 // | \| | ___ | |__ __| |_| |_ _ _ __ __ _| | | |
5 // | . ` |/ _ \ | __| / _` | | __| | '_ \ / _` | | | |
6 // | |\ | (_) | | |___| (_| | | |_| | | | | (_| |_|_|_|
7 // |_| \_|\___/ |______\__,_|_|\__|_|_| |_|\__, (_|_|_)
8 // __/ |
9 // |___/
10 //
11 // This file is auto-generated. Do not edit manually
12 //
13 // Licensed under the terms of the BSDv3 license
14 //
15 
16 #ifndef SSP21_HANDSHAKEERROR_H
17 #define SSP21_HANDSHAKEERROR_H
18 
19 #include <cstdint>
20 #include "ser4cpp/util/Uncopyable.h"
21 
22 namespace ssp21 {
23 
24 /**
25  Denotes an error condition that occurred during the handshake process
26 */
27 enum class HandshakeError : uint8_t
28 {
29  /// A received handshake message was malformed in some manner
30  bad_message_format = 0x0,
31  /// The requested version is not supported
32  unsupported_version = 0x1,
33  /// The requested handshake ephemeral is not supported or doesn't match the handshake mode
35  /// The requested handshake hash is not supported
37  /// The requested handshake KDF is not supported
39  /// The requested session mode is not supported
41  /// The requested nonce verification mode is not supported
43  /// The requested handshake mode is not supported
45  /// One of the received certificates was improperly encoded
47  /// One of the received certificates was improperly encoded
49  /// One of the received certificates utilizes an unsupported feature
51  /// The outstation was unable to authenticate the master
53  /// The master requested handshake auth, but no prior handshake begin was received
55  /// In shared-secret mode, the requested key id (mode_data) was not found
56  key_not_found = 0xE,
57  /// This value gets used internally in ssp21-cpp only
58  none = 0xFD,
59  /// value not defined
60  undefined = 0xFE,
61  /// internal error
62  internal = 0xFF
63 };
64 
65 inline bool any(HandshakeError value)
66 {
67  return value != HandshakeError::none;
68 }
69 
71 {
73 
74  static uint8_t to_type(HandshakeError arg);
75  static HandshakeError from_type(uint8_t arg);
76  static const char* to_string(HandshakeError arg);
77 };
78 
79 }
80 
81 #endif
SSP21-cpp main namespace.
Definition: BufferTypes.h:12
Empty ephemeral used for QKD mode.
The outstation was unable to authenticate the master.
The master requested handshake auth, but no prior handshake begin was received.
The requested handshake KDF is not supported.
One of the received certificates was improperly encoded.
In shared-secret mode, the requested key id (mode_data) was not found.
The requested handshake hash is not supported.
The requested handshake ephemeral is not supported or doesn't match the handshake mode.
The requested session mode is not supported.
One of the received certificates was improperly encoded.
The requested version is not supported.
One of the received certificates utilizes an unsupported feature.
A received handshake message was malformed in some manner.
The requested nonce verification mode is not supported.
The requested handshake mode is not supported.