notaryproject / notation-go

A collection of libraries for supporting sign and verify OCI artifacts. Based on Notary Project specifications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

trusted identity parsing error was not returned

JeyJeyGao opened this issue · comments

As shown in the code, the error was handled but didn't return the real error which can help the user locate the issue.

	dn, err := ldapv3.ParseDN(name)
	if err != nil {
		return nil, fmt.Errorf("distinguished name (DN) %q is not valid, it must contain 'C', 'ST', and 'O' RDN attributes at a minimum, and follow RFC 4514 standard", name)
	}

Nice catch! Will create a PR and add the corresponding logic.