|
NAMEOpenXPKI::Server::API2::Plugin::Crypto::validate_rulesetCOMMANDSvalidate_rulesetCheck if input data matches a defined ruleset.Expects a hash with the params to validate and a hash with a ruleset. The leafes of the rules can be either a list or a single item. The special term _any matches any value (even if the key is not set!) For key_length you can give a discret number or a range min:max, borders are included. You can leave out the upper side (e.g. 1024:) which will match any size above, to avoid a lower limit set it to "0" The attribute digest_alg has an expansion from sha2 to sha224 sha256 sha384 sha512. Any other attributes will result in a "is contained in list" operation. Return is a list with all parameter names that failed validation. Parameters
Example validate_ruleset({ input => { key_length => 512 } ruleset => { key_length => [ _1024, # explicit length, hidden in UI 2048, # explicit length, shown in UI selectors _2048:8192 # allowed range, hidden in UI ] }} }) Will result in [ key_length ] validate_key_paramsAlias to validate_ruleset for backward compatibility, the input parameters are mapped as is to the new method.Parameters
Visit the GSP FreeBSD Man Page Interface. |