projects
/
monkeysphere.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
620e3d1
)
fix rounding issue. Thanks, Richard K Darst!
author
Daniel Kahn Gillmor
<dkg@fifthhorseman.net>
Sun, 1 Mar 2009 08:24:20 +0000
(
03:24
-0500)
committer
Daniel Kahn Gillmor
<dkg@fifthhorseman.net>
Sun, 1 Mar 2009 08:24:20 +0000
(
03:24
-0500)
src/keytrans/pem2openpgp
patch
|
blob
|
history
diff --git
a/src/keytrans/pem2openpgp
b/src/keytrans/pem2openpgp
index 73becfe464277b61acfbbcfa96777ce0901c361b..8bf17fb2df6b2a2a212b1af218eac6eaad8d70d8 100755
(executable)
--- a/
src/keytrans/pem2openpgp
+++ b/
src/keytrans/pem2openpgp
@@
-29,6
+29,7
@@
use Crypt::OpenSSL::Bignum;
use Crypt::OpenSSL::Bignum::CTX;
use Digest::SHA1;
use MIME::Base64;
+use POSIX;
## make sure all length() and substr() calls use bytes only:
use bytes;
@@
-329,7
+330,7
@@
sub read_mpi {
$bitlen = unpack('n', $bitlen);
$$readtally += 2;
- my $bytestoread =
($bitlen + 7)/8
;
+ my $bytestoread =
POSIX::floor(($bitlen + 7)/8)
;
my $ret;
read($instr, $ret, $bytestoread) or die "could not read MPI body.\n";
$$readtally += $bytestoread;