Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 745 Bytes

File metadata and controls

9 lines (5 loc) · 745 Bytes

Custom Certificate Validation example

This example demonstrates how to use a custom TrustedMaterial that implements a custom certificate validator.

This can be used by organizations running private PKI infrastructure to validate certificates issued by that infrastructure, or to implement a custom certificate revocation list (CRL).

This custom TrustedMaterial type wraps any other TrustedMaterial (such as that provided by the Public Good Instance) and acts as a middleware that checks the CRL before the leaf certificate is verified by the wrapped TrustedMaterial.

The code is implemented in NewValidatingTrustedMaterial, in certificate_validator.go. The unit test in certificate_validator_test.go demonstrates how it can be used.