aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_file.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2011-01-24 08:42:57 +0100
committerErlang/OTP <[email protected]>2011-01-24 08:42:57 +0100
commita55a1a82aa398d75152bb96ad6274b656ca58fa5 (patch)
tree4d4ed1ef0eaef7173bc67fb895ee0e5b4731f0b5 /lib/ssh/src/ssh_file.erl
parent7db8499d81b8c05d6019df9cf923351d0e96f7a0 (diff)
parentafdb12f28b7b66452dd0bd83c8f539aee4e61ed9 (diff)
downloadotp-a55a1a82aa398d75152bb96ad6274b656ca58fa5.tar.gz
otp-a55a1a82aa398d75152bb96ad6274b656ca58fa5.tar.bz2
otp-a55a1a82aa398d75152bb96ad6274b656ca58fa5.zip
Merge branch 'nick/ssh/sign-verify-binary' into maint-r14
* nick/ssh/sign-verify-binary: Updated appup file. Updated notes file. Changed year in copyright header. Added updated modules to the appup file. Improved error handling for ssh:connect/3/4. Release note contained wrong ticker number. OTP-8987 In some cases SSH returned {error, normal} when a channel was terminated unexpectedly. This has now been changed to {error, channel_closed}.
Diffstat (limited to 'lib/ssh/src/ssh_file.erl')
-rwxr-xr-xlib/ssh/src/ssh_file.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/ssh/src/ssh_file.erl b/lib/ssh/src/ssh_file.erl
index c78f5dc337..ff23f714cd 100755
--- a/lib/ssh/src/ssh_file.erl
+++ b/lib/ssh/src/ssh_file.erl
@@ -35,8 +35,8 @@
lookup_host_key/3, add_host_key/3, % del_host_key/2,
lookup_user_key/3, ssh_dir/2, file_name/3]).
--export([private_identity_key/2]).
-%% , public_identity_key/2,
+-export([private_identity_key/2,
+ public_identity_key/2]).
%% identity_keys/2]).
-export([encode_public_key/1, decode_public_key_v2/2]).
@@ -147,6 +147,11 @@ private_identity_key(Alg, Opts) ->
Path = file_name(user, identity_key_filename(Alg), Opts),
read_private_key_v2(Path, Alg).
+public_identity_key(Alg, Opts) ->
+ Path = file_name(user, identity_key_filename(Alg) ++ ".pub", Opts),
+ read_public_key_v2(Path, Alg).
+
+
read_public_key_v2(File, Type) ->
case file:read_file(File) of
{ok,Bin} ->