[pki] added ssh_pki_do_sign() function

This commit is contained in:
milo
2011-03-17 10:05:59 +01:00
parent c1f65492f7
commit b308bb9d52
4 changed files with 120 additions and 2 deletions

View File

@@ -71,6 +71,10 @@ ssh_private_key privatekey_make_rsa(ssh_session session, ssh_buffer buffer,
ssh_public_key publickey_make_dss(ssh_session session, ssh_buffer buffer);
ssh_public_key publickey_make_rsa(ssh_session session, ssh_buffer buffer, int type);
ssh_public_key publickey_from_string(ssh_session session, ssh_string pubkey_s);
ssh_string signature_to_string(SIGNATURE *sign);
#if defined HAVE_LIBCRYPTO
ssh_string RSA_do_sign(const unsigned char *payload, int len, RSA *privkey);
#endif
SIGNATURE *signature_from_string(ssh_session session, ssh_string signature,ssh_public_key pubkey,int needed_type);
void signature_free(SIGNATURE *sign);
ssh_string ssh_do_sign_with_agent(struct ssh_session_struct *session,

View File

@@ -48,6 +48,8 @@ int ssh_key_import_private(ssh_key key, ssh_session session,
const char *filename, const char *passphrase);
ssh_key ssh_pki_publickey_from_privatekey(ssh_key privkey);
ssh_string ssh_pki_do_sign(ssh_session session, ssh_buffer sigbuf,
ssh_key privatekey);
/* temporary functions, to be removed after migration to ssh_key */
ssh_key ssh_pki_convert_privatekey_to_key(ssh_private_key priv);