aboutsummaryrefslogtreecommitdiff
path: root/libssh/dh.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2006-11-07 01:45:13 +0000
committerAris Adamantiadis <aris@0xbadc0de.be>2006-11-07 01:45:13 +0000
commitd101fb4329f4313f1b930e9876166df3304e672a (patch)
tree25189df8f32687ace3681e7fdc20f778758649c4 /libssh/dh.c
parent24aeed5d1f40291c0c33a34403b212434e8f4e85 (diff)
downloadlibssh-d101fb4329f4313f1b930e9876166df3304e672a.tar.gz
libssh-d101fb4329f4313f1b930e9876166df3304e672a.tar.xz
libssh-d101fb4329f4313f1b930e9876166df3304e672a.zip
more doxygen documentation
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@79 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/dh.c')
-rw-r--r--libssh/dh.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/libssh/dh.c b/libssh/dh.c
index cbf143c0..937ca6a4 100644
--- a/libssh/dh.c
+++ b/libssh/dh.c
@@ -451,6 +451,16 @@ void generate_session_keys(SSH_SESSION *session){
free(k_string);
}
+/** \addtogroup ssh_session
+ * @{ */
+/** \brief get the md5 hash of the server public key
+ * \param session ssh session
+ * \param hash destination for the md5 hash
+ * \return size of the hash in bytes
+ * \warning it is very important that you verify at some moment that the hash matches
+ * a known server. If you don't do it, cryptography won't help you at making things secure
+ * \see ssh_is_server_known()
+ */
int ssh_get_pubkey_hash(SSH_SESSION *session,unsigned char hash[MD5_DIGEST_LEN]){
STRING *pubkey=session->current_crypto->server_pubkey;
MD5CTX ctx;
@@ -462,6 +472,8 @@ int ssh_get_pubkey_hash(SSH_SESSION *session,unsigned char hash[MD5_DIGEST_LEN])
return MD5_DIGEST_LEN;
}
+/** \deprecated same as ssh_get_pubkey_hash()
+ */
int pubkey_get_hash(SSH_SESSION *session, unsigned char hash[MD5_DIGEST_LEN]){
return ssh_get_pubkey_hash(session,hash);
}
@@ -560,7 +572,6 @@ static int sig_verify(SSH_SESSION *session, PUBLIC_KEY *pubkey, SIGNATURE *signa
return -1;
}
-
int signature_verify(SSH_SESSION *session,STRING *signature){
PUBLIC_KEY *pubkey;
SIGNATURE *sign;
@@ -593,3 +604,6 @@ int signature_verify(SSH_SESSION *session,STRING *signature){
publickey_free(pubkey);
return err;
}
+
+/** @} */
+