Skip to content

Introduced crypto.subtle.generateCertificate(). #947

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

VadimZhestikov
Copy link
Contributor

It fixes #766 on GitHub.

@VadimZhestikov VadimZhestikov force-pushed the gen-ssl-cert branch 3 times, most recently from 754a353 to e83fb52 Compare July 18, 2025 04:33
@VadimZhestikov VadimZhestikov force-pushed the gen-ssl-cert branch 6 times, most recently from aba3246 to 3ed2ad0 Compare July 30, 2025 22:53
Previously, r.setReturnValue() had to be used when returning a value from async js_set handler.

async function hash(r) {
    let hash = await crypto.subtle.digest('SHA-512', r.headersIn.host);
    r.setReturnValue(Buffer.from(hash).toString('hex'));
}

Now r.setReturnValue() is not needed:

async function hash(r) {
    let hash = await crypto.subtle.digest('SHA-512', r.headersIn.host);
    return Buffer.from(hash).toString('hex');
}

In addition, infinite microtask loops detection is added.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for SSL certificate generation
1 participant