Skip to content

Add secureTransport readonly attribute #32

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anonrig
Copy link
Contributor

@anonrig anonrig commented Apr 14, 2025

Adds a readonly secureTransport attribute to reflect the transport level of the connection.

Ref: cloudflare/workerd#3947

@@ -112,6 +112,7 @@ interface Socket {
Promise<undefined> close(optional any reason);

readonly attribute boolean upgraded;
readonly attribute String secureTransport;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an existing enum defined in the spec for this. https://sockets-api.proposal.wintertc.org/#enumdef-securetransportkind

<li>"on" - TLS/SSL connection</li>
<li>"starttls" - Opportunistic TLS connection</li>
<li>"off" - Insecure TLS connection</li>
</ul>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to update the connect(...) and startTls(...) algorithm definitions to include setting this attribute value.

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.

2 participants