aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-08-23 21:35:09 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-08-25 10:13:23 +0200
commitc5837a6c6335017cd29974a3abf38d54e4357719 (patch)
tree43a7a126d0c96be7ae09529b9bcb3710100b14ea
parentc221db0f3659d188911d5c0ce03d1378c4bc51c7 (diff)
downloadlibssh-c5837a6c6335017cd29974a3abf38d54e4357719.tar.gz
libssh-c5837a6c6335017cd29974a3abf38d54e4357719.tar.xz
libssh-c5837a6c6335017cd29974a3abf38d54e4357719.zip
keys: Remove obsolete ssh_do_sign_with_agent().
-rw-r--r--include/libssh/keys.h2
-rw-r--r--src/keys.c49
2 files changed, 0 insertions, 51 deletions
diff --git a/include/libssh/keys.h b/include/libssh/keys.h
index 85194f1..f9f683f 100644
--- a/include/libssh/keys.h
+++ b/include/libssh/keys.h
@@ -76,8 +76,6 @@ 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,
- struct ssh_buffer_struct *buf, struct ssh_public_key_struct *publickey);
ssh_string ssh_do_sign(ssh_session session,ssh_buffer sigbuf,
ssh_private_key privatekey);
diff --git a/src/keys.c b/src/keys.c
index 1ab02a9..78b0616 100644
--- a/src/keys.c
+++ b/src/keys.c
@@ -330,55 +330,6 @@ ssh_string RSA_do_sign(const unsigned char *payload, int len, RSA *privkey) {
}
#endif
-#ifndef _WIN32
-ssh_string ssh_do_sign_with_agent(ssh_session session,
- struct ssh_buffer_struct *buf, struct ssh_public_key_struct *publickey) {
- struct ssh_buffer_struct *sigbuf = NULL;
- struct ssh_string_struct *signature = NULL;
- struct ssh_string_struct *session_id = NULL;
- struct ssh_crypto_struct *crypto = NULL;
-
- if (session->current_crypto) {
- crypto = session->current_crypto;
- } else {
- crypto = session->next_crypto;
- }
-
- /* prepend session identifier */
- session_id = ssh_string_new(crypto->digest_len);
- if (session_id == NULL) {
- return NULL;
- }
- ssh_string_fill(session_id, crypto->session_id, crypto->digest_len);
-
- sigbuf = ssh_buffer_new();
- if (sigbuf == NULL) {
- ssh_string_free(session_id);
- return NULL;
- }
-
- if (buffer_add_ssh_string(sigbuf, session_id) < 0) {
- ssh_buffer_free(sigbuf);
- ssh_string_free(session_id);
- return NULL;
- }
- ssh_string_free(session_id);
-
- /* append out buffer */
- if (buffer_add_buffer(sigbuf, buf) < 0) {
- ssh_buffer_free(sigbuf);
- return NULL;
- }
-
- /* create signature */
- signature = agent_sign_data(session, sigbuf, publickey);
-
- ssh_buffer_free(sigbuf);
-
- return signature;
-}
-#endif /* _WIN32 */
-
/*
* This function signs the session id (known as H) as a string then
* the content of sigbuf */