38 LOG3(
"Adding HMAC auth info");
42 Com__Seagate__Kinetic__Proto__Message* msg = &pdu->message.message;
45 msg->hmacauth = &pdu->message.hmacAuth;
47 msg->hmacauth = msg->hmacauth;
50 msg->has_authtype =
true;
57 msg->hmacauth = &pdu->message.hmacAuth;
59 msg->hmacauth->hmac = (ProtobufCBinaryData) {
60 .data = pdu->message.hmacData,
64 msg->hmacauth->has_hmac =
true;
65 msg->hmacauth->identity = config->
identity;
66 msg->hmacauth->has_identity =
true;
81 LOG3(
"Adding PIN auth info");
92 msg->
message.has_authtype =
true;
98 msg->
message.pinauth->pin = (ProtobufCBinaryData) {
102 msg->
message.pinauth->has_pin =
true;
Structure for handling generic arrays of bytes.
#define KINETIC_PIN_MAX_LEN
Max PIN length.
Structure for an embedded ByteArray as a buffer.
Structure used to specify the configuration for a session.
#define KINETIC_HMAC_MAX_LEN
HMAC max length.
void KineticHMAC_Populate(KineticHMAC *hmac, Com__Seagate__Kinetic__Proto__Message *msg, const ByteArray key)
void com__seagate__kinetic__proto__message__pinauth__init(Com__Seagate__Kinetic__Proto__Message__PINauth *message)
The operation requires an SSL connection and the specified connection is non-SSL. ...
int64_t identity
The identity associated with this request.
KineticAlgorithm
Enumeration of encryption/checksum key algorithms.
Com__Seagate__Kinetic__Proto__Message message
KineticStatus KineticAuth_PopulatePin(KineticSessionConfig const *const config, KineticRequest *const pdu, ByteArray pin)
Com__Seagate__Kinetic__Proto__Command__Header header
#define KINETIC_ASSERT(cond)
Com__Seagate__Kinetic__Proto__Message__PINauth pinAuth
void com__seagate__kinetic__proto__message__hmacauth__init(Com__Seagate__Kinetic__Proto__Message__HMACauth *message)
void KineticHMAC_Init(KineticHMAC *hmac, Com__Seagate__Kinetic__Proto__Command__Security__ACL__HMACAlgorithm algorithm)
size_t len
Number of bytes in the data field.
KineticStatus KineticAuth_EnsureSslEnabled(KineticSessionConfig const *const config)
#define KINETIC_HMAC_SHA1_LEN
HMAC secure hash length.
uint8_t * data
Pointer to an allocated array of data bytes.
Status not available (no reponse/status available)
KineticStatus
Kinetic status codes.
KineticStatus KineticAuth_PopulateTag(ByteBuffer *const tag, KineticAlgorithm algorithm, ByteArray const *const key)
Com__Seagate__Kinetic__Proto__Command command
bool useSsl
Set to `true' to enable SSL for for this session.
KineticStatus KineticAuth_PopulateHmac(KineticSessionConfig const *const config, KineticRequest *const pdu)
HMAC key is empty or NULL.