This is a discussion on Loading keys in SSH2 within the OpenSSH Development forums, part of the Networking and Network Related category; Hello, I am going through the source of openssh-3.9p1 and I have a quick question on how the ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello,
I am going through the source of openssh-3.9p1 and I have a quick question on how the sshd daemon loads the host keys. In the default configuration of SSH2 protocol, the private DSA hostkey is found in the file 'ssh_host_dsa_key' and the public DSA hostkey counterpart in 'ssh_host_dsa_key.pub'. Likewise, the private and public RSA hostkeys are found in 'ssh_host_rsa_key' and 'ssh_host_rsa_key.pub' respectively. Now I am tracing through the sshd.c file and I am interested about how the SSH2 protocol loads the host keys. Below I drew a rough call graph as [fileName]functionName [sshd.c]main() | \/ [authfile.c]key_load_private() | \/ [authfile.c]key_load_private_pem() | \/ [in openssl library]PEM_read_PrivateKey() I am a bit confused about the call to the function PEM_read_PrivateKey() Below is the call to PEM_read_PrivateKey() on line 463 of authfile.c ================================================== ======= pk = PEM_read_PrivateKey(fp, NULL, NULL, (char *)passphrase); ================================================== ======= Does the function PEM_read_PrivateKey() returns something that contains data about BOTH the public and private parts of the assymetric DSA or RSA key ? Thanks Richard _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@mindrot.org http://www.mindrot.org/mailman/listi...enssh-unix-dev |