mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
introduce new builtin crypto.parse_private_keys
* crypto.parse_private_keys parses private keys, returns a list of valid keys * consolidated getPrivateKeysFromString with getPrivateKeysFromPEMData for crypto.x509.parse_rsa_private_key and crypto.parse_private_keys * reworked crypto.x509.parse_rsa_private_key so that we no longer need getPrivateKeysFromString but instead determine type of key in builtin function and added input validation checks Co-authored-by: Charlie Egan <git@charlieegan3.com> Signed-off-by: Emil Volckmar Ry <emilvry@gmail.com>
This commit is contained in:
committed by
Ashutosh Narkar
parent
57c4daa7fa
commit
cfb03ca495
@@ -671,6 +671,31 @@
|
||||
"type": "function"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "crypto.parse_private_keys",
|
||||
"decl": {
|
||||
"args": [
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"dynamic": {
|
||||
"dynamic": {
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "any"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"type": "function"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "crypto.sha1",
|
||||
"decl": {
|
||||
|
||||
Reference in New Issue
Block a user