summaryrefslogtreecommitdiff
path: root/cpputil
Commit message (Collapse)AuthorAgeFilesLines
* Fix formatting of cpputil/databuffer.hJohn M. Schanck2022-06-011-1/+1
|
* Bug 1771273 - cpputil/databuffer.h: add missing <cstdint> include ↵Sergei Trofimovich2022-05-261-0/+1
| | | | | | | | | | | | | | | | r=nss-reviewers,mt Without the change build fails on this week's gcc-13 snapshot as: ../../cpputil/databuffer.h:20:20: error: 'uint8_t' does not name a type 20 | DataBuffer(const uint8_t* d, size_t l) : data_(nullptr), len_(0) { | ^~~~~~~ ../../cpputil/databuffer.h:14:1: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'? 13 | #include <iostream> +++ |+#include <cstdint> 14 | Differential Revision: https://phabricator.services.mozilla.com/D147404
* Bug 1758478 - Fix DataBuffer Move Assignment. r=mtDennis Jackson2022-03-221-1/+2
| | | | Differential Revision: https://phabricator.services.mozilla.com/D141650
* Bug 1748386 - Enable CKM_CHACHA20, r=rrelyeaMartin Thomson2022-01-111-0/+4
| | | | | | | | | | This change makes a few tiny changes to the code to re-enable the use of Chacha20 ciphers and align their key type. There are a lot more changes in tests, mostly just to factor existing tests and determine that the legacy and final PKCS#11 mechanisms work as expected. Differential Revision: https://phabricator.services.mozilla.com/D135007
* Bug 1747310 - real move assignment operator, r=nss-reviewers,bbeurdoucheMartin Thomson2022-01-051-1/+9
| | | | Differential Revision: https://phabricator.services.mozilla.com/D134818
* Bug 1747310 - move assignment operator for DataBuffer r=nss-reviewers,jschanckMartin Thomson2021-12-281-0/+1
| | | | Differential Revision: https://phabricator.services.mozilla.com/D134556
* Bug 1654332 - Update ESNI to draft-08 (ECH). r=mtKevin Jacobs2020-11-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | This patch adds support for Encrypted Client Hello (draft-ietf-tls-esni-08), replacing the existing ESNI (draft -02) support. There are five new experimental functions to enable this: - SSL_EncodeEchConfig: Generates an encoded (not BASE64) ECHConfig given a set of parameters. - SSL_SetClientEchConfigs: Configures the provided ECHConfig to the given socket. When configured, an ephemeral HPKE keypair will be generated for the CH encryption. - SSL_SetServerEchConfigs: Configures the provided ECHConfig and keypair to the socket. The keypair specified will be used for HPKE operations in order to decrypt encrypted Client Hellos as they are received. - SSL_GetEchRetryConfigs: If ECH is rejected by the server and compatible retry_configs are provided, this API allows the application to extract those retry_configs for use in a new connection. - SSL_EnableTls13GreaseEch: When enabled, non-ECH Client Hellos will have a "GREASE ECH" (i.e. fake) extension appended. GREASE ECH is disabled by default, as there are known compatibility issues that will be addressed in a subsequent draft. The following ESNI experimental functions are deprecated by this update: - SSL_EncodeESNIKeys - SSL_EnableESNI - SSL_SetESNIKeyPair In order to be used, NSS must be compiled with `NSS_ENABLE_DRAFT_HPKE` defined. Differential Revision: https://phabricator.services.mozilla.com/D86106
* Bug 1631890 - Add support for Hybrid Public Key Encryption ↵Kevin Jacobs2020-10-121-0/+5
| | | | | | | | | | | | (draft-irtf-cfrg-hpke-05). r=mt This patch adds support for Hybrid Public Key Encryption (draft-irtf-cfrg-hpke-05). Because the draft number (and the eventual RFC number) is an input to the key schedule, future updates will *not* be backwards compatible in terms of key material or encryption/decryption. For this reason, a default compilation will produce stubs that simply return an "Invalid Algorithm" error. To opt into using the HPKE functionality , compile with `NSS_ENABLE_DRAFT_HPKE` defined. Once finalized, this flag will not be required to access the functions. Lastly, the `DeriveKeyPair` API is not implemented as it adds complextiy around PKCS #11 and is unnecessary for ECH. Differential Revision: https://phabricator.services.mozilla.com/D73947
* Bug 1629553 Merge simple config.mk files r=rrelyeaJan-Marek Glogowski2020-05-053-17/+2
| | | | | | | | | | | There is really no good reason to explicitly change the TARGET variable. And the empty SHARED_LIBRARY variable should also be in the manifest.mn to begin with. All the other empty variables start empty or undefined, so there is also no need to explicitly set them empty. Differential Revision: https://phabricator.services.mozilla.com/D70691
* Bug 290526 Drop recursive private_exports r=rrelyeaJan-Marek Glogowski2020-05-051-3/+0
| | | | | | | Copying private headers is now simply included in the exports target, as these headers use an extra directory anyway. Differential Revision: https://phabricator.services.mozilla.com/D69021
* Bug 1599514 - Update DTLS 1.3 support to draft-30 r=mtKevin Jacobs2020-01-063-0/+8
| | | | | | | | This patch updates the DTLS 1.3 implementation to draft version 30, including unified header format and sequence number encryption. Also added are new `SSL_CreateMask` experimental functions. Differential Revision: https://phabricator.services.mozilla.com/D51014
* Bug 1599545 - Fix assertion and add test for early Key Update message r=mtKevin Jacobs2019-12-021-0/+1
| | | | | | | | Remove an overzealous assertion when a Key Update message is received too early, and add a test for the expected alert condition. Also adds `TlsEncryptedHandshakeMessageReplacer` for replacing TLS 1.3 encrypted handshake messages. This is a simple implementation where only the first byte of the message is changed to the new type (so as to trigger the desired handler). Differential Revision: https://phabricator.services.mozilla.com/D54998
* Bug 1577803, gtests: import pkcs11testmodule from Firefox, r=rrelyeaDaiki Ueno2019-11-051-0/+2
| | | | | | | | | | | | | | | | Summary: This adds a mock PKCS #11 module from Firefox and add basic tests around it. This is needed for proper testing of PKCS #11 v3.0 profile objects (D45669). Reviewers: rrelyea Reviewed By: rrelyea Subscribers: reviewbot Bug #: 1577803 Differential Revision: https://phabricator.services.mozilla.com/D47060
* Bug 1515342 - Checks for invalid bit strings, r=jcjMartin Thomson2019-09-272-16/+21
| | | | Differential Revision: https://phabricator.services.mozilla.com/D15061
* Bug 1570501 - Add AES-CMAC implementation to freebl, r=mtAlexander Scheel2019-08-301-0/+33
| | | | Differential Revision: https://phabricator.services.mozilla.com/D40120
* Bug 1564727 - RSS PSS SPKI for delegated credentials, r=kjacobsMartin Thomson2019-07-101-1/+2
| | | | Differential Revision: https://phabricator.services.mozilla.com/D37521
* Bug 1563078 - Set authKeyBits for delegated credentials, r=jcjMartin Thomson2019-07-151-0/+1
| | | | | | | | | | | | | | | | | | | | | The delegated credentials patch left the channel info unmodified, which meant that it reported the key strength of the end entity certificate and not the delegated credential. For a using application, this is problematic because it can't access information about delegated credentials. In this case, the only omission was the strength of the key. Firefox checks key strength for the entire certificate chain according to its policies, but it also wants to apply the same sort of policy to the delegated credential. In particular, it wants to ensure that an RSA credential (which shouldn't be used, but whatever...) has a long enough modulus, because the NSS policy is less strict than the Firefox one. To address this use case, SSLChannelInfo.authKeyBits is set to the length of the delegated credential key when delegated credentials are in use. This is consistent with the definition of the parameter, but implies a different understanding of its meaning when delegated credentials are enabled. Differential Revision: https://phabricator.services.mozilla.com/D36699
* Bug 1558681 - Anti-replay contexts, r=jcj,kjacobsMartin Thomson2019-06-251-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop using a global anti-replay context and enable creating a context directly. This increases the overhead of managing anti-replay for applications marginally, but allows much greater flexibility in use of anti-replay mechanisms. In particular, it enables the testing of 0-RTT in a threaded environment. The comments in sslexp should be clear enough in explaining how this works. Basically, this is a new reference-counted object that can be created and tracked by applications. The only thing that I can see might be a problem with the API is that I haven't exposed a function to add a reference for use by applications. My thinking is that reference counting is an internal thing; it seems like applications won't need to worry about that. selfserv is updated to create a context and attach it to sockets. This shows that the management overhead is minor. The gtests have been tweaked to create a context during setup. The context is owned by the overall test framework and is passed to server instances after the sockets are initialized. Bonus changes: * ESNI keys are copied from the model socket when calling SSL_ReConfigFD(). * Some better tracing in the anti-replay functions. Neither of these seemed worth the overhead of a bug to fix. Differential Revision: https://phabricator.services.mozilla.com/D34660
* bug 1552262 - add PK11_FindRawCertsBySubject to search a given slot for ↵Dana Keeler2019-05-311-0/+3
| | | | | | certificates with a given subject r=jcj,RyanSleevi.sleevi Differential Revision: https://phabricator.services.mozilla.com/D32067
* Bug 1532312, recognize certificate_required alert, r=mtDaiki Ueno2019-04-081-0/+1
| | | | | | | | | | | | Summary: Some servers send a certificate_required alert when the client returns no certificate while it is required. For server, it is not mandatory to send this alert, but it could make it easier for the client to distinguish bad_certificate and the declined cases. Reviewers: mt Reviewed By: mt Bug #: 1532312 Differential Revision: https://phabricator.services.mozilla.com/D22083
* Bug 1521174 - Add some initial S/MIME gtests r=mtJ.C. Jones2018-12-101-0/+34
| | | | Differential Revision: https://phabricator.services.mozilla.com/D17014
* Bug 1528175 - Expose an AEAD function, r=ekrMartin Thomson2019-02-171-0/+2
|
* Bug 1471126 - Record layer separation, r=ekrMartin Thomson2019-02-171-0/+26
| | | | | | | | | | | | | Summary: Add functions for QUIC that provide the raw content of records to callback functions. Reviewers: ekr Reviewed By: ekr Bug #: 1471126 Differential Revision: https://phabricator.services.mozilla.com/D1874
* Bug 1496124 - Populate public values for imported private keys, r=mtRobert Relyea2018-11-082-0/+9
|
* Bug 1501174 - zero DataBuffer on allocation, r=franziskusMartin Thomson2018-10-231-1/+1
|
* Bug 1479787 - build mozpkix as part of NSS, r=mt,keelerFranziskus Kiefer2018-08-033-9/+43
| | | | | | Differential Revision: https://phabricator.services.mozilla.com/D2719 Differential Revision: https://phabricator.services.mozilla.com/D2720 Differential Revision: https://phabricator.services.mozilla.com/D2861
* Bug 1486667 - Test that rejecting a server certificate works, r=uenoMartin Thomson2018-05-011-0/+2
|
* Bug 1471126 - Rename SSL3ContentType and make it public, r=ekrMartin Thomson2018-06-261-8/+1
| | | | | | The renaming here is less widespread than I expected. I removed the content_alt_handshake while I was at this; no point in putting that in a public API.
* Bug 1457716 - Fix CertificateRequest processing for TLS 1.3. r=mtEKR2018-04-291-0/+2
| | | | | | | | | | | Reviewers: mt Tags: #secure-revision Bug #: 1457716 Differential Revision: https://phabricator.services.mozilla.com/D1062
* Bug 1460673 - fix clang-formatFranziskus Kiefer2018-05-181-1/+1
|
* Bug 1460673 - handle p12 properly, r=ttaubertFranziskus Kiefer2018-05-161-0/+5
| | | | Differential Revision: https://phabricator.services.mozilla.com/D1295
* Bug 1446643 - Update to TLS 1.3 draft-26. r=mtEKR2018-03-152-0/+16
| | | | | | | | | | | | | - Update version number - Forbid negotiating < TLS 1.3 with supported_versions - Change to version number 0303 after HRR. Plus test - Update AAD. https://phabricator.services.mozilla.com/D753
* Bug 1309068 - Enable -Wshadow, r=franziskusMartin Thomson2018-02-142-12/+12
|
* Bug 1399439 - API for external TLS session caches, r=mtFranziskus Kiefer2018-01-161-0/+5
| | | | | | | | Reviewers: mt, ekr Bug #: 1399439 Differential Revision: https://phabricator.services.mozilla.com/D284
* Bug 1429475: Tests for delayed failure and be more aggressive about making ↵EKR2018-01-091-0/+1
| | | | | | | | | | | | | | | | | | | | failures persistent. r=mt, wtc Summary: - Make any call to ssl3_GatherCompleteHandshake (which transitively means any read from the wire) return PR_IO_ERROR if an alert has been sent. - Patch up a few of the tests to handle this new behavior properly. These tests actually were a bit harder to follow so they should also be a bit clearer. - Add a new set of tests for certificate authentication failure. Reviewers: mt Differential Revision: https://phabricator.services.mozilla.com/D365
* Merge NSS trunk to NSS_TLS13_DRAFT19_BRANCHMartin Thomson2017-11-064-105/+141
|\
| * Bug 1407853 - Uncouple databuffer.h from ssl_gtest, r=ttaubertMartin Thomson2017-10-124-91/+128
| |
* | Bug 1396487 - Extra test case for ACK, fragmentation and reassembly, r=ekrMartin Thomson2017-09-071-0/+1
| |
* | Bug 1316231 - DTLS 1.3 ACKs. r=mtEKR2017-09-041-2/+14
| |
* | Merge NSS trunk to NSS_TLS13_DRAFT19_BRANCH, a=mergeMartin Thomson2017-08-241-0/+2
|\ \ | |/
| * Bug 1383824 - set slot->isLoggedIn after setting password, r=ttaubertFranziskus Kiefer2017-08-101-0/+2
| | | | | | | | Differential Revision: https://nss-review.dev.mozaws.net/D391
* | Merge NSS trunk to NSS_TLS13_DRAFT19_BRANCHMartin Thomson2017-08-092-0/+6
|\ \ | |/
| * Bug 1280846 - cpputil: don't compile in unnecessary files if ↵Daiki Ueno2017-07-031-0/+5
| | | | | | | | NSS_BUILD_UTIL_ONLY, r=franziskus
| * Bug 1385917 - Enable different Content Type for ServerHello. r=mtEKR2017-07-261-0/+1
| | | | | | | | | | | | Differential Revision: https://nss-review.dev.mozaws.net/D379 Differential Revision: https://nss-review.dev.mozaws.net/D385
* | Bug 1386191 - ClientHello callback for applications, r=ekrMartin Thomson2017-07-161-0/+1
| |
* | Merge NSS trunk to NSS_TLS13_DRAFT19_BRANCH, a=mergeMartin Thomson2017-07-065-0/+125
|\ \ | |/ | | | | Hg: changed gtests/nss_bogo_shim/nss_bogo_shim.gyp
| * Bug 1376520 - some static analysis (infer) fixes, r=ttaubertFranziskus Kiefer2017-06-271-0/+4
| | | | | | | | Differential Revision: https://nss-review.dev.mozaws.net/D354
| * Bug 1280846 - tests: adjust gtests to compile under modular builds, r=franziskusDaiki Ueno2017-06-011-0/+39
| |
| * Bug 1357319 - Add proper Makefile for cpputil r=mtTim Taubert2017-06-083-0/+82
| | | | | | | | Differential Revision: https://nss-review.dev.mozaws.net/D349
* | Merge NSS trunk to NSS_TLS13_DRAFT19_BRANCH branchMartin Thomson2017-06-111-0/+2
|\ \ | |/