lib/tttls1.3/message/extensions.rb
# NOTE:
# "pre_shared_key" MUST be the last extension in the ClientHello
#
# @return [String]
"pre_shared_key" MUST be the last extension in the ClientHello
" pre_shared_key " MUST be the last extension in the ClientHello
def serialize
        except_ch_psk = values.reject do |ex|
          ex.extension_type == ExtensionType::PRE_SHARED_KEY &&
            ex.msg_type == HandshakeType::CLIENT_HELLO
        end
        binary = except_ch_psk.map(&:serialize).join
        psk = super_fetch(ExtensionType::PRE_SHARED_KEY, nil)
        binary += psk.serialize if psk&.msg_type == HandshakeType::CLIENT_HELLO
        binary.prefix_uint16_length
      end
def serialize except_ch_psk = values . reject do | ex | ex . extension_type == ExtensionType :: PRE_SHARED_KEY && ex . msg_type == HandshakeType :: CLIENT_HELLO end binary = except_ch_psk . map ( & :serialize ) . join psk = super_fetch ( ExtensionType :: PRE_SHARED_KEY , nil ) binary += psk . serialize if psk &. msg_type == HandshakeType :: CLIENT_HELLO binary . prefix_uint16_length end
NOTE:
"pre_shared_key" MUST be the last extension in the ClientHello
NOTE : " pre_shared_key " MUST be the last extension in the ClientHello
None
String