]> git.tuebingen.mpg.de Git - paraslash.git/commit
crypt: Deduplicate get_public_key().
authorAndre Noll <maan@tuebingen.mpg.de>
Thu, 28 Dec 2017 00:41:14 +0000 (01:41 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 25 Feb 2018 23:10:28 +0000 (00:10 +0100)
commit5f20d9afde364f9ce51aa7841ebe513028a65e81
treeaf77a55bb92892187f922329ceec20cc7ded7fd5
parent93ad956d88ffd117a6f81c5e38d9aaed3ae8b6e9
crypt: Deduplicate get_public_key().

The openssl and grypt implementations of this function share quite
some code. This patch factors out the common code into the new
decode_ssh_key() helper of crypt_common.c. Both implementations are
changed to call the new helper.

As a side effect of this change, all callers of is_ssh_rsa_key()
and check_ssh_key_header() now reside in crypt_common.c, so we can
make these two functions static and remove their declarations from
crypt_backend.h.
crypt_backend.h
crypt_common.c
gcrypt.c
openssl.c