Package io.github.mahmoudimus.quic.tls
Record Class ExtensionSpec
java.lang.Object
java.lang.Record
io.github.mahmoudimus.quic.tls.ExtensionSpec
- Record Components:
type- the extension type, orGREASE_FIRSTorGREASE_LASTfor the hello's two GREASE extensionsbody- makes the body- forkey_share, the groups it carries shares for (GREASE asProfileExtensions.GREASE), so a client can make the keys first; null otherwisepinned- whether shuffling leaves it where it is, as NSS leaves the extensions it adds after its own (QUIC's transport parameters, ECH)
public record ExtensionSpec(int type, ExtensionSpec.Body body, int[] keyShareGroups, boolean pinned)
extends Record
One extension of a
ClientHelloProfile: its type, and how its body is made for a
connection.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceMakes an extension's body for one hello.static interfaceA body made from the rest of the hello, as Firefox's GREASE ECH is sized from the inner hello it would encrypt: encoded after the other extensions' bodies. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe type of the first GREASE extension,Grease.extension1().static final intThe type of the last GREASE extension,Grease.extension2(). -
Constructor Summary
ConstructorsConstructorDescriptionExtensionSpec(int type, ExtensionSpec.Body body) An extension that is notkey_share.ExtensionSpec(int type, ExtensionSpec.Body body, int[] keyShareGroups) An extension that shuffling may move.ExtensionSpec(int type, ExtensionSpec.Body body, int[] keyShareGroups, boolean pinned) Creates an instance of aExtensionSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbody()Returns the value of thebodyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.int[]Returns the value of thekeyShareGroupsrecord component.pin()Returns this extension, in a place that shuffling does not change.booleanpinned()Returns the value of thepinnedrecord component.final StringtoString()Returns a string representation of this record class.inttype()Returns the value of thetyperecord component.
-
Field Details
-
GREASE_FIRST
public static final int GREASE_FIRSTThe type of the first GREASE extension,Grease.extension1().- See Also:
-
GREASE_LAST
public static final int GREASE_LASTThe type of the last GREASE extension,Grease.extension2().- See Also:
-
-
Constructor Details
-
ExtensionSpec
An extension that shuffling may move. -
ExtensionSpec
An extension that is notkey_share. -
ExtensionSpec
Creates an instance of aExtensionSpecrecord class.- Parameters:
type- the value for thetyperecord componentbody- the value for thebodyrecord componentkeyShareGroups- the value for thekeyShareGroupsrecord componentpinned- the value for thepinnedrecord component
-
-
Method Details
-
pin
Returns this extension, in a place that shuffling does not change.- Returns:
- this extension, in a place that shuffling does not change
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
public int type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-
pinned
public boolean pinned()Returns the value of thepinnedrecord component.- Returns:
- the value of the
pinnedrecord component
-