Commit Graph

134 Commits

Author SHA1 Message Date
Christopher Jeffrey 5aa33fa563 paypro: add a ton of extension defs. 2014-08-25 13:30:53 -07:00
Christopher Jeffrey 9443300bb2 paypro: use new string types with asn1.js fork. 2014-08-25 13:10:58 -07:00
Christopher Jeffrey 76f0e7eee9 paypro: clean up string types. 2014-08-25 12:51:09 -07:00
Christopher Jeffrey cb6178a4f2 paypro: add string types - need to fork asn1.js. 2014-08-25 12:50:27 -07:00
Christopher Jeffrey b852ac1ad8 paypro: start implementing more rfc5280 definitions. 2014-08-25 12:38:16 -07:00
Christopher Jeffrey caee139ca9 paypro: parse keyUsage bit string properly. 2014-08-25 12:05:17 -07:00
Christopher Jeffrey 6af0fee9d4 paypro: debug KeyUsage extension. 2014-08-25 11:57:29 -07:00
Christopher Jeffrey 5f958ce904 paypro: start implementing rfc5280 ext definitions. 2014-08-25 11:49:31 -07:00
Christopher Jeffrey 3d9c08e350 paypro: refactor verification. 2014-08-25 11:31:58 -07:00
Christopher Jeffrey 5631f1c229 paypro: check validity time - cert expiration. 2014-08-25 11:27:16 -07:00
Christopher Jeffrey dcdc4bdf40 paypro: better extension parsing with more debugging. 2014-08-25 11:19:19 -07:00
Christopher Jeffrey 4aeda55190 paypro: start handling certificate extensions. 2014-08-24 13:02:07 -07:00
Christopher Jeffrey b90bfb70c0 paypro: check issuer. ignore fixed asn1.js bug. 2014-08-24 13:01:01 -07:00
Christopher Jeffrey fcad977f88 paypro: remove debug code. 2014-08-22 17:43:04 -07:00
Christopher Jeffrey 7b8a7d4f60 paypro: debugging and sigAlg/pubKey formats. 2014-08-22 17:10:41 -07:00
Christopher Jeffrey b8611e6e67 Revert "paypro: attempted debugging with KJUR."
This reverts commit 5788fdbb52a42e8e4a1841f5d67af9afef5e3082.
2014-08-22 13:21:21 -07:00
Christopher Jeffrey cf46bae0c5 paypro: attempted debugging with KJUR. 2014-08-22 13:21:18 -07:00
Christopher Jeffrey 4f9c36b493 paypro: fix browser kjur usage. 2014-08-22 13:21:02 -07:00
Christopher Jeffrey 03143e7cee Revert "paypro: more debugging."
This reverts commit b406eeadffe65d7bdf292abd3bb48d3e42cfa7ec.
2014-08-22 12:50:26 -07:00
Christopher Jeffrey c82a05702a paypro: more debugging. 2014-08-22 12:50:22 -07:00
Christopher Jeffrey bc6a24f791 Revert "paypro: asn1.js debugging - try to get tbs buffer."
This reverts commit 3c7aeb4f62c27305294f95eb8875b370b2407227.
2014-08-22 12:20:36 -07:00
Christopher Jeffrey a52f07dbe3 paypro: asn1.js debugging - try to get tbs buffer. 2014-08-22 12:19:17 -07:00
Christopher Jeffrey b9ffa081dc paypro: fix chain validation for browser. 2014-08-22 12:18:58 -07:00
Christopher Jeffrey c71f06a350 paypro: fix root cert check. 2014-08-22 09:05:05 -07:00
Christopher Jeffrey c9129ca2d7 paypro: use asn1.js in browser paypro. 2014-08-22 08:56:30 -07:00
Christopher Jeffrey 35ffb2bb8f paypro: verify chain refactor. 2014-08-22 08:38:19 -07:00
Christopher Jeffrey 88aae53b2c paypro: asn1.js - cleanup. 2014-08-22 00:34:41 -07:00
Christopher Jeffrey 7cdfe1772f paypro: use fedor's asn1.js to deal with DER certificates. 2014-08-22 00:31:20 -07:00
Christopher Jeffrey 00c271e554 paypro: verify the certificate chain. 2014-08-21 16:13:34 -07:00
Christopher Jeffrey 41507bc523 paypro: fix root certs. 2014-08-21 16:02:53 -07:00
Manuel Aráoz 98f0285e48 Merge pull request #459 from ryanxcharles/feature/message-signing
add support for signing messages in compressed format
2014-08-06 10:56:07 -03:00
Christopher Jeffrey 4e55bb10d7 paypro: expose RootCerts on PayPro. 2014-07-29 10:58:35 -07:00
Ryan X. Charles 40566ec7cb add support for signing messages in compressed format
...this is the standard way to sign messages in bitcoin-qt. Note that the
format of a compressed signature, for messages, is quite distinct from DER
format, which is used in transactions. This commit also adds support for
recovering the public key from a signature, which is necessary for this. The
code for public key recover is taken from bitcoinjs-lib.
2014-07-25 14:07:03 -07:00
Christopher Jeffrey c5742781b4 root-certs: use hasOwnProperty check instead of __proto__=null. 2014-07-25 10:53:21 -07:00
Christopher Jeffrey dd66aeceaa minor: remove redundant toUpperCase calls. 2014-07-24 23:07:52 -07:00
Christopher Jeffrey 93536f10a4 paypro: root certs - do not inherit from Object. 2014-07-24 23:07:52 -07:00
Christopher Jeffrey 2b1c7c0b54 paypro: get root cert names. 2014-07-24 23:07:52 -07:00
Christopher Jeffrey f510614304 paypro: allow identification of root certs. 2014-07-24 23:07:52 -07:00
Christopher Jeffrey 7b408c335b fix: typo - s/Payment/PaymentACK/ 2014-07-23 15:02:19 -07:00
Christopher Jeffrey 81fc74b90a paypro: fix handling of pki_data - cert arrays. 2014-07-23 14:22:56 -07:00
Christopher Jeffrey 1dd975b41d paypro: fix browser signatures with KJUR. move pem/der functions to common. 2014-07-21 19:52:43 -07:00
Christopher Jeffrey 88bba75eec paypro: split up paypro into node/browser/common. 2014-07-21 18:15:52 -07:00
Christopher Jeffrey f105d706d6 paypro: add isTrusted function to RootCerts. 2014-07-21 14:56:48 -07:00
Christopher Jeffrey f4ca1f2fce paypro: remove x509.js 2014-07-21 14:56:48 -07:00
Christopher Jeffrey b8af3bb355 paypro: move root certs to common. 2014-07-21 14:56:48 -07:00
Christopher Jeffrey 382529e7c5 paypro: remove all references of KJUR. 2014-07-21 14:56:48 -07:00
Christopher Jeffrey 2912f30bbb paypro: start using our own DERtoPEM functions so we don't have to require jsrsasign. 2014-07-21 14:56:48 -07:00
Christopher Jeffrey a18ee90f50 paypro: fix pem/der functions. 2014-07-21 14:56:48 -07:00
Christopher Jeffrey 8181369120 paypro: temporarily fix tests. 2014-07-21 14:56:47 -07:00
Christopher Jeffrey 983431c64b paypro: move x509 sign and verify to their own methods. 2014-07-21 14:56:47 -07:00
Christopher Jeffrey ce2ca3a2f3 paypro: fix DERtoPEM. 2014-07-21 14:55:10 -07:00
Christopher Jeffrey 17c8dc6a10 minor: fix typo. 2014-07-21 14:55:10 -07:00
Christopher Jeffrey 3a6eda68d0 paypro: potentially stop using jsrsasign in node. 2014-07-21 14:55:10 -07:00
Christopher Jeffrey f057037561 paypro: convert root certs to hash table in build file. 2014-07-21 14:55:10 -07:00
Christopher Jeffrey ada11f3092 paypro: treat pki_data as an array. 2014-07-21 14:55:10 -07:00
Christopher Jeffrey 68ec8dd92d minor: remove unused code. 2014-07-21 14:55:10 -07:00
Christopher Jeffrey 54f8472e54 paypro: temporarily disable untrusted cert error for tests. typo fix. 2014-07-21 14:55:10 -07:00
Christopher Jeffrey 2b7bae46d0 paypro: handle untrusted certs on browser and node. 2014-07-21 14:55:10 -07:00
Christopher Jeffrey 38283da2a3 paypro: get single DER certs working. 2014-07-21 14:55:10 -07:00
Christopher Jeffrey 0588844a9b paypro: multiple fixes. 2014-07-21 14:55:10 -07:00
Christopher Jeffrey 4206d26dea paypro: stat using jsrsasign to convert DER to PEM and derive public keys for sig verification. 2014-07-21 14:55:10 -07:00
Christopher Jeffrey a0ebfe46bb paypro: fix browser paypro. TODO: fix parsing DER certs. 2014-07-21 14:55:10 -07:00
Christopher Jeffrey d4e5e4e69e paypro: fix payment protocol for DER certs. 2014-07-21 14:55:10 -07:00
Christopher Jeffrey 430972c83d paypro: begin checking trusted certs. 2014-07-21 14:55:10 -07:00
Christopher Jeffrey be2f56a734 paypro: add createTrusted to browser build script. 2014-07-21 14:55:10 -07:00
Christopher Jeffrey ed13983484 paypro: fix encodings with jsrsasign. 2014-07-21 14:54:38 -07:00
Christopher Jeffrey f532fe2b41 paypro: clientside. start using jsrsasign api correctly. 2014-07-21 14:54:38 -07:00
Christopher Jeffrey 8e232fc75c paypro: figure out clientside jsrasign more. 2014-07-21 14:54:38 -07:00
Christopher Jeffrey 06975afe00 paypro: try to figure out differences between browser and npm jsrsasign. 2014-07-21 14:54:38 -07:00
Christopher Jeffrey 8033e19fa3 paypro: use jsrsasign for browser. 2014-07-21 14:54:38 -07:00
Christopher Jeffrey 5b9a07ad23 paypro: first pass at clientside x509. 2014-07-21 14:54:03 -07:00
Christopher Jeffrey 6db7923c2b fix: fix variable typo for paypro. 2014-07-21 14:54:03 -07:00
Christopher Jeffrey d6c32b449f paypro: fix rsa+sha256 vs rsa+sha1. 2014-07-21 14:54:03 -07:00
Christopher Jeffrey 3fbe0a9d80 test: fix x509 tests for PayPro. 2014-07-21 14:54:03 -07:00
Christopher Jeffrey 3c82119561 paypro: x509 nonsense. 2014-07-21 14:54:03 -07:00
Christopher Jeffrey fc5e3a2811 paypro: first pass at implementing payment protocol for x509. 2014-07-21 14:54:03 -07:00
Linus Unnebäck 122575d307 cleanup after removal of soop
Removed some unnecessary parenthesise that hung around after the merge
of #417
2014-07-12 12:14:56 +02:00
Manuel Araoz 4d6e077670 remove soop exports 2014-07-10 16:08:42 -03:00
Manuel Araoz ec0cb3587d remove soop imports 2014-07-10 12:39:09 -03:00
Ryan X. Charles 62222b96da add sign/verify with pki_type SIN
...which is much easier to implement than X.509 certificates.
2014-07-03 15:35:32 -07:00
Ryan X. Charles 1e2f7bb710 serialize payment request for signature 2014-07-03 15:35:32 -07:00
Ryan X. Charles 10f4337cae add BIP70 protobuf features in new PayPro lib file
...and add to the "main" bundle, but not the "all" bundle, since it adds
hundreds of kilobytes to the bundle.
2014-07-02 11:39:21 -07:00
Ryan X. Charles b5a6027575 ran js-beautify on all bitcore source
js-beautify -s 2 -r *.js

...did not run on bundles, only on source.
2014-06-23 10:57:02 -07:00
Ryan X. Charles 572bb6debf add support for signing/verifying messages
This adds a new Message class with static methods for signing and verifying a
message the same way as bitcoind. (In a nutshell, messages a prepended with
"Bitcoin Signed Message:" before being hashed and signed).

There is one important piece missing ... verifying a signature with an address,
and not a public key. I have not yet implemented this because the cryptography
interface of bitcore does not allow me to derive the public key from a
signature. This will need to be added before verifying from an address is
possible.
2014-04-19 11:28:19 -03:00