Browse Source

Add keystore_put_key interface function for storing keys permanently

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
master
Jukka Laitinen 4 years ago committed by Beat Küng
parent
commit
4c6779812d
  1. 9
      platforms/common/include/px4_platform_common/crypto_backend.h
  2. 5
      platforms/common/px4_sw_crypto/stub_keystore/stub_keystore.c

9
platforms/common/include/px4_platform_common/crypto_backend.h

@ -71,6 +71,15 @@ void keystore_close(keystore_session_handle_t *handle); @@ -71,6 +71,15 @@ void keystore_close(keystore_session_handle_t *handle);
*/
size_t keystore_get_key(keystore_session_handle_t handle, uint8_t idx, uint8_t *key_buf, size_t key_buf_size);
/*
* Store a key persistently into the keystore
* idx: key index in keystore
* key: pointer to the key
* key_size: size of the key
*/
bool keystore_put_key(keystore_session_handle_t handle, uint8_t idx, uint8_t *key, size_t key_size);
/*
* Architecture specific PX4 Crypto API functions
*/

5
platforms/common/px4_sw_crypto/stub_keystore/stub_keystore.c

@ -77,3 +77,8 @@ size_t keystore_get_key(keystore_session_handle_t handle, uint8_t idx, uint8_t * @@ -77,3 +77,8 @@ size_t keystore_get_key(keystore_session_handle_t handle, uint8_t idx, uint8_t *
return ret;
}
bool keystore_put_key(keystore_session_handle_t handle, uint8_t idx, uint8_t *key, size_t key_size)
{
return false;
}

Loading…
Cancel
Save