Skip to content

Commit

Permalink
celmatcher: Implement pkix.Name conversion to string
Browse files Browse the repository at this point in the history
  • Loading branch information
francislavoie committed Apr 13, 2023
1 parent 4636109 commit d38823c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/caddyhttp/celmatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,10 @@ type celPkixName struct{ *pkix.Name }
func (pn celPkixName) ConvertToNative(typeDesc reflect.Type) (any, error) {
return pn.Name, nil
}
func (celPkixName) ConvertToType(typeVal ref.Type) ref.Val {
func (pn celPkixName) ConvertToType(typeVal ref.Type) ref.Val {
if typeVal.TypeName() == "string" {
return types.String(pn.Name.String())
}
panic("not implemented")
}
func (pn celPkixName) Equal(other ref.Val) ref.Val {
Expand Down

0 comments on commit d38823c

Please sign in to comment.