Skip to content

Mistake of SNI extention handling #319

@hayden-pan

Description

@hayden-pan

Maybe the code below is getting the server name from wrong place when the dtls server handling SNI extension.
I think the server should get the server name from the state of the connection, which variable name is state in this function scope. Am I right?

dtls/flight4handler.go

Lines 204 to 208 in d01fc85

if cfg.localPSKCallback == nil {
certificate, err := cfg.getCertificate(cfg.serverName)
if err != nil {
return nil, &alert{alertLevelFatal, alertHandshakeFailure}, err
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions