Skip to content

Commit

Permalink
Merge branch 'main' into refactor-return-type-cipher-key-init-destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
jouho authored Jul 10, 2024
2 parents c07b61d + 78efb6f commit 68e7f04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions api/s2n.h
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,13 @@ typedef enum {
* Sets up a connection to request the certificate status of a peer during an SSL handshake. If set
* to S2N_STATUS_REQUEST_NONE, no status request is made.
*
* @note SHA-1 is the only supported hash algorithm for the `certID` field. This is different
* from the hash algorithm used for the OCSP signature. See
* [RFC 6960](https://datatracker.ietf.org/doc/html/rfc6960#section-4.1.1) for more information.
* While unlikely to be the case, if support for a different hash algorithm is required, the
* s2n-tls validation can be disabled with `s2n_config_set_check_stapled_ocsp_response()` and the
* response can be retrieved for manual validation with `s2n_connection_get_ocsp_response()`.
*
* @param config The configuration object being updated
* @param type The desired request status type
* @returns S2N_SUCCESS on success. S2N_FAILURE on failure
Expand Down
4 changes: 3 additions & 1 deletion tls/s2n_x509_validator.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,9 @@ S2N_RESULT s2n_x509_validator_validate_cert_stapled_ocsp_response(struct s2n_x50
int status = 0;
int reason = 0;

/* sha1 is the only supported OCSP digest */
/* SHA-1 is the only supported hash algorithm for the CertID due to its established use in
* OCSP responders.
*/
OCSP_CERTID *cert_id = OCSP_cert_to_id(EVP_sha1(), subject, issuer);
RESULT_ENSURE_REF(cert_id);

Expand Down

0 comments on commit 68e7f04

Please sign in to comment.