Miroshin Stepan

Results 394 comments of Miroshin Stepan
trafficstars

`Ed25519` is not specified in WebCrypto API this is why algorithm names are different for native webcrypto and `@peculiar/webcrypto`. For `@peculiar/x509` it's possible to solve by extending [EdAlgorithm](https://github.com/PeculiarVentures/x509/blob/master/src/ed_algorithm.ts). I'll prepare...

@panva It sounds good. I've created the new ticket #60

The situation is such that when publishing npm modules, I compile the code into two formats: CommonJS (cjs) and ECMAScript modules (esm). I utilize Rollup to generate bundled files as...

This script works fine. Decrypted message is `Test message.` ```js // Decode input certificate const certificateBuffer = fromPEM(`-----BEGIN CERTIFICATE----- MIIC0zCCAb2gAwIBAgIBATALBgkqhkiG9w0BAQUwHjEcMAkGA1UEBhMCUlUwDwYD VQQDHggAVABlAHMAdDAeFw0yMjEwMjEwOTA2MDRaFw0yMzEwMjEwOTA2MDRaMB4x HDAJBgNVBAYTAlJVMA8GA1UEAx4IAFQAZQBzAHQwggEiMA0GCSqGSIb3DQEBAQUA A4IBDwAwggEKAoIBAQC4uB/cg0Im+hig+rWwTtupKeggjPovc9m3oNiap+dUqFaL IOs+KeTFF79vaR+tkWYW9uVJ7AyjQghb4ogEaaUnnD1xRaFc1trzCms0IUr6HUvS RqqfPM2fasoYJ92I0ekSkcuk20L+XAWc2u0/8cyZjFBEhnRrJE0+wi0NrRbDNhWR H6H+eP1CPSSfi/TiRwuqxawuUWZhoisy2XLLPSPI1ZgUic4xMPZAbJ7GCnDn3tB6 bgWL3ZBneIOkO2521dI+zF+p64vloe4vaxhi6S2kiuxiAL8mJAHR5kL0s/5r9WxB YlgSy4wqfqIg02vtQtD56QxIn2ROLHYVXWGyzDUJAgMBAAGjIDAeMA8GA1UdEwQI MAYBAf8CAQMwCwYDVR0PBAQDAgAGMAsGCSqGSIb3DQEBBQOCAQEAFOqmEnVvyZfC 7f84Jgb5HzdzKIqnCZZWHxq2w4s7aiO1C2Gmnh7rR/C2VMAIPipspZllkIK3b6RB...

@gnarea `@peculiar/x509` is based on this schema. PKIjs includes PKI logic and ASN.1 schemas. The simplest way to parse the Certificate using PKIjs is `pkijs.Certificate.fromBER(raw)`.

> Note that the reason why I want to init a PKI.js Certificate with an asn1-schema/x509 Certificate, instead of a Buffer/ArrayBuffer, is that the X.509 is contained in an ASN.1...

`@peculiar/x509` has a simple chain validation. But it's based on certificate signatures. It doesn't check revocations and policies. I'd like to support the chain validation with those features, but I...

Please share your example code. PKIjs includes tests for EC algorithms and it works.

I found that commented code https://github.com/jindw/xmldom/blob/master/dom.js#L1042-L1043 If uncomment that code it works fine ### Example 1 ```js const doc = new DOMImplementation().createDocument(null, "root"); doc.documentElement.appendChild(doc.createElement("child")); const signature1 = doc.createElementNS("https://signature.com", "Signature"); doc.documentElement.appendChild(signature1);...

I've got a similar problem. I'm using `@peculiar/webcrypto` module which uses NodeJS Crypto API. ### NodeJS ```js const { Crypto } = require("@peculiar/webcrypto"); async function main() { const crypto =...