Skip to content

Implement support for custom verify callbacks

Compare
Choose a tag to compare
@VaporBot VaporBot released this 04 Aug 11:37
· 159 commits to main since this release
c814b6f
This patch was authored by @Lukasa and released by @0xTim.

Motivation

When using NIOSSL it is sometimes necessary to completely take over the
certificate verification logic. NIOSSL exposes a callback for this, but
it's currently hidden from Vapor users. We should let them get access to
this callback.

Modifications

  • Added the callback to the HTTPServer configuration struct.
  • Plumbed the callback through.
  • Added some invalid test certs to the resources for the tests.
  • Added a test to confirm the override functions correctly.

Result

Users can override client cert validation.