Skip to content

Commit

Permalink
Update pkijs link
Browse files Browse the repository at this point in the history
  • Loading branch information
microshine committed Dec 19, 2016
1 parent 99909a9 commit 431a4f4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
1 change: 0 additions & 1 deletion index.d.ts
@@ -1,5 +1,4 @@
/// <reference types="xml-core" />
/// <reference types="pkijs" />

declare namespace XmlDSigJs {

Expand Down
6 changes: 1 addition & 5 deletions package.json
Expand Up @@ -41,13 +41,9 @@
"dependencies": {
"@types/asn1js": "latest",
"@types/node": "^6.0.46",
"pkijs": "git+ssh@github.com:PeculiarVentures/pkijs-es6",
"pkijs": "git+https://github.com/microshine/pkijs-es6",
"xml-core": "^1"
},
"peerDependencies": {
"asn1js": "git+ssh@github.com:PeculiarVentures/asn1js-es6",
"pvutils": "git+ssh@github.com:PeculiarVentures/pvutils"
},
"devDependencies": {
"node-webcrypto-ossl": "^1.0.10",
"ts-loader": "^1.1.0",
Expand Down
10 changes: 4 additions & 6 deletions src/pki/x509.ts
@@ -1,10 +1,8 @@
import { XmlError, XE } from "xml-core";
import { Convert } from "xml-core";
import { Application } from "../application";
import Certificate from "pkijs/build/Certificate";
import RelativeDistinguishedNames from "pkijs/build/RelativeDistinguishedNames";
import RSAPublicKey from "pkijs/build/RSAPublicKey";
import * as asn1js from "asn1js";
import { Certificate, RelativeDistinguishedNames, RSAPublicKey } from "pkijs";
import * as Asn1Js from "asn1js";

export declare type DigestAlgorithm = "SHA-1" | "SHA-256" | "SHA-384" | "SHA-512";

Expand Down Expand Up @@ -162,7 +160,7 @@ export class X509Certificate {
*/
protected LoadRaw(rawData: BufferSource) {
this.raw = new Uint8Array(rawData as ArrayBuffer);
let asn1 = asn1js.fromBER(this.raw.buffer);
let asn1 = Asn1Js.fromBER(this.raw.buffer);
this.simpl = new Certificate({ schema: asn1.result });
}

Expand All @@ -188,7 +186,7 @@ export class X509Certificate {
exportKey(algorithm: Algorithm) {
return Promise.resolve()
.then(() => {
let asn1_publicKey = asn1js.fromBER(this.simpl.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHex);
let asn1_publicKey = Asn1Js.fromBER(this.simpl.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHex);
let alg_oid = this.simpl.subjectPublicKeyInfo.algorithm.algorithmId;
let jwk: any = null;
switch (alg_oid) {
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
@@ -1,7 +1,6 @@
{
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
"lib": [
"es5",
Expand Down

0 comments on commit 431a4f4

Please sign in to comment.