remove junk crypto

This commit is contained in:
AJ ONeal 2015-12-16 09:25:39 +00:00
parent 8cb372105a
commit eaa58694f0
1 changed files with 4 additions and 6 deletions

View File

@ -3,13 +3,11 @@
var PromiseA = require('bluebird');
var path = require('path');
var fs = PromiseA.promisifyAll(require('fs'));
var requestAsync = PromiseA.promisify(require('request'));
var LE = require('../');
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 ipc = {}; // in-process cache
@ -42,7 +40,7 @@ function createAccount(args, handlers) {
// TODO support ECDSA
// 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 } */
return LeCore.registerNewAccountAsync({
@ -120,7 +118,7 @@ function getAccount(accountId, 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.publicKeyMd5 = accountId; // md5sum(publicKeyPem)
files.publicKeyPem = keypair.publicKeyPem; // ascii PEM: ----BEGIN...
@ -144,7 +142,7 @@ function getAccountByEmail(args) {
function getCertificateAsync(account, args, defaults, handlers) {
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({
newAuthorizationUrl: args._acmeUrls.newAuthz
, newCertificateUrl: args._acmeUrls.newCert