diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-22 12:37:45 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-22 12:37:45 -0700 |
commit | 26f49de0dd5673584e734152d2d3329b90eb6978 (patch) | |
tree | 2ba00544c77cc3bfe0cafb4fa8fe60ce73d31d79 /plugins/OStatus/lib/safecrypt_rsa.php | |
parent | c85228eadc60b50ed6e7c9cba596c3e66f5214b2 (diff) | |
parent | 27bfd1211d64298ee3c3b2d82d7b38ca1e1167ad (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
lib/attachmentlist.php
Diffstat (limited to 'plugins/OStatus/lib/safecrypt_rsa.php')
-rw-r--r-- | plugins/OStatus/lib/safecrypt_rsa.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/OStatus/lib/safecrypt_rsa.php b/plugins/OStatus/lib/safecrypt_rsa.php new file mode 100644 index 000000000..f3aa2c928 --- /dev/null +++ b/plugins/OStatus/lib/safecrypt_rsa.php @@ -0,0 +1,18 @@ +<?php + +require_once 'Crypt/RSA.php'; + +/** + * Crypt_RSA stores a Math_BigInteger with value 0, which triggers a bug + * in Math_BigInteger's wakeup function which spews notices to log or output. + * This wrapper replaces it with a version that survives serialization. + */ +class SafeCrypt_RSA extends Crypt_RSA +{ + function __construct() + { + parent::__construct(); + $this->zero = new SafeMath_BigInteger(); + } +} + |