Commit 747726af authored by Paul Lensing's avatar Paul Lensing
Browse files

Now setting user and hmac for pinop authed operations. Not clear if this

is behviour intended by Protocol 3.0.0. 
parent 0b02cac1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -45,10 +45,12 @@ void NonblockingSender::Enqueue(unique_ptr<Message> message, unique_ptr<Command>
    command->mutable_header()->set_sequence(sequence_number_++);
    /* COMMAND PART OF MESSAGE IS FINALIZED */
    message->set_commandbytes(command->SerializeAsString());
    if(message->authtype() == com::seagate::kinetic::client::proto::Message_AuthType_HMACAUTH){

    // Should user be set for pinop authed operations? This is not clear.
    // if(message->authtype() == com::seagate::kinetic::client::proto::Message_AuthType_HMACAUTH){
        message->mutable_hmacauth()->set_identity(connection_options_.user_id);
        message->mutable_hmacauth()->set_hmac(hmac_provider_.ComputeHmac(*message, connection_options_.hmac_key));
    }
    //   }
    unique_ptr<Request> request(new Request());
    request->message = move(message);
    request->command = move(command);