Update NSS to 3.38

- Added HACL*Poly1305 32-bit (INRIA/Microsoft)
- Updated to final TLS 1.3 draft version (28)
- Removed TLS 1.3 prerelease draft limit check
- Removed NPN code
- Enabled dev/urandom-only RNG on Linux with NSS_SEED_ONLY_DEV_URANDOM for non-standard environments
- Fixed several bugs with TLS 1.3 negotiation
- Updated internal certificate store
- Added support for the TLS Record Size Limit Extension.
- Fixed CVE-2018-0495
- Various security fixes in the ASN.1 code.
This commit is contained in:
wolfbeast 2018-08-14 07:52:35 +02:00 committed by Roy Tam
commit d36d4eb674
197 changed files with 4873 additions and 7145 deletions

View file

@ -21,6 +21,7 @@ extern "C" {
#include "tls_connect.h"
#include "tls_filter.h"
#include "tls_parser.h"
#include "rsa8193.h"
namespace nss_test {
@ -100,4 +101,39 @@ TEST_P(TlsConnectStreamPre13,
Connect();
}
// Replace the server certificate with one that uses 8193-bit RSA.
class TooLargeRSACertFilter : public TlsHandshakeFilter {
public:
TooLargeRSACertFilter(const std::shared_ptr<TlsAgent> &server)
: TlsHandshakeFilter(server, {kTlsHandshakeCertificate}) {}
protected:
virtual PacketFilter::Action FilterHandshake(const HandshakeHeader &header,
const DataBuffer &input,
DataBuffer *output) {
const uint32_t cert_len = sizeof(rsa8193);
const uint32_t outer_len = cert_len + 3;
size_t offset = 0;
offset = output->Write(offset, outer_len, 3);
offset = output->Write(offset, cert_len, 3);
offset = output->Write(offset, rsa8193, cert_len);
return CHANGE;
}
};
TEST_P(TlsConnectGenericPre13, TooLargeRSAKeyInCert) {
EnableOnlyStaticRsaCiphers();
MakeTlsFilter<TooLargeRSACertFilter>(server_);
ConnectExpectAlert(client_, kTlsAlertIllegalParameter);
client_->CheckErrorCode(SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE);
server_->CheckErrorCode(SSL_ERROR_ILLEGAL_PARAMETER_ALERT);
}
TEST_P(TlsConnectGeneric, ServerAuthBiggestRsa) {
Reset(TlsAgent::kRsa8192);
Connect();
CheckKeys();
}
} // namespace nss_test