swift-nio-ssl icon indicating copy to clipboard operation
swift-nio-ssl copied to clipboard

TLSConfiguration.certificateRequired attribute

Open borisreitman opened this issue 2 years ago • 12 comments

I have implemented a new attribute .certificateRequired in TLSConfiguration. When set to false, it makes presence of client certificates optional. If the client certificate is provided, then the customVerificationCallback will be called. By default, the attribute is true, which is the current behaviour (failure without client certificate).

From an article referenced below, here is a quote:

"[We] tell it to accept requests with no valid certificate. We need this to handle invalid connections as well (for example to display an error message), otherwise, they would just get a cryptic HTTPS error message from the browser (ERR_BAD_SSL_CLIENT_AUTH_CERT to be precise)"

Reference: https://medium.com/@sevcsik/authentication-using-https-client-certificates-3c9d270e8326

borisreitman avatar Dec 22 '22 17:12 borisreitman

Can one of the admins verify this patch?

swift-server-bot avatar Dec 22 '22 17:12 swift-server-bot

Can one of the admins verify this patch?

swift-server-bot avatar Dec 22 '22 17:12 swift-server-bot

Can one of the admins verify this patch?

swift-server-bot avatar Dec 22 '22 17:12 swift-server-bot

Can one of the admins verify this patch?

swift-server-bot avatar Dec 22 '22 17:12 swift-server-bot

Can one of the admins verify this patch?

swift-server-bot avatar Dec 22 '22 17:12 swift-server-bot

Can one of the admins verify this patch?

swift-server-bot avatar Dec 22 '22 17:12 swift-server-bot

Can one of the admins verify this patch?

swift-server-bot avatar Dec 22 '22 17:12 swift-server-bot

Can one of the admins verify this patch?

swift-server-bot avatar Dec 22 '22 17:12 swift-server-bot

Can one of the admins verify this patch?

swift-server-bot avatar Dec 22 '22 17:12 swift-server-bot

Can one of the admins verify this patch?

swift-server-bot avatar Dec 22 '22 17:12 swift-server-bot

@dnadoba Can you check it again, I pushed a new changeset.

borisreitman avatar Dec 22 '22 22:12 borisreitman

@swift-server-bot test this please

Lukasa avatar Mar 21 '23 16:03 Lukasa