libsec: only send client cert when we have one (fix regression from r6e976b2004dd)
This commit is contained in:
parent
c23a2f6a79
commit
3c3a573562
1 changed files with 5 additions and 3 deletions
|
@ -726,9 +726,11 @@ tlsClient2(int ctl, int hand, uchar *csid, int ncsid, uchar *cert, int certlen,
|
|||
}
|
||||
|
||||
if(creq) {
|
||||
m.u.certificate.ncert = 1;
|
||||
m.u.certificate.certs = emalloc(m.u.certificate.ncert * sizeof(Bytes));
|
||||
m.u.certificate.certs[0] = makebytes(cert, certlen);
|
||||
if(cert != nil && certlen > 0){
|
||||
m.u.certificate.ncert = 1;
|
||||
m.u.certificate.certs = emalloc(m.u.certificate.ncert * sizeof(Bytes));
|
||||
m.u.certificate.certs[0] = makebytes(cert, certlen);
|
||||
}
|
||||
m.tag = HCertificate;
|
||||
if(!msgSend(c, &m, AFlush))
|
||||
goto Err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue