]> git.tuebingen.mpg.de Git - paraslash.git/commit
crypto: Simplify asymetric key handling.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 10 Jul 2016 20:23:45 +0000 (22:23 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 6 Jan 2017 17:53:46 +0000 (18:53 +0100)
commitf553ab861efaa14f3a07ffb074c9e640b9fc776a
tree5d9741fdc7d131543a98e8e3d3d8e0e8669c633a
parentb4c9282be012ea84f7154684e9b2a469171e5e2b
crypto: Simplify asymetric key handling.

get_asymmetric_key() and free_asymmetric_key() are public because
para_server maintains a copy to the public key of each user so that
the keys need to be loaded only once. On the other hand, for private
keys (used in para_client) key allocation and freeing is performed
implicitly in priv_decrypt(), and no reference to the key is ever
returned. So the crypto API can be simplified by exposing the interface
only for public keys.

Hence this patch renames get_asymmetric_key() to get_public_key()
and drops the "private" argument. Similarly, free_asymmetric_key()
is renamed to free_public_key().
crypt.c
crypt.h
gcrypt.c
user_list.c