-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(node): implement createPrivateKey #20981
fix(node): implement createPrivateKey #20981
Conversation
@@ -202,3 +203,28 @@ for (const primeLength of [1024, 2048, 4096]) { | |||
}, | |||
}); | |||
} | |||
|
|||
const rsaPrivateKey = Deno.readTextFileSync( | |||
new URL("../testdata/rsa_private.pem", import.meta.url), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be import.meta.resolve("../testdata/rsa_private.pem");
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deno.readTextFileSync
does not support the file://
scheme
// openssl ecparam -name secp256r1 -genkey -noout -out a.pem | ||
// openssl pkcs8 -topk8 -nocrypt -in a.pem -out b.pem | ||
const ecPrivateKey = Deno.readTextFileSync( | ||
new URL("./ec_private_secp256r1.pem", import.meta.url), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline, we'll enable more native tests once KeyObject support in sign and verify is added (in a follow up).
} | ||
|
||
export(_options: unknown) { | ||
notImplemented("crypto.PrivateKeyObject.prototype.export"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you open an issue about missing support for PrivateKeyObject.export
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Towards #18455