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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -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


[NewObject] Socket startTls();
};
Expand Down Expand Up @@ -211,6 +212,16 @@ Cancelling the socket's ReadableStream and closing the socket's WritableStream d

The {{upgraded}} attribute is a boolean flag that indicates whether the socket has been upgraded to a secure connection (using `startTLS()`).

<h4 id="secureTransport-attribute">secureTransport</h4>

The {{secureTransport}} attribute is a string value indicating the type of secure transport used by the socket. Possible values are:

<ul>
<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.


<h3 id="methods">Methods</h3>

<h4 id="close-method">close(optional any reason)</h4>
Expand Down