mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 23:42:34 +00:00
Socat might have crashed on peer cert without subject
This commit is contained in:
parent
c3081fbba9
commit
abdf738d1f
2 changed files with 5 additions and 1 deletions
4
CHANGES
4
CHANGES
|
@ -1,5 +1,9 @@
|
||||||
|
|
||||||
Corrections:
|
Corrections:
|
||||||
|
Socat crashed with SIGSEGV when peer presented a certificate without
|
||||||
|
(or empty?) subject.
|
||||||
|
Thanks to Martin Dorey for reporting this issue and sending a patch.
|
||||||
|
|
||||||
Socat 1.7.4.2 did not compile on OmniOS (and probably other OpenSolaris
|
Socat 1.7.4.2 did not compile on OmniOS (and probably other OpenSolaris
|
||||||
distributions)
|
distributions)
|
||||||
Thanks to Andy Fiddaman for sending a patch.
|
Thanks to Andy Fiddaman for sending a patch.
|
||||||
|
|
|
@ -1539,7 +1539,7 @@ static int openssl_setenv_cert_name(const char *field, X509_NAME *name) {
|
||||||
}
|
}
|
||||||
memcpy(str, buf, len);
|
memcpy(str, buf, len);
|
||||||
str[len] = '\0';
|
str[len] = '\0';
|
||||||
Info2("SSL peer cert %s: \"%s\"", field, buf);
|
Info2("SSL peer cert %s: \"%s\"", field, str);
|
||||||
xiosetenv2("OPENSSL_X509", field, str, 1, NULL);
|
xiosetenv2("OPENSSL_X509", field, str, 1, NULL);
|
||||||
free(str);
|
free(str);
|
||||||
BIO_free(bio);
|
BIO_free(bio);
|
||||||
|
|
Loading…
Reference in a new issue