Introduced : BIG-IP_v11.0.0
Gets a list of valid key sizes for specified key types. The valid key sizes are bit-lengths of keys that are supported by the system. For example, 1024 and 2048 mean 128-byte and 256-byte RSA key sizes. These sizes are used when generating or importing a key.


long [] [] get_valid_key_sizes(
    in ManagementModeType mode,
    in KeyType [] key_types,
    in boolean [] fips


Parameter Type Description
mode ManagementModeType The key/cert management mode.
key_types KeyType [] A list of key types for which to retrieve information. As of 11.0.0, RSA key types are supported, and the presence of other types will raise exception Common::InvalidArgument.
fips boolean [] A list of flags indicating whether to retrieve information for fips or not. Some systems have two sets of hardware; standard SSL accelerators and FIPS 140-2 accelerators. The fips flag causes retrieval of valid key sizes supported by the FIPS device. If the device doesn’t have fips hardware, requests for information on fips will return a Common::OperationFailed exception. If the fips hardware doesn’t support the associated key type, it’s possible to get an empty array in return for a key type/fips flag pair.

Return Type

Type Description
long [] [] A list of (lists of) valid key sizes, one list of valid key sizes for each key type and fips specification given.


Exception Description
Common::AccessDenied Raised if the client credentials are not valid.
Common::InvalidArgument Raised if one of the arguments is invalid.
Common::OperationFailed Raised if an operation error occurs.

See Also


The links to the sample code below are remnants of the old DevCentral wiki and will result in a 404 error. For best results, please copy the link text and search the codeshare directly on DevCentral.

Sample Code

The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.