summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/celmatcher.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp/celmatcher.go')
-rw-r--r--modules/caddyhttp/celmatcher.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/caddyhttp/celmatcher.go b/modules/caddyhttp/celmatcher.go
index c4635e2..fbc5f5a 100644
--- a/modules/caddyhttp/celmatcher.go
+++ b/modules/caddyhttp/celmatcher.go
@@ -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 {