Skip to main content

parse_pkcs11_object_label

Function parse_pkcs11_object_label 

Source
pub fn parse_pkcs11_object_label(uri: &str) -> Result<String, String>
Expand description

Extract the object (key label) from a PKCS#11 URI.

PKCS#11 URI format: pkcs11:token=TOKEN;object=KEY_LABEL;type=private

Returns the value of the object attribute, which is the CKA_LABEL used to find the private key in the PKCS#11 token.

Per RFC 7512 §2.3, values may be percent-encoded; this function decodes %XX sequences.