diff options
author | milo <milo@r0ot.me> | 2011-03-17 10:05:59 +0100 |
---|---|---|
committer | milo <milo@r0ot.me> | 2011-04-14 14:05:44 +0200 |
commit | b308bb9d5233b60f46ff259dd88aa706d55ac11c (patch) | |
tree | 041daa43ea2c7d90fa3dc3077fb4119013702a9b /include | |
parent | c1f65492f7a5b80cbe76b58ae1f4798f502fad4a (diff) | |
download | libssh-b308bb9d5233b60f46ff259dd88aa706d55ac11c.tar.gz libssh-b308bb9d5233b60f46ff259dd88aa706d55ac11c.tar.xz libssh-b308bb9d5233b60f46ff259dd88aa706d55ac11c.zip |
[pki] added ssh_pki_do_sign() function
Diffstat (limited to 'include')
-rw-r--r-- | include/libssh/keys.h | 4 | ||||
-rw-r--r-- | include/libssh/pki.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/libssh/keys.h b/include/libssh/keys.h index e38cf9cb..e6354a93 100644 --- a/include/libssh/keys.h +++ b/include/libssh/keys.h @@ -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, diff --git a/include/libssh/pki.h b/include/libssh/pki.h index fe83fc51..7aed09a2 100644 --- a/include/libssh/pki.h +++ b/include/libssh/pki.h @@ -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); |