From 6b1208fec350f386677daad1d16caf9ebbf1effa Mon Sep 17 00:00:00 2001 From: Roland Groen Date: Mon, 4 Nov 2024 11:08:21 +0100 Subject: [PATCH] Document the resolve method. Documented that the resolve method to adheres to the DID:x509 v1.0 Draft specification. Notable changes include the implementation of the "otherName" SAN policy and support for "serialNumber" in the "subject" policy. The "eku" policy remains unimplemented. --- vdr/didx509/resolver.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vdr/didx509/resolver.go b/vdr/didx509/resolver.go index 8f71223c1..12f524fdf 100644 --- a/vdr/didx509/resolver.go +++ b/vdr/didx509/resolver.go @@ -83,6 +83,12 @@ type X509DidReference struct { } // Resolve resolves a DID document given its identifier and corresponding metadata. +// The resolve method resolves using the did:x509 v1.0 Draft method specification found at: +// https://trustoverip.github.io/tswg-did-x509-method-specification/ +// Given this specification, this implementation diverges from the spec at the following: +// * Besides the "san" policies "email" / "dns" / "uri", the san policy "otherName" is also implemented. +// * The policy "subject" also supports "serialNumber", besides the "CN" / "L" / "ST" / "O" / "OU" / "C" / "STREET" fields. +// * The policy "eku" is not implemented. func (r Resolver) Resolve(id did.DID, metadata *resolver.ResolveMetadata) (*did.Document, *resolver.DocumentMetadata, error) { if id.Method != MethodName { return nil, nil, fmt.Errorf("unsupported DID method: %s", id.Method)