GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
OpenXPKI::Server::API2::Plugin::Crypto::validate_ruleset(3) User Contributed Perl Documentation OpenXPKI::Server::API2::Plugin::Crypto::validate_ruleset(3)

OpenXPKI::Server::API2::Plugin::Crypto::validate_ruleset

Check 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

  • "input" Hash

    the hash with the keys properties

  • "ruleset" Hash

    the hash with the rules as defined in the profile, the attribute name (e.g. key_length) must be the key of the first level.

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 ]

Alias to validate_ruleset for backward compatibility, the input parameters are mapped as is to the new method.

Parameters

  • "key_params" Hash
  • "key_rules" Hash
2022-05-14 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.