summaryrefslogtreecommitdiffstats
path: root/src/pki_gcrypt.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-08-15 19:17:13 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-08-16 00:47:43 +0200
commit714fa8960d52c5154faa55f5bdd3784657636884 (patch)
tree93029f5af89b4179fdcf7aebb8e262e38efd7211 /src/pki_gcrypt.c
parent54a2b8a303f5d16bd1f5e60b42acad07e1d8827f (diff)
downloadlibssh-714fa8960d52c5154faa55f5bdd3784657636884.tar.gz
libssh-714fa8960d52c5154faa55f5bdd3784657636884.tar.xz
libssh-714fa8960d52c5154faa55f5bdd3784657636884.zip
pki: Move ssh_privatekey_type and privatekey_free to legacy.
Diffstat (limited to 'src/pki_gcrypt.c')
-rw-r--r--src/pki_gcrypt.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/pki_gcrypt.c b/src/pki_gcrypt.c
index fccfc41..ea1bc2e 100644
--- a/src/pki_gcrypt.c
+++ b/src/pki_gcrypt.c
@@ -1221,41 +1221,6 @@ struct signature_struct *pki_do_sign(ssh_key privatekey,
*/
/**
- * @brief returns the type of a private key
- * @param[in] privatekey the private key handle
- * @returns one of SSH_KEYTYPE_RSA,SSH_KEYTYPE_DSS,SSH_KEYTYPE_RSA1
- * @returns SSH_KEYTYPE_UNKNOWN if the type is unknown
- * @see privatekey_from_file
- * @see ssh_userauth_offer_pubkey
- */
-enum ssh_keytypes_e ssh_privatekey_type(ssh_private_key privatekey){
- if (privatekey==NULL)
- return SSH_KEYTYPE_UNKNOWN;
- return privatekey->type;
-}
-
-/**
- * @brief Deallocate a private key object.
- *
- * @param[in] prv The private_key object to free.
- */
-void privatekey_free(ssh_private_key prv) {
- if (prv == NULL) {
- return;
- }
-
-#ifdef HAVE_LIBGCRYPT
- gcry_sexp_release(prv->dsa_priv);
- gcry_sexp_release(prv->rsa_priv);
-#elif defined HAVE_LIBCRYPTO
- DSA_free(prv->dsa_priv);
- RSA_free(prv->rsa_priv);
-#endif
- memset(prv, 0, sizeof(struct ssh_private_key_struct));
- SAFE_FREE(prv);
-}
-
-/**
* @brief Write a public key to a file.
*
* @param[in] session The ssh session to use.