Skip to content

Commit

Permalink
celmatcher: Implement pkix.Name conversion to string (#5492)
Browse files Browse the repository at this point in the history
  • Loading branch information
francislavoie authored Apr 19, 2023
1 parent 998c6e0 commit b301a3d
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 b301a3d

Please sign in to comment.