[Pkg-privacy-commits] [msva-perl] 329/356: GnuPGKey_to_OpenSSH_pub cleanup.

Ximin Luo infinity0 at moszumanska.debian.org
Mon Aug 24 07:42:10 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch debian
in repository msva-perl.

commit 4787fbc1560c18b96b53090c0671fa7e997ccfa2
Author: David Bremner <bremner at unb.ca>
Date:   Sun Apr 24 07:29:33 2011 -0300

    GnuPGKey_to_OpenSSH_pub cleanup.
    
    - add some documentation, particularly the need to prepend "ssh-rsa "
    - remove 'use Data::Dumper'
    - add to EXPORT_OK
---
 Crypt/Monkeysphere/Keytrans.pm | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/Crypt/Monkeysphere/Keytrans.pm b/Crypt/Monkeysphere/Keytrans.pm
index ab021d7..1754a76 100644
--- a/Crypt/Monkeysphere/Keytrans.pm
+++ b/Crypt/Monkeysphere/Keytrans.pm
@@ -7,7 +7,7 @@ use Carp;
 use MIME::Base64;
 
 use Exporter qw(import);
-our @EXPORT_OK=qw();
+our @EXPORT_OK=qw(GnuPGKey_to_OpenSSH_pub);
 
 
 # takes a Math::BigInt and returns it properly packed for openssh output.
@@ -47,6 +47,20 @@ sub openssh_rsa_pubkey_pack {
 	openssh_mpi_pack($modulus);
 }
 
+=pod
+
+=head2 GnuPGKey_to_OpenSSH_pub
+
+Translate a GnuPG::Key to a string suitable for an OpenSSH .pub file
+
+B<Note> you will need to add "ssh-rsa " to the front to make OpenSSH
+recognize it.
+
+=head3 Arguments
+
+key - GnuPG::Key object
+
+=cut
 
 sub GnuPGKey_to_OpenSSH_pub {
   my $key = shift;
@@ -57,8 +71,6 @@ sub GnuPGKey_to_OpenSSH_pub {
   croak("Not an RSA key!")
     unless $key->algo_num == 1;
 
-  use Data::Dumper;
-
   return encode_base64(openssh_rsa_pubkey_pack(@{$key->pubkey_data}), '');
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/msva-perl.git



More information about the Pkg-privacy-commits mailing list