Explorar o código

Use a const_cast because the SGX SDK sgx_aes_gcm128_enc_update API is broken

The input parameter in the API call is specified as uint8_t* instead of
const uint8_t*.

This change just eliminates a compiler warning.
Ian Goldberg hai 1 ano
pai
achega
61c0f0e3df
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      Enclave/comms.cpp

+ 2 - 2
Enclave/comms.cpp

@@ -467,8 +467,8 @@ void NodeCommState::message_data(const uint8_t *data, uint32_t len, bool encrypt
         }
         if (encrypt) {
             // Encrypt the data
-            sgx_aes_gcm128_enc_update((uint8_t*)data, bytes_to_process,
-                frame+frame_offset, out_aes_gcm_state);
+            sgx_aes_gcm128_enc_update(const_cast<uint8_t*>(data),
+                bytes_to_process, frame+frame_offset, out_aes_gcm_state);
         } else {
             // Just copy the plaintext data during the handshake
             memmove(frame+frame_offset, data, bytes_to_process);