diff options
author | Erlang/OTP <[email protected]> | 2010-11-01 13:58:26 +0100 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-11-01 13:58:26 +0100 |
commit | b93c12e8e0113862be038565fc04e170cfe3c12a (patch) | |
tree | 9e0e6cb19f759239cb415050616237a7c2ba5c50 /lib | |
parent | 7fce62fb8dfcf964111ce8c3254a41ce450ad0b6 (diff) | |
parent | 637dff7790e3f195dff81a7cfb8af468dece8946 (diff) | |
download | otp-b93c12e8e0113862be038565fc04e170cfe3c12a.tar.gz otp-b93c12e8e0113862be038565fc04e170cfe3c12a.tar.bz2 otp-b93c12e8e0113862be038565fc04e170cfe3c12a.zip |
Merge branch 'nick/ssh/replaced-deprecated/OTP-8849' into maint-r14
* nick/ssh/replaced-deprecated/OTP-8849:
The fix regarding OTP-8849 was not included in the previous version as stated.
Move away from using deprecated public_key function pem_to_der.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssh/doc/src/notes.xml | 17 | ||||
-rw-r--r-- | lib/ssh/src/ssh.appup.src | 2 | ||||
-rwxr-xr-x | lib/ssh/src/ssh_file.erl | 17 | ||||
-rw-r--r-- | lib/ssh/vsn.mk | 2 |
4 files changed, 29 insertions, 9 deletions
diff --git a/lib/ssh/doc/src/notes.xml b/lib/ssh/doc/src/notes.xml index 01478f870e..9bedd446f4 100644 --- a/lib/ssh/doc/src/notes.xml +++ b/lib/ssh/doc/src/notes.xml @@ -29,7 +29,21 @@ <file>notes.xml</file> </header> - <section><title>Ssh 2.0.2</title> +<section><title>Ssh 2.0.3</title> + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + The fix regarding OTP-8849 was not included in the + previous version as stated.</p> + <p> + Own Id: OTP-8918</p> + </item> + </list> + </section> +</section> + +<section><title>Ssh 2.0.2</title> <section><title>Fixed Bugs and Malfunctions</title> <list> <item> @@ -60,7 +74,6 @@ </list> </section> </section> - <section><title>Ssh 2.0.1</title> <section><title>Fixed Bugs and Malfunctions</title> <list> diff --git a/lib/ssh/src/ssh.appup.src b/lib/ssh/src/ssh.appup.src index 619b4b736f..9c806bcd03 100644 --- a/lib/ssh/src/ssh.appup.src +++ b/lib/ssh/src/ssh.appup.src @@ -19,9 +19,11 @@ {"%VSN%", [ + {"2.0.2", [{load_module, ssh_file, soft_purge, soft_purge, []}]}, {"2.0.1", [{restart_application, ssh}]} ], [ + {"2.0.2", [{load_module, ssh_file, soft_purge, soft_purge, []}]}, {"2.0.1", [{restart_application, ssh}]} ] }. diff --git a/lib/ssh/src/ssh_file.erl b/lib/ssh/src/ssh_file.erl index 5572349fe7..13722656db 100755 --- a/lib/ssh/src/ssh_file.erl +++ b/lib/ssh/src/ssh_file.erl @@ -198,12 +198,17 @@ read_public_key_v1(File) -> %% pem_type("ssh-rsa") -> "RSA". read_private_key_v2(File, Type) -> - case catch (public_key:pem_to_der(File)) of - {ok, [{_, Bin, not_encrypted}]} -> - decode_private_key_v2(Bin, Type); - Error -> %% Note we do not handle password encrypted keys at the moment - {error, Error} - end. + case file:read_file(File) of + {ok, PemBin} -> + case catch (public_key:pem_decode(PemBin)) of + [{_, Bin, not_encrypted}] -> + decode_private_key_v2(Bin, Type); + Error -> %% Note we do not handle password encrypted keys at the moment + {error, Error} + end; + {error, Reason} -> + {error, Reason} + end. %% case file:read_file(File) of %% {ok,Bin} -> %% case read_pem(binary_to_list(Bin), pem_type(Type)) of diff --git a/lib/ssh/vsn.mk b/lib/ssh/vsn.mk index 5e92c5ea01..db03168ad9 100644 --- a/lib/ssh/vsn.mk +++ b/lib/ssh/vsn.mk @@ -1,5 +1,5 @@ #-*-makefile-*- ; force emacs to enter makefile-mode -SSH_VSN = 2.0.2 +SSH_VSN = 2.0.3 APP_VSN = "ssh-$(SSH_VSN)" |