libsec: fix mistake breaking tlsServer() (thanks sl)
This commit is contained in:
parent
5e07e5840a
commit
aa2b5bc0e7
1 changed files with 3 additions and 2 deletions
|
@ -592,9 +592,10 @@ tlsServer2(int ctl, int hand, uchar *cert, int certlen, int (*trace)(char*fmt, .
|
|||
tlsError(c, EUnexpectedMessage, "expected a client hello");
|
||||
goto Err;
|
||||
}
|
||||
c->clientVersion = m.u.clientHello.version;
|
||||
if(trace)
|
||||
trace("ClientHello version %x\n", m.u.clientHello.version);
|
||||
if(setVersion(c, m.u.clientHello.version) < 0) {
|
||||
trace("ClientHello version %x\n", c->clientVersion);
|
||||
if(setVersion(c, c->clientVersion) < 0) {
|
||||
tlsError(c, EIllegalParameter, "incompatible version");
|
||||
goto Err;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue