Loading keys in SSH2

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 ...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-29-2005
Richard
 
Posts: n/a
Default Loading keys in SSH2

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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:55 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0