Don't fail CertificateRequest if certificate authorities present
Also make spacing consistent with other codebase.
@@ -45,10 +45,11 @@ int s2n_client_cert_req_recv(struct s2n_connection *conn)
uint16_t cert_authorities_len = 0;
GUARD(s2n_stuffer_read_uint16(in, &cert_authorities_len));
- if(cert_authorities_len != 0) {
- /* Avoid parsing X.501 encoded CA Distinguished Names */
- S2N_ERROR(S2N_ERR_UNIMPLEMENTED);
- }
+ /* For now we don't parse X.501 encoded CA Distinguished Names.
+ * Don't fail just yet as we still may succeed if we provide
+ * right certificate or if ClientAuth is optional. */
+ GUARD(s2n_stuffer_skip_read(in, cert_authorities_len));
+
return 0;
}
