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
feat: Implement subset of crypto.subtle.importKey which can import a JSONWebKey using RSASSA-PKCS1-v1_5 #472
Conversation
5b2f113
to
873819c
Compare
…JSONWebKey using RSASSA-PKCS1-v1_5
873819c
to
729f05e
Compare
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 is looking great!
#pragma clang diagnostic push | ||
#pragma clang diagnostic ignored "-Wdeprecated-declarations" | ||
auto rsa = RSA_new(); | ||
#pragma clang diagnostic pop |
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.
Could you add an issue to update this according to the migration guide? It looks like there's an alternate api that we should use instead.
https://www.openssl.org/docs/man3.0/man7/migration_guide.html
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.
Issue at #477
c-dependencies/js-compute-runtime/builtins/crypto-key-rsa-components.h
Outdated
Show resolved
Hide resolved
c-dependencies/js-compute-runtime/builtins/crypto-algorithm.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Trevor Elliott <telliott@fastly.com>
53251eb
to
6b26a22
Compare
…would be deemed valid
6b26a22
to
2af926d
Compare
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 looks great! Just a few suggestions before merging 👍
c-dependencies/js-compute-runtime/builtins/crypto-algorithm.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Trevor Elliott <telliott@fastly.com>
Co-authored-by: Trevor Elliott <telliott@fastly.com>
c-dependencies/js-compute-runtime/builtins/crypto-algorithm.cpp
Outdated
Show resolved
Hide resolved
c-dependencies/js-compute-runtime/builtins/crypto-algorithm.cpp
Outdated
Show resolved
Hide resolved
@JakeChampion Thanks for landing this PR in 1.7.0. I was hoping this would solve our problem (3rd party dependencies relying on Here's a code fragment from https://github.com/mhart/aws4fetch which seems to trigger this error: async function hmac(key2, string3) {
const cryptoKey = await crypto.subtle.importKey(
"raw",
typeof key2 === "string" ? encoder2.encode(key2) : key2,
{ name: "HMAC", hash: { name: "SHA-256" } },
false,
["sign"]
);
return crypto.subtle.sign("HMAC", cryptoKey, encoder2.encode(string3));
} It seems like the lack of Would this PR solve our problem? #440 Can you give us an ETA when this PR lands in production? |
@stefan-guggisberg - #440 does solve that issue 👍 - I am breaking that PR up into smaller more manageable PR for the team to review. If you subscribe to #440, when it is closed you should be able to run the code you've posted without any issues 👍 |
No description provided.