🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@peculiar/x509

Package Overview
Dependencies
Maintainers
7
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peculiar/x509 - npm Package Compare versions

Comparing version
1.13.0
to
1.14.0
+79
-67
build/index.d.ts

@@ -27,5 +27,5 @@ /*!

import { Extension as Extension$1, SubjectPublicKeyInfo, Attribute as Attribute$1, AlgorithmIdentifier, Name as Name$1, Certificate, RevokedCertificate, CertificateList, Version } from '@peculiar/asn1-x509';
import { BufferSource as BufferSource$1 } from 'pvtsutils';
import * as asn1Rsa from '@peculiar/asn1-rsa';
import { CertificationRequest } from '@peculiar/asn1-csr';
import { BufferSource as BufferSource$1 } from 'pvtsutils';

@@ -74,2 +74,3 @@ interface TextObjectConvertible {

declare abstract class AsnData<T> implements TextObjectConvertible {
#private;
static NAME: string;

@@ -79,4 +80,8 @@ /**

*/
readonly rawData: ArrayBuffer;
get rawData(): ArrayBuffer;
/**
* ASN.1 object
*/
protected readonly asn: T;
/**
* Creates a new instance

@@ -238,3 +243,3 @@ * @param raw DER encoded buffer

*/
type PublicKeyType = PublicKey | CryptoKey | IPublicKeyContainer | BufferSource$1;
type PublicKeyType = PublicKey | CryptoKey | IPublicKeyContainer | BufferSource;
/**

@@ -524,3 +529,3 @@ * Representation of Subject Public Key Info

*/
constructor(raw: BufferSource$1);
constructor(raw: BufferSource);
/**

@@ -1074,37 +1079,38 @@ * Creates a new instance

declare class Pkcs10CertificateRequest extends PemData<CertificationRequest> implements IPublicKeyContainer {
#private;
static NAME: string;
protected readonly tag: string;
/**
* ToBeSigned block of CSR
*/
private tbs;
/**
* Gets the subject value from the certificate as an Name
*/
subjectName: Name;
get subjectName(): Name;
/**
* Gets a string subject name
*/
subject: string;
get subject(): string;
/**
* Gets a signature algorithm
*/
signatureAlgorithm: HashedAlgorithm;
get signatureAlgorithm(): HashedAlgorithm;
/**
* Gets a signature
*/
signature: ArrayBuffer;
get signature(): ArrayBuffer;
/**
* Gets a public key of CSR
*/
publicKey: PublicKey;
get publicKey(): PublicKey;
/**
* Gets a list fo CSR attributes
*/
attributes: Attribute[];
get attributes(): Attribute[];
/**
* Gets a list of CSR extensions
*/
extensions: Extension[];
get extensions(): Extension[];
/**
* Gets the ToBeSigned block
*/
private get tbs();
/**
* Creates a new instance fromDER encoded buffer

@@ -1119,3 +1125,3 @@ * @param raw DER encoded buffer

constructor(asn: CertificationRequest);
protected onInit(asn: CertificationRequest): void;
protected onInit(_asn: CertificationRequest): void;
/**

@@ -1256,48 +1262,49 @@ * Returns attribute of the specified type

declare class X509Certificate extends PemData<Certificate> implements IPublicKeyContainer {
#private;
static NAME: string;
protected readonly tag: string;
/**
* ToBeSigned block of certificate
* Gets a public key of the certificate
*/
private tbs;
get publicKey(): PublicKey;
/**
* Gets a hexadecimal string of the serial number
*/
serialNumber: string;
get serialNumber(): string;
/**
* Gets the subject value from the certificate as an Name
*/
subjectName: Name;
get subjectName(): Name;
/**
* Gets a string subject name
*/
subject: string;
get subject(): string;
/**
* Gets the issuer value from the certificate as an Name
*/
issuerName: Name;
get issuerName(): Name;
/**
* Gets a string issuer name
*/
issuer: string;
get issuer(): string;
/**
* Gets a date before which certificate can't be used
*/
notBefore: Date;
get notBefore(): Date;
/**
* Gets a date after which certificate can't be used
*/
notAfter: Date;
get notAfter(): Date;
/**
* Gets a signature algorithm
*/
signatureAlgorithm: HashedAlgorithm;
get signatureAlgorithm(): HashedAlgorithm;
/**
* Gets a signature
*/
signature: ArrayBuffer;
get signature(): ArrayBuffer;
/**
* Gts a list of certificate extensions
* Gets a list of certificate extensions
*/
extensions: Extension[];
get extensions(): Extension[];
/**

@@ -1308,5 +1315,5 @@ * Gets a private key of the certificate

/**
* Gets a public key of the certificate
* Gets the ToBeSigned block
*/
publicKey: PublicKey;
private get tbs();
/**

@@ -1322,3 +1329,3 @@ * Creates a new instance from ASN.1 Certificate object

constructor(raw: AsnEncodedType);
protected onInit(asn: Certificate): void;
protected onInit(_asn: Certificate): void;
/**

@@ -1526,8 +1533,2 @@ * Returns an extension of specified type

static create(params: X509CertificateCreateParams, crypto?: Crypto): Promise<X509Certificate>;
/**
* Normalize and generate a valid serial number according to RFC 5280 (positive, minimal, non-zero)
* @param input Optional input serial number as Uint8Array
* @param crypto Crypto provider
*/
private static generateSerialNumber;
}

@@ -1556,14 +1557,15 @@

declare class X509CrlEntry extends AsnData<RevokedCertificate> {
#private;
/**
* Gets a hexadecimal string of the serial number, the userCertificate
*/
serialNumber: string;
get serialNumber(): string;
/**
* Gets the revocation date
*/
revocationDate: Date;
get revocationDate(): Date;
/**
* Gets the reason code
*/
reason?: X509CrlReason;
get reason(): X509CrlReason | undefined;
/**

@@ -1575,7 +1577,7 @@ * Gets the invalidity Date

*/
invalidity?: Date;
get invalidity(): Date | undefined;
/**
* Gets crl entry extensions
*/
extensions: Extension[];
get extensions(): Extension[];
/**

@@ -1587,2 +1589,7 @@ * Creates a new instance from DER encoded Buffer

/**
* Creates a new instance from ASN.1 object
* @param asn ASN.1 object
*/
constructor(asn: RevokedCertificate);
/**
* Creates a new instance

@@ -1594,3 +1601,3 @@ * @param serialNumber Serial number of certificate

constructor(serialNumber: string, revocationDate: Date, extensions: Extension[]);
protected onInit(asn: RevokedCertificate): void;
protected onInit(_asn: RevokedCertificate): void;
}

@@ -1605,52 +1612,57 @@

declare class X509Crl extends PemData<CertificateList> {
#private;
protected readonly tag: string;
/**
* ToBeSigned block of crl
*/
private tbs;
/**
* Signature field in the sequence tbsCertList
*/
private tbsCertListSignatureAlgorithm;
/**
* Signature algorithm field in the sequence CertificateList
*/
private certListSignatureAlgorithm;
/**
* Gets a version
*/
version?: Version;
get version(): Version | undefined;
/**
* Gets a signature algorithm
*/
signatureAlgorithm: HashedAlgorithm;
get signatureAlgorithm(): HashedAlgorithm;
/**
* Gets a signature
*/
signature: ArrayBuffer;
get signature(): ArrayBuffer;
/**
* Gets a string issuer name
*/
issuer: string;
get issuer(): string;
/**
* Gets the issuer value from the crl as an Name
*/
issuerName: Name;
get issuerName(): Name;
/**
* Gets a thisUpdate date from the CRL
*/
thisUpdate: Date;
get thisUpdate(): Date;
/**
* Gets a nextUpdate date from the CRL
*/
nextUpdate?: Date;
get nextUpdate(): Date | undefined;
/**
* Gets a crlEntries from the CRL
*
* @remarks
* Reading this property parses all revoked certificates, which can be slow for large CRLs.
* Use findRevoked() for efficient searching of specific certificates.
*/
entries: ReadonlyArray<X509CrlEntry>;
get entries(): ReadonlyArray<X509CrlEntry>;
/**
* Gts a list of crl extensions
* Gets a list of crl extensions
*/
extensions: Extension[];
get extensions(): Extension[];
/**
* Gets the ToBeSigned block
*/
private get tbs();
/**
* Gets the signature algorithm from tbsCertList
*/
private get tbsCertListSignatureAlgorithm();
/**
* Gets the signature algorithm from CertificateList
*/
private get certListSignatureAlgorithm();
/**
* Creates a new instance from ASN.1 CertificateList object

@@ -1665,3 +1677,3 @@ * @param asn ASN.1 CertificateList object

constructor(raw: AsnEncodedType);
protected onInit(asn: CertificateList): void;
protected onInit(_asn: CertificateList): void;
/**

@@ -1668,0 +1680,0 @@ * Returns an extension of specified type

{
"name": "@peculiar/x509",
"version": "1.13.0",
"version": "1.14.0",
"description": "@peculiar/x509 is an easy to use TypeScript/Javascript library based on @peculiar/asn1-schema that makes generating X.509 Certificates and Certificate Requests as well as validating certificate chains easy",

@@ -54,29 +54,29 @@ "main": "build/x509.cjs.js",

"devDependencies": {
"@babel/core": "^7.27.4",
"@babel/preset-env": "^7.27.2",
"@eslint/js": "^9.28.0",
"@babel/core": "^7.28.4",
"@babel/preset-env": "^7.28.3",
"@eslint/js": "^9.35.0",
"@peculiar/webcrypto": "^1.5.0",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^28.0.3",
"@rollup/plugin-commonjs": "^28.0.6",
"@rollup/plugin-node-resolve": "^16.0.1",
"@rollup/plugin-terser": "^0.4.4",
"@types/node": "^24.0.0",
"@vitest/coverage-v8": "^3.2.3",
"eslint": "9.28.0",
"@types/node": "^24.3.1",
"@vitest/coverage-v8": "^3.2.4",
"eslint": "^9.35.0",
"rimraf": "^6.0.1",
"rollup": "^4.42.0",
"rollup-plugin-dts": "^6.2.1",
"rollup": "^4.50.1",
"rollup-plugin-dts": "^6.2.3",
"rollup-plugin-typescript2": "^0.36.0",
"typescript": "^5.8.3",
"typescript-eslint": "^8.34.0",
"vitest": "^3.2.3"
"typescript": "^5.9.2",
"typescript-eslint": "^8.42.0",
"vitest": "^3.2.4"
},
"dependencies": {
"@peculiar/asn1-cms": "^2.3.15",
"@peculiar/asn1-csr": "^2.3.15",
"@peculiar/asn1-ecc": "^2.3.15",
"@peculiar/asn1-pkcs9": "^2.3.15",
"@peculiar/asn1-rsa": "^2.3.15",
"@peculiar/asn1-schema": "^2.3.15",
"@peculiar/asn1-x509": "^2.3.15",
"@peculiar/asn1-cms": "^2.5.0",
"@peculiar/asn1-csr": "^2.5.0",
"@peculiar/asn1-ecc": "^2.5.0",
"@peculiar/asn1-pkcs9": "^2.5.0",
"@peculiar/asn1-rsa": "^2.5.0",
"@peculiar/asn1-schema": "^2.5.0",
"@peculiar/asn1-x509": "^2.5.0",
"pvtsutils": "^1.3.6",

@@ -83,0 +83,0 @@ "reflect-metadata": "^0.2.2",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display