projects
/
monkeysphere.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e52ac3a
)
added comments to keytrans
author
Daniel Kahn Gillmor
<dkg@fifthhorseman.net>
Tue, 9 Jun 2009 17:22:41 +0000
(13:22 -0400)
committer
Daniel Kahn Gillmor
<dkg@fifthhorseman.net>
Tue, 9 Jun 2009 17:22:41 +0000
(13:22 -0400)
src/share/keytrans
patch
|
blob
|
history
diff --git
a/src/share/keytrans
b/src/share/keytrans
index 3638eae5fce8d8c5e024208405dc4d974ec5ea68..326bfb1e6cd0cf590bcfb3c19718038b81746e3e 100755
(executable)
--- a/
src/share/keytrans
+++ b/
src/share/keytrans
@@
-627,6
+627,7
@@
sub openpgp2ssh {
die "This is not an OpenPGP packet\n";
}
if (0x40 & $packettag) {
die "This is not an OpenPGP packet\n";
}
if (0x40 & $packettag) {
+ # this is a new-format packet.
$tag = (0x3f & $packettag);
my $nextlen = 0;
read($instr, $nextlen, 1);
$tag = (0x3f & $packettag);
my $nextlen = 0;
read($instr, $nextlen, 1);
@@
-645,6
+646,7
@@
sub openpgp2ssh {
# packet length is undefined.
}
} else {
# packet length is undefined.
}
} else {
+ # this is an old-format packet.
my $lentype;
$lentype = 0x03 & $packettag;
$tag = ( 0x3c & $packettag ) >> 2;
my $lentype;
$lentype = 0x03 & $packettag;
$tag = ( 0x3c & $packettag ) >> 2;
@@
-776,7
+778,6
@@
for (basename($0)) {
# FIXME: fail if there is no given user ID; or should we default to
# hostname_long() from Sys::Hostname::Long ?
# FIXME: fail if there is no given user ID; or should we default to
# hostname_long() from Sys::Hostname::Long ?
-
if (defined $ENV{PEM2OPENPGP_NEWKEY}) {
$rsa = Crypt::OpenSSL::RSA->generate_key($ENV{PEM2OPENPGP_NEWKEY});
} else {
if (defined $ENV{PEM2OPENPGP_NEWKEY}) {
$rsa = Crypt::OpenSSL::RSA->generate_key($ENV{PEM2OPENPGP_NEWKEY});
} else {