Next: Utility Functions, Previous: Setting SPA Data, Up: Using libfko [Contents][Index]
This section describes the functions used for retrieving the various SPA data fields and parameters settings. They all return an FKO error code. The value of the respective field or parmeter that is being retrieved will placed into the variables whose addresses are passed to the function.
Assigns the pointer to the string holding the final encrypted SPA data to the address spa_data is pointing to. This is the data that would be packaged into a packet and sent to an fwknop server. The return value is an FKO error status.
Assigns the pointer to the string holding the random 16-character decimal
number (rand_val
) associated with the current context to the address
rand_val is pointing to. The return value is an FKO error status.
Assigns the pointer to the string holding the username associated with the current context to the address rand_val is pointing to. The return value is an FKO error status.
Sets the value of the timestamp variable to the timestamp value associated with the current context. The return value is an FKO error status.
Sets the value of the msg_type variable to the SPA message type value associated with the current context. This value can be checked against the list of valid message_types listed in SPA Messages of this manual. For example:
short msg_type; rc = fko_get_spa_message_type(ctx, &msg_type); switch(msg_type) { case FKO_ACCESS_MSG: process_access_msg(...); break; case FKO_NAT_ACCESS_MSG: process_nat_access_msg(...); break; /*...and so on...*/ }
The return value is an FKO error status.
Assigns the pointer to the string holding the the fko SPA request message associated with the current context to the address spa_msg is pointing to. The return value is an FKO error status.
Assigns the pointer to the string holding the the fko SPA nat access message associated with the current context to the address nat_access is pointing to. The return value is an FKO error status.
Assigns the pointer to the string holding the the fko SPA server auth message associated with the current context to the address server_auth is pointing to. The return value is an FKO error status.
Sets the value of the client_timeout variable to the client_timeout value associated with the current context. The return value is an FKO error status.
Sets the value of the digest_type variable to the digest type value associated with the current context. This value can be checked against the list of valid digest_types listed in Digests of this manual. The return value is an FKO error status.
Sets the value of the hmac_type variable to the HMAC type value associated with the current context. This value can be checked against the list of valid hmac_types listed in HMAC Digests of this manual. The return value is an FKO error status.
Assigns the pointer to the string holding the the fko SPA digest value associated with the current context to the address spa_digest is pointing to. The return value is an FKO error status.
Assigns the pointer to the string holding the the fko SPA HMAC value associated with the current context to the address spa_hmac is pointing to. The return value is an FKO error status.
Sets the value of the enc_type variable to the encryption type value associated with the current context. This value can be checked against the list of valid digest_types listed in Encryption Algorithms of this manual. The return value is an FKO error status.
Assigns the pointer to the string holding the the encoded SPA data (before encryption) associated with the current context to the address enc_msg is pointing to. This is intermediate data that would not normally be of use unless debugging the library. The return value is an FKO error status.
Assigns the pointer to the string holding the the SPA version value associated with the current context to the address fko_version is pointing to. This is a static value for SPA data that is being created in a new context. For data parsed from an external source, the version string will be whatever version the sending client used. The return value is an FKO error status.
GPG-specific functions:
Assigns the pointer to the string holding the the GPG recipient ID associated with the current context to the address recipient is pointing to. The return value is an FKO error status.
Assigns the pointer to the string holding the the GPG signer ID associated with the current context to the address signer is pointing to. The return value is an FKO error status.
Assigns the pointer to the string holding the the GPG home directory associated with the current context to the address gpg_dir is pointing to. The return value is an FKO error status.
Sets the value of the val variable to the current gpg_signature_verify flag value associated with the current context. The return value is an FKO error status.
Sets the value of the val variable to the current ignore_verify_error flag value associated with the current context. The return value is an FKO error status.
Assigns the pointer to the string holding the the GPG signature ID associated with the current context to the address sig_id is pointing to. The return value is an FKO error status.
Assigns the pointer to the string holding the the GPG signature fingerprint associated with the current context to the address sig_fpr is pointing to. The return value is an FKO error status.
Sets the value of the sig_sum variable to the GPG signature summary value associated with the current context. The return value is an FKO error status.
Sets the value of the sig_stat variable to the GPG signature error status value associated with the current context. The return value is an FKO error status.
Assigns the pointer to the string holding the the GPG executable path associated with the current context to the address gpg_exe is pointing to. The return value is an FKO error status.
Note: The char* values retrieved by the GPG-related functions above will be NULL if the context value was not previously set.
Next: Utility Functions, Previous: Setting SPA Data, Up: Using libfko [Contents][Index]