Package libpskc-doc

Documentation files for libpskc

http://www.nongnu.org/oath-toolkit/

Library Functions (Section 3)
pskc_add_keypackage
Add a new a PSKC keypackage to the container and give back a pskc_key_t handle.
pskc_build_xml
This function builds a XML file from the data in container. As a convenience, it also converts the XML into a string placed in the newly allocated *out of...
pskc_check_version
Check PSKC library version. See PSKC_VERSION for a suitable req_version string. This function is one of few in the library that can be used without a successful...
pskc_done
This function releases the resources associated with the PSKC container handle.
pskc_free
Deallocates memory region by calling free(). If ptr is NULL no operation is performed. This function is necessary on Windows, where different parts of the same...
pskc_get_cryptomodule_id
Get the PSKC KeyPackage CryptoModule Id value. This element carries a unique identifier for the CryptoModule and is implementation specific. As such, it helps...
pskc_get_device_devicebinding
Get the PSKC KeyPackage DeviceInfo DeviceBinding value. This element allows a provisioning server to ensure that the key is going to be loaded into the device...
pskc_get_device_expirydate
Get the PSKC KeyPackage DeviceInfo ExpiryDate. This element denote the end date of a device (such as the one on a payment card, used when issue numbers are not...
pskc_get_device_issueno
Get the PSKC KeyPackage DeviceInfo IssueNo value. This element contains the issue number in case there are devices with the same serial number so that they can...
pskc_get_device_manufacturer
Get the PSKC KeyPackage DeviceInfo Manufacturer value. This element indicates the manufacturer of the device.
pskc_get_device_model
Get the PSKC KeyPackage DeviceInfo Model value. This element describes the model of the device (e.g., "one-button-HOTP-token-V1").
pskc_get_device_serialno
Get the PSKC KeyPackage DeviceInfo SerialNo value. This element contains the serial number of the device.
pskc_get_device_startdate
Get the PSKC KeyPackage DeviceInfo StartDate. This element denote the start date of a device (such as the one on a payment card, used when issue numbers are not...
pskc_get_device_userid
Get the PSKC KeyPackage DeviceInfo Userid value. This indicates the user with whom the device is associated.
pskc_get_id
Get the PSKC KeyContainer Id attribute.
pskc_get_key_algorithm
Get the PSKC KeyPackage Key Algorithm attribute value. This may be an URN, for example "urn:ietf:params:xml:ns:keyprov:pskc:hotp".
pskc_get_key_algparm_chall_checkdigits
Get the PSKC KeyPackage Key AlgorithmParameters ChallengeFormat CheckDigits value. This attribute indicates whether a device needs to check the appended Luhn...
pskc_get_key_algparm_chall_encoding
Get the PSKC KeyPackage Key AlgorithmParameters ChallengeFormat Encoding value. This attribute defines the encoding of the challenge accepted by the device. If...
pskc_get_key_algparm_chall_max
Get the PSKC KeyPackage Key AlgorithmParameters ChallengeFormat Max value. This attribute defines the maximum size of the challenge accepted by the device for...
pskc_get_key_algparm_chall_min
Get the PSKC KeyPackage Key AlgorithmParameters ChallengeFormat Min value. This attribute defines the minimum size of the challenge accepted by the device for...
pskc_get_key_algparm_resp_checkdigits
Get the PSKC KeyPackage Key AlgorithmParameters ResponseFormat CheckDigits value. This attribute indicates whether the device needs to append a Luhn check...
pskc_get_key_algparm_resp_encoding
Get the PSKC KeyPackage Key AlgorithmParameters ResponseFormat Encoding value. This attribute defines the encoding of the response generated by the device, it...
pskc_get_key_algparm_resp_length
Get the PSKC KeyPackage Key AlgorithmParameters ResponseFormat Length value. This attribute defines the length of the response generated by the device and MUST...
pskc_get_key_algparm_suite
Get the PSKC KeyPackage Key AlgorithmParameters Suite value.
pskc_get_key_data_b64secret
Get the PSKC KeyPackage Key Data Secret value in base64 as a zero-terminated string.
pskc_get_key_data_counter
Get the PSKC KeyPackage Key Data Counter value. This element contains the event counter for event-based OTP algorithms. If present is non-NULL, it will be 0 if...
pskc_get_key_data_secret
Get the PSKC KeyPackage Key Data Secret value. If len is not set, the caller can only use the returned value for comparison against NULL to check whether the...
pskc_get_key_data_time
Get the PSKC KeyPackage Key Data Time value. This element contains the time for time-based OTP algorithms. (If time intervals are used, this element carries the...
pskc_get_key_data_timedrift
Get the PSKC KeyPackage Key Data TimeDrift value. This element contains the device clock drift value for time-based OTP algorithms. The integer value (positive...
pskc_get_key_data_timeinterval
Get the PSKC KeyPackage Key Data TimeInterval value. This element carries the time interval value for time-based OTP algorithms in seconds (a typical value for...
pskc_get_key_friendlyname
Get the PSKC KeyPackage Key Friendlyname value.
pskc_get_key_id
Get the PSKC KeyPackage Key Id attribute value. It is a syntax error for this attribute to not be available.
pskc_get_key_issuer
Get the PSKC KeyPackage Key Issuer value.
pskc_get_keypackage
Get a PSKC keypackage pskc_key_t handle for the i'th key package in container. i is zero-based, i.e., 0 refer to the first key package, 1 refer to the second...
pskc_get_key_policy_expirydate
Get the PSKC KeyPackage Key Policy ExpiryDate. This element denote the expiry of the validity period of a key.
pskc_get_key_policy_keyusages
Get the PSKC KeyPackage Key Policy KeyUsage values. The element puts constraints on the intended usage of the key. The recipient of the PSKC document MUST...
pskc_get_key_policy_numberoftransactions
Get the PSKC KeyPackage Key Policy NumberOfTransactions value. The value in this element indicates the maximum number of times a key carried within the PSKC...
pskc_get_key_policy_pinencoding
Get the PSKC KeyPackage Key Policy PINPolicy PINEncoding value. This attribute indicates the encoding of the PIN and MUST be one of the pskc_valueformat values...
pskc_get_key_policy_pinkeyid
Get the PSKC KeyPackage Key Policy PINPolicy PINKeyId value. This attribute carries the unique 'Id' attribute vale of the "Key" element held within this...
pskc_get_key_policy_pinmaxfailedattempts
Get the PSKC KeyPackage Key Policy PINPolicy MaxFailedAttempts value. This attribute indicates the maximum number of times the PIN may be entered wrongly before...
pskc_get_key_policy_pinmaxlength
Get the PSKC KeyPackage Key Policy PINPolicy MaxLength value. This attribute indicates the maximum length of a PIN that can be set to protect this key. It MUST...
pskc_get_key_policy_pinminlength
Get the PSKC KeyPackage Key Policy PINPolicy MinLength value. This attribute indicates the minimum length of a PIN that can be set to protect the associated...
pskc_get_key_policy_pinusagemode
Get the PSKC KeyPackage Key Policy PINPolicy PINUsageMode value. This mandatory attribute indicates the way the PIN is used during the usage of the key. If...
pskc_get_key_policy_startdate
Get the PSKC KeyPackage Key Policy StartDate. This element denote the start of the validity period of a key.
pskc_get_key_profileid
Get the PSKC KeyPackage Key KeyProfileId value.
pskc_get_key_reference
Get the PSKC KeyPackage Key KeyReference value.
pskc_get_key_userid
Get the PSKC KeyPackage Key Userid value.
pskc_get_signed_p
Check whether the container is signed or not (note that it does not validate the signature, merely checks whether there is one).
pskc_get_version
Get the PSKC KeyContainer Version attribute. Normally this string is always "1.0" and a missing field is a syntax error according to the PSKC schema.
pskc_global_done
This function deinitializes the PSKC library, which were initialized using pskc_global_init(). After calling this function, no other PSKC library function may...
pskc_global_init
This function initializes the PSKC library. Every user of this library needs to call this function before using other functions. You should call...
pskc_global_log
Enable global debug logging function. The function will be invoked to print various debugging information. pskc_log_func is of the form, void (*pskc_log_func)...
pskc_init
This function initializes the PSKC container handle. The memory allocate can be released by calling pskc_done().
pskc_keyusage2str
Convert pskc_keyusage to a string. For example, pskc_keyusage2str(PSKC_KEYUSAGE_OTP) will return "OTP". The returned string must not be deallocated.
pskc_output
Convert PSKC data to a serialized string of the indicated type. This is usually used to convert the PSKC data to some human readable form.
pskc_parse_from_memory
This function will parse the XML data in buffer of len size into container. If PSKC_PARSE_ERROR is returned, parsing of some elements have failed but the...
pskc_pinusagemode2str
Convert pskc_pinusagemode to a string. For example, pskc_pinusagemode2str(PSKC_PINUSAGEMODE_LOCAL) will return "Local". The returned string must not be...
pskc_set_cryptomodule_id
Set the PSKC KeyPackage CryptoModule Id value. This element carries a unique identifier for the CryptoModule and is implementation specific. As such, it helps...
pskc_set_device_devicebinding
Set the PSKC KeyPackage DeviceInfo DeviceBinding value. This element allows a provisioning server to ensure that the key is going to be loaded into the device...
pskc_set_device_expirydate
Set the PSKC KeyPackage DeviceInfo ExpiryDate. This element denote the end date of a device (such as the one on a payment card, used when issue numbers are not...
pskc_set_device_issueno
Set the PSKC KeyPackage DeviceInfo IssueNo value. This element contains the issue number in case there are devices with the same serial number so that they can...
pskc_set_device_manufacturer
Set the PSKC KeyPackage DeviceInfo Manufacturer value. This element indicates the manufacturer of the device. The pointer is stored in container, not a copy of...
pskc_set_device_model
Set the PSKC KeyPackage DeviceInfo Model value. This element describes the model of the device (e.g., "one-button-HOTP-token-V1"). The pointer is stored in...
pskc_set_device_serialno
Set the PSKC KeyPackage DeviceInfo SerialNo value. This element indicates the serial number of the device. The pointer is stored in container, not a copy of the...
pskc_set_device_startdate
Set the PSKC KeyPackage DeviceInfo StartDate. This element denote the start date of a device (such as the one on a payment card, used when issue numbers are not...
pskc_set_device_userid
Set the PSKC KeyPackage DeviceInfo Userid value. This indicates the user with whom the device is associated. The pointer is stored in container, not a copy of...
pskc_set_id
Set the PSKC KeyContainer Id attribute. The pointer is stored in container, not a copy of the data, so you must not deallocate the data before another call to...
pskc_set_key_algorithm
Set the PSKC KeyPackage Key Algorithm attribute value. This may be an URN, for example "urn:ietf:params:xml:ns:keyprov:pskc:hotp". The pointer is stored in...
pskc_set_key_algparm_chall_checkdigits
Set the PSKC KeyPackage Key AlgorithmParameters ChallengeFormat CheckDigits value. This attribute indicates whether a device needs to check the appended Luhn...
pskc_set_key_algparm_chall_encoding
Set the PSKC KeyPackage Key AlgorithmParameters ChallengeFormat Encoding value. This attribute defines the encoding of the challenge accepted by the device.
pskc_set_key_algparm_chall_max
Set the PSKC KeyPackage Key AlgorithmParameters ChallengeFormat Max value. This attribute defines the maximum size of the challenge accepted by the device for...
pskc_set_key_algparm_chall_min
Set the PSKC KeyPackage Key AlgorithmParameters ChallengeFormat Min value. This attribute defines the minimum size of the challenge accepted by the device for...
pskc_set_key_algparm_resp_checkdigits
Set the PSKC KeyPackage Key AlgorithmParameters ResponseFormat CheckDigits value. This attribute indicates whether the device needs to append a Luhn check...
pskc_set_key_algparm_resp_encoding
Set the PSKC KeyPackage Key AlgorithmParameters ResponseFormat Encoding value. This attribute defines the encoding of the response generated by the device, it...
pskc_set_key_algparm_resp_length
Set the PSKC KeyPackage Key AlgorithmParameters ResponseFormat Length value. This attribute defines the length of the response generated by the device and MUST...
pskc_set_key_algparm_suite
Set the PSKC KeyPackage Key AlgorithmParameters Suite value. The pointer is stored in container, not a copy of the data, so you must not deallocate the data...
pskc_set_key_data_b64secret
Set the PSKC KeyPackage Key Data Secret value in base64 as a zero-terminated string. The b64secret data is copied into the key handle, so you may modify or...
pskc_set_key_data_counter
Set the PSKC KeyPackage Key Data Counter value. This element contains the event counter for event-based OTP algorithms.
pskc_set_key_data_secret
Set the PSKC KeyPackage Key Data Secret value. The data data is copied into the key handle, so you may modify or deallocate the data pointer after calling this...
pskc_set_key_data_time
Set the PSKC KeyPackage Key Data Time value. This element contains the time for time-based OTP algorithms. (If time intervals are used, this element carries the...
pskc_set_key_data_timedrift
Set the PSKC KeyPackage Key Data TimeDrift value. This element contains the device clock drift value for time-based OTP algorithms. The integer value (positive...
pskc_set_key_data_timeinterval
Set the PSKC KeyPackage Key Data TimeInterval value. This element carries the time interval value for time-based OTP algorithms in seconds (a typical value for...
pskc_set_key_friendlyname
Set the PSKC KeyPackage Key Friendlyname value. The pointer is stored in container, not a copy of the data, so you must not deallocate the data before another...
pskc_set_key_id
Set the PSKC KeyPackage Key Id attribute value. It is a syntax error for this attribute to not be available. The pointer is stored in container, not a copy of...
pskc_set_key_issuer
Set the PSKC KeyPackage Key Issuer value. The pointer is stored in container, not a copy of the data, so you must not deallocate the data before another call to...
pskc_set_key_policy_expirydate
Set the PSKC KeyPackage Key Policy ExpiryDate. This element denote the expiry of the validity period of a key.
pskc_set_key_policy_keyusages
Set the PSKC KeyPackage Key Policy KeyUsage values. The element puts constraints on the intended usage of the key. The recipient of the PSKC document MUST...
pskc_set_key_policy_numberoftransactions
Set the PSKC KeyPackage Key Policy NumberOfTransactions value. The value in this element indicates the maximum number of times a key carried within the PSKC...
pskc_set_key_policy_pinencoding
Set the PSKC KeyPackage Key Policy PINPolicy PINEncoding value. This attribute indicates the encoding of the PIN and MUST be one of the pskc_valueformat values.
pskc_set_key_policy_pinkeyid
Set the PSKC KeyPackage Key Policy PINPolicy PINKeyId value. This attribute carries the unique 'Id' attribute vale of the "Key" element held within this...
pskc_set_key_policy_pinmaxfailedattempts
Set the PSKC KeyPackage Key Policy PINPolicy MaxFailedAttempts value. This attribute indicates the maximum number of times the PIN may be entered wrongly before...
pskc_set_key_policy_pinmaxlength
Set the PSKC KeyPackage Key Policy PINPolicy MaxLength value. This attribute indicates the maximum length of a PIN that can be set to protect this key. It MUST...
pskc_set_key_policy_pinminlength
Set the PSKC KeyPackage Key Policy PINPolicy MinLength value. This attribute indicates the minimum length of a PIN that can be set to protect the associated...
pskc_set_key_policy_pinusagemode
Set the PSKC KeyPackage Key Policy PINPolicy PINUsageMode value. This mandatory attribute indicates the way the PIN is used during the usage of the key.
pskc_set_key_policy_startdate
Set the PSKC KeyPackage Key Policy StartDate. This element denote the start of the validity period of a key.
pskc_set_key_profileid
Set the PSKC KeyPackage Key KeyProfileId value. The pointer is stored in container, not a copy of the data, so you must not deallocate the data before another...
pskc_set_key_reference
Set the PSKC KeyPackage Key KeyReference value. The pointer is stored in container, not a copy of the data, so you must not deallocate the data before another...
pskc_set_key_userid
Set the PSKC KeyPackage Key Userid value. The pointer is stored in container, not a copy of the data, so you must not deallocate the data before another call to...
pskc_set_version
Set the PSKC KeyContainer Version attribute. Normally this string is always "1.0" and a missing field is a syntax error according to the PSKC schema. The...
pskc_sign_x509
Sign PSKC data using X.509 certificate and private key.
pskc_str2keyusage
Convert a string to a pskc_keyusage type. For example, pskc_str2keyusage("KeyWrap") will return PSKC_KEYUSAGE_KEYWRAP.
pskc_str2pinusagemode
Convert a string to a pskc_pinusagemode type. For example, pskc_str2pinusagemode("Local") will return PSKC_PINUSAGEMODE_LOCAL.
pskc_str2valueformat
Convert a string to a pskc_valueformat type. For example, pskc_str2valueformat("DECIMAL") will return PSKC_VALUEFORMAT_DECIMAL.
pskc_strerror
Convert return code to human readable string explanation of the reason for the particular error code. This string can be used to output a diagnostic message to...
pskc_strerror_name
Convert return code to human readable string representing the error code symbol itself. For example, pskc_strerror_name(PSKC_OK) returns the string "PSKC_OK"...
pskc_validate
This function validate the PSKC container handle the PSKC XML Schema.
pskc_valueformat2str
Convert pskc_valueformat to a string. For example, pskc_valueformat2str(PSKC_VALUEFORMAT_DECIMAL) will return "DECIMAL". The returned string must not be...
pskc_verify_x509crt
Verify signature in PSKC data against trusted X.509 certificate.