packet_crypt: Move secure_memcmp() to a shared source

Move the secure_memcmp() function to a shared source to make it
available internally for other crypto implementations.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Anderson Toshiyuki Sasaki
2020-12-11 12:21:48 +01:00
parent 95a4651d86
commit c3ae1336fb
4 changed files with 37 additions and 11 deletions

View File

@@ -213,4 +213,6 @@ int sshkdf_derive_key(struct ssh_crypto_struct *crypto,
int key_type, unsigned char *output,
size_t requested_len);
int secure_memcmp(const void *s1, const void *s2, size_t n);
#endif /* _CRYPTO_H_ */