(value any)
| 135 | } |
| 136 | |
| 137 | func validatePem(value any) error { |
| 138 | strVal, ok := value.(string) |
| 139 | if !ok { |
| 140 | return errors.New("invalid non-string Pem value") |
| 141 | } |
| 142 | |
| 143 | _, rest := pem.Decode([]byte(strVal)) |
| 144 | if len(rest) != 0 { |
| 145 | return fmt.Errorf("invalid Pem value: unexpected trailing bytes %x", rest) |
| 146 | } |
| 147 | |
| 148 | return nil |
| 149 | } |
| 150 | |
| 151 | // TODO(XXX): standardize on curve name representation, use a schema enum instead of a type. |
| 152 | var curveNames = map[string]bool{ |
nothing calls this directly
no outgoing calls
no test coverage detected