asn1-schema is a collection of TypeScript schemas that make working with common ASN.1 objects easy
Installations
npm install @peculiar/asn1-ecc
Releases
Unable to fetch releases
Developer
PeculiarVentures
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
Yes
Node Version
20.14.0
NPM Version
lerna/7.4.2/node@v20.14.0+x64 (darwin)
Statistics
34 Stars
369 Commits
11 Forks
7 Watching
4 Branches
7 Contributors
Updated on 25 Nov 2024
Languages
TypeScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
11,724,377
Last day
-18.7%
37,767
Compared to previous day
Last week
7.7%
231,907
Compared to previous week
Last month
6.7%
885,398
Compared to previous month
Last year
195.7%
8,155,769
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
4
asn1-schema
asn1-schema
is a collection of TypeScript schemas that make working with common ASN.1 objects easy.
List of schemas
- adobe acrobat
- android
- cert transparency (RFC 6962)
- cms (RFC 5652)
- csr (RFC 2986)
- ecc (RFC 5915, RFC 5480)
- lei
- ntqwac
- ocsp (RFC 6960)
- pfx (RFC 7292)
- pkcs8 (RFC 5208)
- pkcs9 (RFC 2985)
- rfc8226 (RFC 8226)
- rsa (RFC 8017)
- tsp (RFC 3161)
- x509 (RFC 5280)
- x509 attr (RFC 5755)
- x509 logotype (RFC 3709)
- x509 netscape
- x509 qualified (RFC 3739)
- x509 qualified etsi
- x509 trustanchor (RFC 5914)
Usage
1import { AsnParser } from "@peculiar/asn1-schema"; 2import { Certificate } from "@peculiar/asn1-x509"; 3 4const pem = "MIIFjjCCBHagAwIBAgIMVcQBzZcO9v+nopB ... HCiLvXBWEiC6qLVM2dKZ/Ab8Xv+/3Q=="; 5const cert = AsnParser.parse(Buffer.from(pem, "base64"), Certificate); 6 7console.log(cert);
Output
Certificate {
tbsCertificate: TBSCertificate {
version: 2,
serialNumber: ArrayBuffer {
[Uint8Contents]: <55 c4 01 cd 97 0e f6 ff a7 a2 90 7e>,
byteLength: 12
},
signature: AlgorithmIdentifier {
algorithm: '1.2.840.113549.1.1.11',
parameters: null
},
issuer: Name { rdnSequence: [RDNSequence] },
validity: Validity { notBefore: [Time], notAfter: [Time] },
subject: Name { rdnSequence: [RDNSequence] },
subjectPublicKeyInfo: SubjectPublicKeyInfo {
algorithm: [AlgorithmIdentifier],
subjectPublicKey: [ArrayBuffer]
},
extensions: [
[Extension], [Extension],
[Extension], [Extension],
[Extension], [Extension],
[Extension], [Extension],
[Extension], [Extension]
]
},
signatureAlgorithm: AlgorithmIdentifier {
algorithm: '1.2.840.113549.1.1.11',
parameters: null
},
signatureValue: ArrayBuffer {
[Uint8Contents]: <ab 39 6f 0d a3 67 ac bf 9d 9d 20 75 da 14 ba fd 91 c5 f5 34 db d4 17 a0 88 ec 6f d5 bd 1d d3 31 df b9 f8 85 5a b0 42 02 f6 74 3f d1 35 fa 38 cb 7e 22 09 73 6d f1 b1 b6 95 c9 49 95 a1 b1 0f 80 21 d5 e6 52 02 ee ef bd 41 31 85 d1 1e 21 58 58 74 ab a6 67 ca d6 28 39 ad ca 3e 43 be ad 0e 71 85 63 1e 67 ... 156 more bytes>,
byteLength: 256
}
}
Development
Create schema
yarn run create <name>
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
2 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
Reason
8 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 6
Reason
Found 2/18 approved changesets -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/test.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/PeculiarVentures/asn1-schema/test.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/PeculiarVentures/asn1-schema/test.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/PeculiarVentures/asn1-schema/test.yml/master?enable=pin
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 16 are checked with a SAST tool
Score
3.6
/10
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More