.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "FKO 3pm" .TH FKO 3pm 2024-02-09 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME FKO \- Perl module wrapper for libfko .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use FKO; \& \& # Create a new empty FKO object. \& # \& my $fko = FKO\->new(); \& \& if(!$fko) { \& die "Unable to create FKO object: $FKO::error_str\en"; \& } \& \& # Override the username (default is current user). \& # \& my $err = $fko\->username(\*(Aqjoeuser\*(Aq); \& if($err) { \& die "Error setting username: ", $fko\->errstr($err), "\en"; \& } \& \& # Set the SPA message (see libfko docs for details). \& # \& $err = $fko\->spa_message(\*(Aq1.2.3.4,tcp/22\*(Aq); \& # ..error checking, etc... \& \& $err = $fko\->spa_data_final(\*(Aqmycryptkey\*(Aq, \*(Aqmyhmackey\*(Aq); \& # ..error checking, etc... \& \& # Get the encrypted/authenticated/encoded SPA data. \& # \& my $spa_data = $fko\->spa_data(); \& \& ## Incoming SPA data ## \& \& # Create an FKO object to process incoming (or existing) \& # SPA data. \& # \& my $fko_in = FKO\->new($enc_spa_data, \*(Aqmycryptkey\*(Aq, \& FKO::FKO_ENC_MODE_CBC, \*(Aqmyhmackey\*(Aq, FKO::FKO_HMAC_SHA256) \& or die "Unable to create FKO object: $FKO::error_str\en"; \& \& my $timestamp = $fko_in\->timestamp(); \& my $fko_user = $fko_in\->username(); \& my $spa_msg = $fko_in\->spa_message(); \& my $digest = $fko_in\->spa_digest(); \& \& # Pull the digest type. \& my $digest_type = $fko_in\->spa_digest_type(); \& \& if($digest_type == FKO::FKO_DIGEST_SHA256) { \& # do something \& } elsif($digest_type == FKO::FKO_DIGEST_MD5) { \& # do something else \& } .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module is essentially a Perl wrapper for the \fIFirewall Knock Operator\fR (fwknop) library, \f(CW\*(C`libfko\*(C'\fR. Fwknop is an open source implementation of \&\fISingle Packet Authorization\fR (\fISPA\fR) for access to networked resources that are protected by a default-drop packet filter. .PP The original \fIfwknop\fR is implemented in Perl. The \fIlibfko\fR library is an implementation of the \fIfwknop\fR back-end data processing routines written in C as part of the project to move all of \fIfwknop\fR to C. .PP See the \f(CW\*(C`libfko\*(C'\fR documentation for additional information on usage and the functionality provided by \f(CW\*(C`libfko\*(C'\fR. More information on \fISPA\fR and \fIfwknop\fR can be found at http://www.cipherdyne.org/fwknop. .SH CONSTRUCTOR .IX Header "CONSTRUCTOR" .IP "\fBnew( )\fR" 4 .IX Item "new( )" .PD 0 .ie n .IP "\fBnew($spa_data, \fR\fB$password\fR\fB, \fR\fB$enc_type\fR\fB, \fR\fB$hmac_key\fR\fB, \fR\fB$hmac_type\fR\fB)\fR" 4 .el .IP "\fBnew($spa_data, \fR\f(CB$password\fR\fB, \fR\f(CB$enc_type\fR\fB, \fR\f(CB$hmac_key\fR\fB, \fR\f(CB$hmac_type\fR\fB)\fR" 4 .IX Item "new($spa_data, $password, $enc_type, $hmac_key, $hmac_type)" .PD The \f(CW\*(C`new\*(C'\fR method creates the \fIFKO\fR object. With no arguments, it creates creates and empty \fIFKO\fR object ready to be popluated with data (i.e. create a new SPA data packet to send). .Sp You can also pass existing encoded/encrypted \fISPA\fR data, a decryption password, and an HMAC key (along with associated encryption and HMAC modes) to \&\f(CW\*(C`new\*(C'\fR. This will create a new object, authenticate, decrypt, and decode the data, and store it within the object for later retrieval using the various methods described below. .Sp If there are any errors during the creation or decoding of the data \fInew\fR will return undef and the appropriate error message will be available in the \&\f(CW$FKO::error_str\fR variable. .Sp Create an empty object: .Sp .Vb 1 \& my $fko = FKO\->new(); .Ve .Sp Create an object using existing data: .Sp .Vb 2 \& my $fko = FKO\->new($spa_data, \*(Aqdecrypt_pw\*(Aq, FKO::FKO_ENC_MODE_CBC, \& \*(Aqmyhmackey\*(Aq, FKO::FKO_HMAC_SHA256); .Ve .SH METHODS .IX Header "METHODS" .SS "Utility Methods" .IX Subsection "Utility Methods" The utility methods are those that perform the non\-data\-set/get functions like error messages, data processing, and clean-up. .IP "\fBdestroy( )\fR" 4 .IX Item "destroy( )" The \f(CW\*(C`destroy\*(C'\fR method is used when you are done with the \fIFKO\fR object and its data. This method will make the appropriate \fIlibfko\fR calls to clean-up and release resources used by the object. .Sp Though \f(CW\*(C`destroy\*(C'\fR will be called if the object goes out of scope, it is good practice to clean up after yourself. This is especially true if you are processing multiple \fISPA\fR messages in a loop, etc. .IP \fBerrstr($err_code)\fR 4 .IX Item "errstr($err_code)" This method returns the descriptive error message string for the given error code value. .IP "\fBgpg_errstr( )\fR" 4 .IX Item "gpg_errstr( )" If the previous \fIFKO\fR error was from a GPG-related function, then calling this method may return more detailed information from the GPG error handling system. .ie n .IP "\fBspa_data_final($enc_key, \fR\fB$hmac_key\fR\fB)\fR" 4 .el .IP "\fBspa_data_final($enc_key, \fR\f(CB$hmac_key\fR\fB)\fR" 4 .IX Item "spa_data_final($enc_key, $hmac_key)" This function is the final step in creating a complete encrypted and authenticated \fISPA\fR data string suitable for transmission to an fwknop server. It does require all of the requisite \fISPA\fR data fields be set. Otherwise it will fail and return the appropriate error code. .IP "\fBencrypt_spa_data( )\fR" 4 .IX Item "encrypt_spa_data( )" Encrypts the intermediate encoded \fISPA\fR data stored in the context. The internal \fIlibfko\fR encryption function will call the internal \&\f(CW\*(C`encode_spa_data\*(C'\fR if necessary. .Sp This function is normally not called directly as it is automatically called from the internal \f(CW\*(C`fko_spa_data_final\*(C'\fR function (which is wrapped by this module's \f(CW\*(C`spa_data_final\*(C'\fR function. .IP "\fBdecrypt_spa_data( )\fR" 4 .IX Item "decrypt_spa_data( )" When given the correct \fIkey\fR (passsword), this function decrypts, decodes, and parses the encrypted \fISPA\fR data contained in the current context. Once the data is decrypted, the \fIlibfko\fR internal function will also call the \fIlibfko\fR decode function to decode, parse, validate, and store the data fields in the context for later retrieval. .Sp Note: This function does not need to be called directly if encrypted \fISPA\fR data was passed to this module's constructor when the object was created as the \f(CW\*(C`new\*(C'\fR function will call decrypt and decode itself. .IP "\fBencode_spa_data( )\fR" 4 .IX Item "encode_spa_data( )" Instructs \fIlibfko\fR to perform the base64 encoding of those \fISPA\fR data fields that need to be encoded, perform some data validation, compute and store the message digest hash for the \fISPA\fR data. .Sp This function is normally not called directly as it is called by other \&\fIlibfko\fR functions during normal processing (i.e during encypt and/or final functions. .IP "\fBdecode_spa_data( )\fR" 4 .IX Item "decode_spa_data( )" This function hands of the data to the \fIlibfko\fR decoding routines which perform the decoding, parsing, and validation of the \fISPA\fR data that was just decrypted. .Sp This function is normally not called directly as it is called by other \&\fIlibfko\fR functions during normal processing. .SS "Working with SPA Data Types" .IX Subsection "Working with SPA Data Types" There are a few data and method types supported by \fIlibfko\fR, along with a few functions for getting and setting them. Most of these \fItypes\fR are represented using constants defined in the \fIFKO\fR module. .IP "\fBencryption_type( )\fR" 4 .IX Item "encryption_type( )" .PD 0 .IP \fBencryption_type(FKO_ENCRYPTION_TYPE)\fR 4 .IX Item "encryption_type(FKO_ENCRYPTION_TYPE)" .PD Get or set the encryption type for the current context. If no argument is given, the current value is returned. Otherwise the encryption type will be set to the given value. .Sp The encryption type parameter is an integer value. Constants have been defined to represent this value. Currently, the only supported encryption types are: .RS 4 .IP \(bu 4 \&\fBFKO_ENCRYPTION_RIJNDAEL\fR .Sp The default \fIlibfko\fR encryption algorithm. .IP \(bu 4 \&\fBFKO_ENCRYPTION_GPG\fR .Sp GnuPG encryption (if supported by the underlying \fIlibfko\fR implementation). .RE .RS 4 .RE .IP "\fBhmac_type( )\fR" 4 .IX Item "hmac_type( )" .PD 0 .IP \fBhmac_type(FKO_HMAC_TYPE)\fR 4 .IX Item "hmac_type(FKO_HMAC_TYPE)" .PD Get or set the HMAC digest algorithm for the current context. If no argument is given, the current value is returned. Otherwise the HMAC type will be set to the given value. .Sp The HMAC type parameter is an integer value. Constants have been defined to represent this value. Currently, the supported HMAC types are: .RS 4 .IP \(bu 4 \&\fBFKO_HMAC_SHA256\fR .Sp The default \fIlibfko\fR HMAC digest algorithm is SHA\-256 .IP \(bu 4 \&\fBFKO_HMAC_MD5\fR .Sp Use the MD5 digest algorithm (not recommended) to generate the HMAC. .IP \(bu 4 \&\fBFKO_HMAC_SHA1\fR .Sp Use the SHA\-1 digest algorithm to generate the HMAC. .IP \(bu 4 \&\fBFKO_HMAC_SHA512\fR .Sp Use the SHA\-512 digest algorithm to generate the HMAC. .RE .RS 4 .RE .IP "\fBdigest_type( )\fR" 4 .IX Item "digest_type( )" .PD 0 .IP \fBdigest_type(FKO_DIGEST_TYPE)\fR 4 .IX Item "digest_type(FKO_DIGEST_TYPE)" .PD Get or set the digest type for the current context. If no argument is given, the current value is returned. Otherwise digest type will be set to the given value. .Sp The digest type parameter is an integer value. Constants have been defined to represent this value. Currently, the supported digest types are: .RS 4 .IP \(bu 4 \&\fBFKO_DIGEST_MD5\fR .Sp The MD5 message digest algorithm. .IP \(bu 4 \&\fBFKO_DIGEST_SHA1\fR .Sp The SHA1 message digest algorithm. .IP \(bu 4 \&\fBFKO_DIGEST_SHA256\fR .Sp The SHA256 message digest algorithm. This is the \fIlibfko\fR default. .IP \(bu 4 \&\fBFKO_DIGEST_SHA384\fR .Sp The SHA384 message digest algorithm. This is the \fIlibfko\fR default. .IP \(bu 4 \&\fBFKO_DIGEST_SHA512\fR .Sp The SHA512 message digest algorithm. This is the \fIlibfko\fR default. .RE .RS 4 .RE .IP "\fBspa_message_type( )\fR" 4 .IX Item "spa_message_type( )" .PD 0 .IP \fBspa_message_type(FKO_MSG_TYPE)\fR 4 .IX Item "spa_message_type(FKO_MSG_TYPE)" .PD Get or set the \fISPA\fR message type. If no argument is given, the current value is returned. Otherwise message type will be set to the given value. .Sp The message type parameter is an integer value. Constants have been defined to represent this value. Currently, the supported digest types are: .RS 4 .IP \(bu 4 \&\fBFKO_COMMAND_MSG\fR .Sp A request to have the fwknop server execute the given command. The format for this type is: \f(CW\*(C`:\*(C'\fR .Sp For example: "192.168.1.2:uname \-a" .IP \(bu 4 \&\fBFKO_ACCESS_MSG\fR .Sp A basic access request. This is the most common type in use. The format for this type is: \f(CW\*(C`:/\*(C'\fR. .Sp For example: "192.168.1.2:tcp/22" .IP \(bu 4 \&\fBFKO_NAT_ACCESS_MSG\fR .Sp An access request that also provide information for the fwknop server to create a Network Address Translation (NAT to an internal address. The format for this string is: \f(CW\*(C`,\*(C'\fR. .Sp For example: "10.10.1.2,9922" .IP \(bu 4 \&\fBFKO_CLIENT_TIMEOUT_ACCESS_MSG\fR .Sp This is an \f(CW\*(C`FKO_ACCESS_REQUEST\*(C'\fR with a timeout parameter for the fwknop server. The timeout value is provided via the \f(CW\*(C`client_timeout\*(C'\fR data field. .IP \(bu 4 \&\fBFKO_CLIENT_TIMEOUT_NAT_ACCESS_MSG\fR .Sp This is an \f(CW\*(C`FKO_NAT_ACCESS_REQUEST\*(C'\fR with a timeout parameter for the fwknop server. The timeout value is provided via the \f(CW\*(C`client_timeout\*(C'\fR data field. .IP \(bu 4 \&\fBFKO_LOCAL_NAT_ACCESS_MSG\fR .Sp This is similar to the \f(CW\*(C`FKO_NAT_ACCESS\*(C'\fR request except the NAT is to the local to the server (i.e. a service listening on 127.0.0.1). .IP \(bu 4 \&\fBFKO_CLIENT_TIMEOUT_LOCAL_NAT_ACCES_MSG\fR .Sp This is an \f(CW\*(C`FKO_LOCAL_NAT_ACCESS_REQUEST\*(C'\fR with a timeout parameter for the fwknop server. The timeout value is provided via the \f(CW\*(C`client_timeout\*(C'\fR data field. .RE .RS 4 .RE .SS "Working With SPA Data" .IX Subsection "Working With SPA Data" The \fISPA\fR data methods are used for setting or retrieving the various \fISPA\fR data field values. Some of these simply return a read-only value, while others are used to set or get values. .PP \&\fBNote:\fR The following methods are presented roughly in the order their respective data values appear in an \fIfwknop\fR \fISPA\fR message. Many of these have reasonable default values at creation and are not typically used in most circumstances. .IP "\fBrand_value( )\fR" 4 .IX Item "rand_value( )" .PD 0 .IP \fBrand_value($new_value)\fR 4 .IX Item "rand_value($new_value)" .PD Get or set the random value portion of the \fISPA\fR data. If setting the random value, you must pass either a 16\-character decimal number (to set it to the given number), or the value \f(CW0\fR to have a new random value generated by \fIlibfko\fR. .Sp If a provided value is not a valid 16\-character decimal string, the function will return the \f(CW\*(C`FKO_ERROR_INVALID_DATA\*(C'\fR error code. .Sp Upon creation of a new \fIFKO\fR object, this value is automatically generated. .IP "\fBusername( )\fR" 4 .IX Item "username( )" .PD 0 .IP \fBusername($username)\fR 4 .IX Item "username($username)" .PD Set or get the username field of the \fISPA\fR data. If no argument is given, given, this function will return the current value. Otherwise, the username value will be set to the name provided. .Sp If a value of \f(CW0\fR is given, \fIlibfko\fR will attempt to determine and set the username by first looking for the environment variable \f(CW\*(C`SPOOF_USER\*(C'\fR and use its value if found. Otherwise, it will try to determine the username itself using various system methods, then fallback to the environment variables \f(CW\*(C`LOGNAME\*(C'\fR or \f(CW\*(C`USER\*(C'\fR. If none of those work, the function will return the \f(CW\*(C`FKO_ERROR_USERNAME_UNKNOWN\*(C'\fR error code. .Sp Upon creation of a new \fIFKO\fR object, this value is automatically generated based on the \fIlibfko\fR method described above. .IP "\fBtimestamp( )\fR" 4 .IX Item "timestamp( )" .PD 0 .IP \fBtimestamp($offset)\fR 4 .IX Item "timestamp($offset)" .PD Gets or sets the timestamp value of the SPA data. If no argument is given, the current value is returned. .Sp If an argument is provided, it will represent an offset to be applied to the current timestamp value at the time this function was called. .Sp Upon creation of a new \fIFKO\fR object, this value is automatically generated based on the time of object creation. .IP "\fBversion( )\fR" 4 .IX Item "version( )" Returns the \fIfwknop\fR version string. This version represents the supported \&\fIfwknop\fR \fISPA\fR message format and features. This has nothing to do with the version of this module. .IP "\fBspa_message( )\fR" 4 .IX Item "spa_message( )" .PD 0 .IP \fBspa_message($spa_msg)\fR 4 .IX Item "spa_message($spa_msg)" .PD Get or set the \fISPA\fR message string. If no argument is given, the current value is returned. Otherwise \fISPA\fR message string will be set to the given value. .IP "\fBspa_nat_access( )\fR" 4 .IX Item "spa_nat_access( )" .PD 0 .IP \fBspa_nat_access($nat_access)\fR 4 .IX Item "spa_nat_access($nat_access)" .PD Get or set the \fISPA\fR nat access string. If no argument is given, the current value is returned. Otherwise \fISPA\fR nat access string will be set to the given value. .IP "\fBspa_server_auth( )\fR" 4 .IX Item "spa_server_auth( )" .PD 0 .IP \fBspa_server_auth($server_auth)\fR 4 .IX Item "spa_server_auth($server_auth)" .PD Get or set the \fISPA\fR server auth string. If no argument is given, the current value is returned. Otherwise \fISPA\fR server auth string will be set to the given value. .IP "\fBspa_client_timeout( )\fR" 4 .IX Item "spa_client_timeout( )" .PD 0 .IP \fBspa_client_timeout($new_timeout)\fR 4 .IX Item "spa_client_timeout($new_timeout)" .PD Get or set the \fISPA\fR message client timeout value. This is an integer value. If no argument is given, the current value is returned. Otherwise \&\fISPA\fR message client timeout value will be set to the given value. .IP "\fBspa_digest( )\fR" 4 .IX Item "spa_digest( )" .PD 0 .IP \fBspa_digest\|(1)\fR 4 .IX Item "spa_digest" .PD When called with no argument, the \f(CW\*(C`spa_digest\*(C'\fR function returns the digest associated with the current data (if available). If a true value (i.e. \f(CW1\fR) is given as the argument, it will force a recompute of the digest based on the data and the configured \fIdigest_type\fR. .Sp This function is normally not called directly as it is called by other \&\fIlibfko\fR functions during normal processing. .IP "\fBencoded_data( )\fR" 4 .IX Item "encoded_data( )" Returns the encoded \fISPA\fR data as it would be just before the encryption step. This is not generally useful unless you are debugging a data issue. .IP "\fBspa_data( )\fR" 4 .IX Item "spa_data( )" .PD 0 .IP \fBspa_data($spa_data)\fR 4 .IX Item "spa_data($spa_data)" .PD Get or set the \fISPA\fR data string. If no argument is given, the current value is returned. This would be the final encrypted and encoded string of data that is suitable for sending to an \fIfwkno\fR server. .Sp If an argument is given, it is expected to be an existing encrypted and encoded \fISPA\fR data string (perhaps data received by an \fIfwknop\fR server). The provided data is stored in the object (the current context). .Sp Note: When data is provided via this function, it is not automatically decoded. You would need to call \f(CWdecrypt_spa_data($pw)\fR to complete the decryption, decoding, and parsing process. .IP "\fBgpg_recipient( )\fR" 4 .IX Item "gpg_recipient( )" .PD 0 .IP \fBgpg_recipient($gpg_id)\fR 4 .IX Item "gpg_recipient($gpg_id)" .PD Get or set the gpg_recipient. This is the ID or email of the public GPG key of the intended recipient. In order for this function to work, the following condition must be met: .RS 4 .IP \(bu 4 The underlying \fIlibfko\fR implementation nust have GPG support. .IP \(bu 4 The \fIencryption_type\fR must be set to \f(CW\*(C`FKO_ENCRYPTION_GPG\*(C'\fR. .IP \(bu 4 The specified GPG key must exist and be valid. .RE .RS 4 .Sp If no argument is given, the current value is returned. Otherwise, gpg_recipient will be set to the given value. .RE .IP "\fBgpg_signer( )\fR" 4 .IX Item "gpg_signer( )" .PD 0 .IP \fBgpg_signer($gpg_id)\fR 4 .IX Item "gpg_signer($gpg_id)" .PD Get or set the gpg_signer. This is the ID or email for the secret GPG key to be used to sign the encryped data. In order for this function to work, the following condition must be met: .RS 4 .IP \(bu 4 The underlying \fIlibfko\fR implementation nust have GPG support. .IP \(bu 4 The \fIencryption_type\fR must be set to \f(CW\*(C`FKO_ENCRYPTION_GPG\*(C'\fR. .IP \(bu 4 The specified GPG key must exist and be valid. .RE .RS 4 .Sp If no argument is given, the current value is returned. Otherwise, gpg_signer will be set to the given value. .RE .IP "\fBgpg_home_dir( )\fR" 4 .IX Item "gpg_home_dir( )" .PD 0 .IP \fBgpg_home_dir($new_dir)\fR 4 .IX Item "gpg_home_dir($new_dir)" .PD Get or set the GPG home directory. This is the directory that holds the GPG keyrings, etc. In order for this function to work, the following condition must be met: .RS 4 .IP \(bu 4 The underlying \fIlibfko\fR implementation nust have GPG support. .IP \(bu 4 The \fIencryption_type\fR must be set to \f(CW\*(C`FKO_ENCRYPTION_GPG\*(C'\fR. .IP \(bu 4 The specified GPG home directory must exist. .RE .RS 4 .Sp If no argument is given, the current value is returned. Otherwise, gpg_home_dir will be set to the given value. .RE .PP \fIGPG Signature Verification\fR .IX Subsection "GPG Signature Verification" .PP By default libfko will attempt to verify GPG signatures when decrypting GPG-encrypted data. If the signature is missing, expired, revoked, or otherwise bad, the decoding operation will fail. .PP The following functions are provided to process GPG key information, or manage how libfko deals with GPG signatures. Like the other GPG-related functions, these also have the following prerequisites: .IP \(bu 4 The underlying \fIlibfko\fR implementation nust have GPG support. .IP \(bu 4 The \fIencryption_type\fR must be set to \f(CW\*(C`FKO_ENCRYPTION_GPG\*(C'\fR. .IP "\fBgpg_signature_verify( )\fR" 4 .IX Item "gpg_signature_verify( )" .PD 0 .IP \fBgpg_signature_verify($bool)\fR 4 .IX Item "gpg_signature_verify($bool)" .PD Get or set the GPG signature verification flag. If true (1), then GPG signatures are processed by libfko. This is the default behavior. If set to false (0), then libfko will not even look for or at any GPG signatures and will proceed with a decoding the SPA data. .Sp If no argument is given, the current value is returned. Otherwise, the gpg_signature_verify flag will be set to the given value. .IP "\fBgpg_ignore_verify_error( )\fR" 4 .IX Item "gpg_ignore_verify_error( )" .PD 0 .IP \fBgpg_ignore_verify_error($bool)\fR 4 .IX Item "gpg_ignore_verify_error($bool)" .PD Get or set the GPG signature ignore verification error flag. If true (1), then GPG signatures are processed and retained by libfko, but a bad signature will not prevent the decoding phase. The default is to not ignore errors. .Sp If no argument is given, the current value is returned. Otherwise, the gpg_ignore_verify_error flag will be set to the given value. .IP "\fBgpg_signature_id( )\fR" 4 .IX Item "gpg_signature_id( )" Get ID of the GPG signature from the last decryption operation. .IP "\fBgpg_signature_fpr( )\fR" 4 .IX Item "gpg_signature_fpr( )" Get Fingerprint of the GPG signature from the last decryption operation. .IP "\fBgpg_signature_summary( )\fR" 4 .IX Item "gpg_signature_summary( )" Get GPGME signature summary value of the GPG signature from the last decryption operation. This value is a bitmask that hold additional information on the signature (see GPGME docs for more information). .IP "\fBgpg_signature_status( )\fR" 4 .IX Item "gpg_signature_status( )" Get error status of the GPG signature from the last decryption operation. This value is a GPGME error code (see GPGME docs for more information). .IP \fBgpg_signature_id_match($id)\fR 4 .IX Item "gpg_signature_id_match($id)" Compare the given ID with the id of the GPG signature of the last decryption operation. If the ID's match, then a true value is returned. Otherwise false is returned. .IP \fBgpg_signature_fpr_match($id)\fR 4 .IX Item "gpg_signature_fpr_match($id)" Compare the given fingerprint value with the fingerprint of the GPG signature of the last decryption operation. If the ID's match, then a true value is returned. Otherwise false is returned. .SH "SEE ALSO" .IX Header "SEE ALSO" Perl, the \f(CW\*(C`libfko\*(C'\fR manual. .PP Additional information on the Firewall Knock Operater (\fIfwknop\fR) can be found at http://www.cipherdyne.org/fwknop. .SH AUTHOR .IX Header "AUTHOR" Damien S. Stuart, .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (C) 2009 by Damien S. Stuart .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.