Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f41eb86149 | |||
| 10bec39d0e | |||
| 84edfee6a7 |
+4
-1
@@ -201,7 +201,10 @@ int ssl3_read_n(SSL *s, int n, int max, int extend) {
|
||||
rb->offset = len + align;
|
||||
}
|
||||
|
||||
assert(n <= (int)(rb->len - rb->offset));
|
||||
if (n > (int)(rb->len - rb->offset)) {
|
||||
OPENSSL_PUT_ERROR(SSL, ssl3_read_n, ERR_R_INTERNAL_ERROR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!s->read_ahead) {
|
||||
/* ignore max parameter */
|
||||
|
||||
+1
-1
@@ -954,7 +954,7 @@ uint8_t *ssl_add_clienthello_tlsext(SSL *s, uint8_t *buf, uint8_t *limit,
|
||||
}
|
||||
}
|
||||
|
||||
if (SSL_USE_SIGALGS(s)) {
|
||||
if (SSL_CLIENT_USE_TLS1_2_CIPHERS(s)) {
|
||||
size_t salglen;
|
||||
const uint8_t *salg;
|
||||
salglen = tls12_get_psigalgs(s, &salg);
|
||||
|
||||
@@ -172,6 +172,11 @@ func (hs *serverHandshakeState) readClientHello() (isResume bool, err error) {
|
||||
}
|
||||
c.clientVersion = hs.clientHello.vers
|
||||
|
||||
// Reject < 1.2 ClientHellos with signature_algorithms.
|
||||
if c.clientVersion < VersionTLS12 && len(hs.clientHello.signatureAndHashes) > 0 {
|
||||
return false, fmt.Errorf("tls: client included signature_algorithms before TLS 1.2")
|
||||
}
|
||||
|
||||
c.vers, ok = config.mutualVersion(hs.clientHello.vers)
|
||||
if !ok {
|
||||
c.sendAlert(alertProtocolVersion)
|
||||
|
||||
Reference in New Issue
Block a user