Revert "Use in-place replacement ursa-purejs for native ursa"

This reverts commit 8e033dc387.

Lots of things in ursa-purejs is unimplemented. We get errors like:

    /home/yellowtent/box/node_modules/ursa-purejs/lib/ursa.js:331
          throw new Error("Unsupported operation : sign");
          ^
    Error: Unsupported operation : sign
        at Object.sign (/home/yellowtent/box/node_modules/ursa-purejs/lib/ursa.js:331:13)
        at Object.sign (/home/yellowtent/box/node_modules/ursa-purejs/lib/ursa.js:624:27)
        at /home/yellowtent/box/src/cert/acme.js:112:50
        at /home/yellowtent/box/src/cert/acme.js:70:16
This commit is contained in:
Girish Ramakrishnan
2016-10-13 21:41:04 -07:00
parent 32eb1edead
commit bafc35f99e
3 changed files with 17 additions and 24 deletions
+3 -3
View File
@@ -10,7 +10,7 @@ var assert = require('assert'),
paths = require('../paths.js'),
safe = require('safetydance'),
superagent = require('superagent'),
ursa = require('ursa-purejs'),
ursa = require('ursa'),
util = require('util'),
_ = require('underscore');
@@ -97,7 +97,7 @@ Acme.prototype.sendSignedRequest = function (url, payload, callback) {
n: b64(privateKey.getModulus())
}
};
var payload64 = b64(payload);
this.getNonce(function (error, nonce) {
@@ -345,7 +345,7 @@ Acme.prototype.downloadChain = function (linkHeader, callback) {
if (!linkHeader) return new AcmeError(AcmeError.EXTERNAL_ERROR, 'Empty link header when downloading certificate chain');
var linkInfo = parseLinks(linkHeader);
if (!linkInfo || !linkInfo.up) return new AcmeError(AcmeError.EXTERNAL_ERROR, 'Failed to parse link header when downloading certificate chain');
if (!linkInfo || !linkInfo.up) return new AcmeError(AcmeError.EXTERNAL_ERROR, 'Failed to parse link header when downloading certificate chain');
debug('downloadChain: downloading from %s', this.caOrigin + linkInfo.up);