remove junk crypto
This commit is contained in:
parent
8cb372105a
commit
eaa58694f0
|
@ -3,13 +3,11 @@
|
||||||
var PromiseA = require('bluebird');
|
var PromiseA = require('bluebird');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var fs = PromiseA.promisifyAll(require('fs'));
|
var fs = PromiseA.promisifyAll(require('fs'));
|
||||||
var requestAsync = PromiseA.promisify(require('request'));
|
|
||||||
|
|
||||||
var LE = require('../');
|
var LE = require('../');
|
||||||
var LeCore = PromiseA.promisifyAll(require('letiny-core'));
|
var LeCore = PromiseA.promisifyAll(require('letiny-core'));
|
||||||
var ucrypto = PromiseA.promisifyAll(LeCore.leCrypto);
|
var leCrypto = PromiseA.promisifyAll(LeCore.leCrypto);
|
||||||
|
|
||||||
//var fcrypto = PromiseA.promisifyAll(require('../lib/crypto-utils-forge'));
|
|
||||||
var fetchFromConfigLiveDir = require('./common').fetchFromDisk;
|
var fetchFromConfigLiveDir = require('./common').fetchFromDisk;
|
||||||
|
|
||||||
var ipc = {}; // in-process cache
|
var ipc = {}; // in-process cache
|
||||||
|
@ -42,7 +40,7 @@ function createAccount(args, handlers) {
|
||||||
|
|
||||||
// TODO support ECDSA
|
// TODO support ECDSA
|
||||||
// arg.rsaBitLength args.rsaExponent
|
// arg.rsaBitLength args.rsaExponent
|
||||||
return ucrypto.generateRsaKeypairAsync(args.rsaBitLength, args.rsaExponent).then(function (pems) {
|
return leCrypto.generateRsaKeypairAsync(args.rsaBitLength, args.rsaExponent).then(function (pems) {
|
||||||
/* pems = { privateKeyPem, privateKeyJwk, publicKeyPem, publicKeyMd5 } */
|
/* pems = { privateKeyPem, privateKeyJwk, publicKeyPem, publicKeyMd5 } */
|
||||||
|
|
||||||
return LeCore.registerNewAccountAsync({
|
return LeCore.registerNewAccountAsync({
|
||||||
|
@ -120,7 +118,7 @@ function getAccount(accountId, args, handlers) {
|
||||||
return createAccount(args, handlers);
|
return createAccount(args, handlers);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ucrypto.parseAccountPrivateKeyAsync(files.private_key).then(function (keypair) {
|
return leCrypto.parseAccountPrivateKeyAsync(files.private_key).then(function (keypair) {
|
||||||
files.accountId = accountId; // md5sum(publicKeyPem)
|
files.accountId = accountId; // md5sum(publicKeyPem)
|
||||||
files.publicKeyMd5 = accountId; // md5sum(publicKeyPem)
|
files.publicKeyMd5 = accountId; // md5sum(publicKeyPem)
|
||||||
files.publicKeyPem = keypair.publicKeyPem; // ascii PEM: ----BEGIN...
|
files.publicKeyPem = keypair.publicKeyPem; // ascii PEM: ----BEGIN...
|
||||||
|
@ -144,7 +142,7 @@ function getAccountByEmail(args) {
|
||||||
function getCertificateAsync(account, args, defaults, handlers) {
|
function getCertificateAsync(account, args, defaults, handlers) {
|
||||||
var pyconf = PromiseA.promisifyAll(require('pyconf'));
|
var pyconf = PromiseA.promisifyAll(require('pyconf'));
|
||||||
|
|
||||||
return ucrypto.generateRsaKeypairAsync(args.rsaBitLength, args.rsaExponent).then(function (domain) {
|
return leCrypto.generateRsaKeypairAsync(args.rsaBitLength, args.rsaExponent).then(function (domain) {
|
||||||
return lef.getCertificateAsyncAsync({
|
return lef.getCertificateAsyncAsync({
|
||||||
newAuthorizationUrl: args._acmeUrls.newAuthz
|
newAuthorizationUrl: args._acmeUrls.newAuthz
|
||||||
, newCertificateUrl: args._acmeUrls.newCert
|
, newCertificateUrl: args._acmeUrls.newCert
|
||||||
|
|
Loading…
Reference in New Issue