diff options
author | milo <milo@r0ot.me> | 2011-03-17 10:05:59 +0100 |
---|---|---|
committer | milo <milo@r0ot.me> | 2011-03-17 11:41:51 +0100 |
commit | 2b61418128a6a9401d42f452a9e1acb5fe29cbb0 (patch) | |
tree | a5ed18e8dc749fec59c54e2a40919c0ea4c69893 /include | |
parent | f0439e3494d12898ed3854b0509968f5718a3dc5 (diff) | |
download | libssh-2b61418128a6a9401d42f452a9e1acb5fe29cbb0.tar.gz libssh-2b61418128a6a9401d42f452a9e1acb5fe29cbb0.tar.xz libssh-2b61418128a6a9401d42f452a9e1acb5fe29cbb0.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 e38cf9c..e6354a9 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 fe83fc5..7aed09a 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); |