PeculiarVentures / PKI.js

PKI.js is a pure JavaScript library implementing the formats that are used in PKI applications (signing, encryption, certificate requests, OCSP and TSP requests/responses). It is built on WebCrypto (Web Cryptography API) and requires no plug-ins.
http://pkijs.org
Other
1.25k stars 204 forks source link

PKCS#10 and RSA-OAEP #263

Closed darkedges closed 4 years ago

darkedges commented 4 years ago

I am generating an keypair using RSA-OAEP, but when I try and generate a PKCS#10 I get the following

core.js:5828 ERROR TypeError: Cannot set property 'name' of undefined
    at CryptoEngine.getSignatureParameters (CryptoEngine.js:2258)
    at CertificationRequest.js:337
    at ZoneDelegate.invoke (zone-evergreen.js:365)
    at Object.onInvoke (core.js:40766)
    at ZoneDelegate.invoke (zone-evergreen.js:364)
    at Zone.run (zone-evergreen.js:124)
    at zone-evergreen.js:851
    at ZoneDelegate.invokeTask (zone-evergreen.js:400)
    at Object.onInvokeTask (core.js:40744)
    at ZoneDelegate.invokeTask (zone-evergreen.js:399)

Seems currently it only support keys that have the sign operation.

Regards Nicholas

rmhrisk commented 4 years ago

A CSR needs to be signed; if producing a CSR for a key without the ability to sign you must sign it with another key.

darkedges commented 4 years ago

Thanks, will investigate further. Closing.