Struct ipworksedi::GISBSender

Properties   Methods   Events   Config Settings   Errors  

The GISBSender struct implements an GISB / EDM client.

Syntax

ipworksedi::GISBSender

Remarks

The GISBSender component is used to send EDI or other documents using the GISB (Gas Industry Standards Board) / NAESB (North American Energy Standards Board) EDM (Electronic Delivery Mechanism) protocol.

When sending an EDI message, the client should specify, at a minimum, data_from, data_to, url, edi_data, and edi_type. The post method should then be invoked.

Basic Features: GISB Versions 1.4 and above

Security is provided via the use of PGP. If you want to sign and/or encrypt your message set the sign_data and encrypt_data properties to true. The struct does not itself implement PGP, instead it uses a

The following table defines possible values that may be passed to the set_pgp_param.

homedirThe directory containing the public keyring, secret keyring and trust database. Please note this defaults to the application preferences directory of the user, hence if the GNUPG provider is being used from a ASP.NET application, homedir should be specified.
passphraseThe passphrase to access the secret keys in the secret-keyring.
useridThe identifier used to identify a secret key within the secret-keyring. Note: When decrypting if this value is not specified the struct will attempt to find the key within the keyring automatically based on information available in the PGP message itself.
recipient-useridThe identifier used to identify a public key within the public keyring. Note: When verifying a signature if this value is not specified the struct will attempt to find the key within the keyring automatically based on information available in the PGP message itself.
timeoutThe timeout in milliseconds that the provider will wait for a response from the OpenPGP executable. The default is 5000 (5 seconds).
usetempfileIf set to "true" the provider will write data to be processed to a temporary file on disk. This is useful when working with large files or binary files.
signingalgorithmThe signing algorithm to use when sign_data is True. Possible values are:
  • SHA1
  • MD5
  • SHA256 (default)
  • SHA384
  • SHA512
  • SHA224
  • RIPEMD160
encryptingalgorithmThe encrypting algorithm to use when encrypt_data is True. Possible values are:
  • CAST5
  • 3DES
  • AES256
  • AES192
  • AES128 (default)
  • BLOWFISH
  • TWOFISH
  • IDEA
compressionmethodThe compression method to use. Possible values are:
  • zip (default)
  • zlib
  • bzip2
  • none
to allow you to process the PGP data with a library of your choice.

TLS/SSL will also be used if the scheme in url is "https". In case your trading partner is using a self-signed certificate you may set ssl_accept_server_cert or trap the on_ssl_server_authentication event to accept the certificate.

After you post the server will issue a brief reply. If the server indicates some sort of an error an exception will be thrown. However, the absence of an error message does not necessarily mean that the server was able to read the EDI data. The server may attempt to process the data after closing the connection; if it finds an error it might send a separate error notification which may be processed by the GISBReceiver component.

Extended Security Options: NAESB Version 1.6

Version 1.6 of the NAESB/GISB protocol includes extensions to allow additional security. Like the AS2 protocol, version 1.6 allows for the use of receipts.

To request a receipt, set the receipt_to property. The receipt_type and receipt_security properties may be used to customize the receipt request; by default, the struct will request a GISB-Acknowledgement-Receipt signed over an SHA-1 hash. The receipt will be returned in the HTTP reply, and will automatically be verified by the struct.

Object Lifetime

The new() method returns a mutable reference to a struct instance. The object itself is kept in the global list maintained by IPWorksEDI. Due to this, the GISBSender struct cannot be disposed of automatically. Please, call the dispose(&self) method of GISBSender when you have finished using the instance.

Property List


The following is the full list of the properties of the struct with short descriptions. Click on the links for further details.

cookie_countThe number of records in the Cookie arrays.
cookie_domainThe domain of a received cookie.
cookie_expirationAn expiration time for the cookie (if provided by the server).
cookie_nameThe name of the cookie.
cookie_pathA path name to limit the cookie to (if provided by the server).
cookie_secureThe security flag of the received cookie.
cookie_valueThe value of the cookie.
data_element_countThe number of records in the DataElement arrays.
data_element_nameThe name of the current data element.
data_element_valueThe value of the current data element.
data_fromThe identity of the sending system.
data_toThe identity of the receiving system.
encrypt_dataWhether or not to encrypt the data.
firewall_auto_detectWhether to automatically detect and use firewall system settings, if available.
firewall_typeThe type of firewall to connect through.
firewall_hostThe name or IP address of the firewall (optional).
firewall_passwordA password if authentication is to be used when connecting through the firewall.
firewall_portThe Transmission Control Protocol (TCP) port for the firewall Host .
firewall_userA username if authentication is to be used when connecting through a firewall.
edi_dataThis property contains the EDI payload of the transmission.
edi_typeThe EDIType of the EDI message.
edi_file_nameIn a sender, if FileName is specified, the file specified will be used for the EDI payload of the transmission.
edi_nameName is the final name to be associated with the contents of either the Data or FileName properties.
gisb_versionThe version of GISB/NAESB being used.
local_hostThe name of the local host or user-assigned IP interface through which connections are initiated or accepted.
log_directoryThe path to a directory for logging.
log_fileThe log file written.
proxy_auth_schemeThe type of authorization to perform when connecting to the proxy.
proxy_auto_detectWhether to automatically detect and use proxy system settings, if available.
proxy_passwordA password if authentication is to be used for the proxy.
proxy_portThe Transmission Control Protocol (TCP) port for the proxy Server (default 80).
proxy_serverIf a proxy Server is given, then the HTTP request is sent to the proxy instead of the server otherwise specified.
proxy_sslWhen to use a Secure Sockets Layer (SSL) for the connection to the proxy.
proxy_userA username if authentication is to be used for the proxy.
public_keyring_dataPublic keyring data.
receipt_security[1.6] Used to indicate the security options requested for the receipt.
receipt_signing_protocol[1.6] Indicates the protocol used to sign the receipt.
receipt_to[1.6] Used to request a receipt.
receipt_type[1.6] The type of receipt requested.
reply_headersThe HTTP headers provided for the ResponseContent .
request_statusThe status of the request.
response_contentThe response returned from the server.
secret_keyring_dataSecret keyring data.
sign_dataWhether or not to sign the data.
ssl_accept_server_cert_effective_dateThe date on which this certificate becomes valid.
ssl_accept_server_cert_expiration_dateThe date on which the certificate expires.
ssl_accept_server_cert_extended_key_usageA comma-delimited list of extended key usage identifiers.
ssl_accept_server_cert_fingerprintThe hex-encoded, 16-byte MD5 fingerprint of the certificate.
ssl_accept_server_cert_fingerprint_sha1The hex-encoded, 20-byte SHA-1 fingerprint of the certificate.
ssl_accept_server_cert_fingerprint_sha256The hex-encoded, 32-byte SHA-256 fingerprint of the certificate.
ssl_accept_server_cert_issuerThe issuer of the certificate.
ssl_accept_server_cert_private_keyThe private key of the certificate (if available).
ssl_accept_server_cert_private_key_availableWhether a PrivateKey is available for the selected certificate.
ssl_accept_server_cert_private_key_containerThe name of the PrivateKey container for the certificate (if available).
ssl_accept_server_cert_public_keyThe public key of the certificate.
ssl_accept_server_cert_public_key_algorithmThe textual description of the certificate's public key algorithm.
ssl_accept_server_cert_public_key_lengthThe length of the certificate's public key (in bits).
ssl_accept_server_cert_serial_numberThe serial number of the certificate encoded as a string.
ssl_accept_server_cert_signature_algorithmThe text description of the certificate's signature algorithm.
ssl_accept_server_cert_storeThe name of the certificate store for the client certificate.
ssl_accept_server_cert_store_passwordIf the type of certificate store requires a password, this property is used to specify the password needed to open the certificate store.
ssl_accept_server_cert_store_typeThe type of certificate store for this certificate.
ssl_accept_server_cert_subject_alt_namesComma-separated lists of alternative subject names for the certificate.
ssl_accept_server_cert_thumbprint_md5The MD5 hash of the certificate.
ssl_accept_server_cert_thumbprint_sha1The SHA-1 hash of the certificate.
ssl_accept_server_cert_thumbprint_sha256The SHA-256 hash of the certificate.
ssl_accept_server_cert_usageThe text description of UsageFlags .
ssl_accept_server_cert_usage_flagsThe flags that show intended use for the certificate.
ssl_accept_server_cert_versionThe certificate's version number.
ssl_accept_server_cert_subjectThe subject of the certificate used for client authentication.
ssl_accept_server_cert_encodedThe certificate (PEM/Base64 encoded).
ssl_cert_effective_dateThe date on which this certificate becomes valid.
ssl_cert_expiration_dateThe date on which the certificate expires.
ssl_cert_extended_key_usageA comma-delimited list of extended key usage identifiers.
ssl_cert_fingerprintThe hex-encoded, 16-byte MD5 fingerprint of the certificate.
ssl_cert_fingerprint_sha1The hex-encoded, 20-byte SHA-1 fingerprint of the certificate.
ssl_cert_fingerprint_sha256The hex-encoded, 32-byte SHA-256 fingerprint of the certificate.
ssl_cert_issuerThe issuer of the certificate.
ssl_cert_private_keyThe private key of the certificate (if available).
ssl_cert_private_key_availableWhether a PrivateKey is available for the selected certificate.
ssl_cert_private_key_containerThe name of the PrivateKey container for the certificate (if available).
ssl_cert_public_keyThe public key of the certificate.
ssl_cert_public_key_algorithmThe textual description of the certificate's public key algorithm.
ssl_cert_public_key_lengthThe length of the certificate's public key (in bits).
ssl_cert_serial_numberThe serial number of the certificate encoded as a string.
ssl_cert_signature_algorithmThe text description of the certificate's signature algorithm.
ssl_cert_storeThe name of the certificate store for the client certificate.
ssl_cert_store_passwordIf the type of certificate store requires a password, this property is used to specify the password needed to open the certificate store.
ssl_cert_store_typeThe type of certificate store for this certificate.
ssl_cert_subject_alt_namesComma-separated lists of alternative subject names for the certificate.
ssl_cert_thumbprint_md5The MD5 hash of the certificate.
ssl_cert_thumbprint_sha1The SHA-1 hash of the certificate.
ssl_cert_thumbprint_sha256The SHA-256 hash of the certificate.
ssl_cert_usageThe text description of UsageFlags .
ssl_cert_usage_flagsThe flags that show intended use for the certificate.
ssl_cert_versionThe certificate's version number.
ssl_cert_subjectThe subject of the certificate used for client authentication.
ssl_cert_encodedThe certificate (PEM/Base64 encoded).
ssl_providerThe Secure Sockets Layer/Transport Layer Security (SSL/TLS) implementation to use.
ssl_server_cert_effective_dateThe date on which this certificate becomes valid.
ssl_server_cert_expiration_dateThe date on which the certificate expires.
ssl_server_cert_extended_key_usageA comma-delimited list of extended key usage identifiers.
ssl_server_cert_fingerprintThe hex-encoded, 16-byte MD5 fingerprint of the certificate.
ssl_server_cert_fingerprint_sha1The hex-encoded, 20-byte SHA-1 fingerprint of the certificate.
ssl_server_cert_fingerprint_sha256The hex-encoded, 32-byte SHA-256 fingerprint of the certificate.
ssl_server_cert_issuerThe issuer of the certificate.
ssl_server_cert_private_keyThe private key of the certificate (if available).
ssl_server_cert_private_key_availableWhether a PrivateKey is available for the selected certificate.
ssl_server_cert_private_key_containerThe name of the PrivateKey container for the certificate (if available).
ssl_server_cert_public_keyThe public key of the certificate.
ssl_server_cert_public_key_algorithmThe textual description of the certificate's public key algorithm.
ssl_server_cert_public_key_lengthThe length of the certificate's public key (in bits).
ssl_server_cert_serial_numberThe serial number of the certificate encoded as a string.
ssl_server_cert_signature_algorithmThe text description of the certificate's signature algorithm.
ssl_server_cert_storeThe name of the certificate store for the client certificate.
ssl_server_cert_store_passwordIf the type of certificate store requires a password, this property is used to specify the password needed to open the certificate store.
ssl_server_cert_store_typeThe type of certificate store for this certificate.
ssl_server_cert_subject_alt_namesComma-separated lists of alternative subject names for the certificate.
ssl_server_cert_thumbprint_md5The MD5 hash of the certificate.
ssl_server_cert_thumbprint_sha1The SHA-1 hash of the certificate.
ssl_server_cert_thumbprint_sha256The SHA-256 hash of the certificate.
ssl_server_cert_usageThe text description of UsageFlags .
ssl_server_cert_usage_flagsThe flags that show intended use for the certificate.
ssl_server_cert_versionThe certificate's version number.
ssl_server_cert_subjectThe subject of the certificate used for client authentication.
ssl_server_cert_encodedThe certificate (PEM/Base64 encoded).
subjectThe subject of the message.
timeoutThe timeout for the struct.
transaction_idThe transaction ID of the message.
urlThe URL to post to.
user_agentInformation about the user agent.

Method List


The following is the full list of the methods of the struct with short descriptions. Click on the links for further details.

configSets or retrieves a configuration setting.
do_eventsThis method processes events from the internal message queue.
postPost data to the server, and check the receipt.
resetResets the state of the control.
set_pgp_paramSets a parameter in the PGP provider.

Event List


The following is the full list of the events fired by the struct with short descriptions. Click on the links for further details.

on_connectedFired immediately after a connection completes (or fails).
on_disconnectedFired when a connection is closed.
on_end_transferFired when a document finishes transferring.
on_errorFired when information is available about errors during data delivery.
on_headerFired every time a header line comes in.
on_logFired with log information while processing a message.
on_set_cookieFired for every cookie set by the server.
on_ssl_server_authenticationFired after the server presents its certificate to the client.
on_ssl_statusFired when secure connection progress messages are available.
on_start_transferFired when a document starts transferring (after the headers).
on_transferFired while a document transfers (delivers document).

Config Settings


The following is a list of config settings for the struct with short descriptions. Click on the links for further details.

AllowOldPacketTypeWhether to allow the older encrypted packet type.
AuthorizationThe Authorization string to be sent to the server.
AuthSchemeThe authorization scheme to be used when server authorization is to be performed.
LogFilenameThe base name of the log file.
LogLevelSpecifies the level of detail that is logged.
PasswordA password if authentication is to be used.
PGPCombineSignAndEncryptWhether to sign and encrypt in a single step or not.
UserA user name if authentication is to be used.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
MaskSensitiveDataWhether sensitive data is masked in log messages.
UseInternalSecurityAPIWhether or not to use the system security libraries or an internal implementation.

cookie_count property (GISBSender Struct)

The number of records in the Cookie arrays.

fn cookie_count(&self) -> Result<i32, IPWorksEDIError> 
fn set_cookie_count(&self, value : i32) -> Option<IPWorksEDIError>

0

This property controls the size of the following arrays:

The array indices start at 0 and end at cookie_count - 1.

i32

cookie_domain property (GISBSender Struct)

The domain of a received cookie.

fn cookie_domain(&self, CookieIndex : i32) -> Result<String, IPWorksEDIError> 

""

The domain of a received cookie. This property contains a domain name to limit the cookie to (if provided by the server). If the server does not provide a domain name, this property will contain an empty string. The convention in this case is to use the server name specified by url_server as the cookie domain.

The CookieIndex parameter specifies the index of the item in the array. The size of the array is controlled by the cookie_count property.

This property is read-only.

String

cookie_expiration property (GISBSender Struct)

An expiration time for the cookie (if provided by the server).

fn cookie_expiration(&self, CookieIndex : i32) -> Result<String, IPWorksEDIError> 

""

An expiration time for the cookie (if provided by the server). The time format used is "Weekday, DD-Mon-YY HH:MM:SS GMT". If the server does not provide an expiration time, this property will contain an empty string. The convention is to drop the cookie at the end of the session.

The CookieIndex parameter specifies the index of the item in the array. The size of the array is controlled by the cookie_count property.

This property is read-only.

String

cookie_name property (GISBSender Struct)

The name of the cookie.

fn cookie_name(&self, CookieIndex : i32) -> Result<String, IPWorksEDIError> 
fn set_cookie_name(&self, CookieIndex : i32, value : &str) -> Option<IPWorksEDIError> fn set_cookie_name_ref(&self, CookieIndex : i32, value : &String) -> Option<IPWorksEDIError>

""

This property, along with cookie_value, stores the cookie that is to be sent to the server. The on_set_cookie event displays the cookies sent by the server and their properties.

The CookieIndex parameter specifies the index of the item in the array. The size of the array is controlled by the cookie_count property.

String

cookie_path property (GISBSender Struct)

A path name to limit the cookie to (if provided by the server).

fn cookie_path(&self, CookieIndex : i32) -> Result<String, IPWorksEDIError> 

""

A path name to limit the cookie to (if provided by the server). If the server does not provide a cookie path, the path property will be an empty string. The convention in this case is to use the path specified by url_path as the cookie path.

The CookieIndex parameter specifies the index of the item in the array. The size of the array is controlled by the cookie_count property.

This property is read-only.

String

cookie_secure property (GISBSender Struct)

The security flag of the received cookie.

fn cookie_secure(&self, CookieIndex : i32) -> Result<bool, IPWorksEDIError> 

false

The security flag of the received cookie. This property specifies whether the cookie is secure. If the value of this property is True, the cookie value must be submitted only through a secure (HTTPS) connection.

The CookieIndex parameter specifies the index of the item in the array. The size of the array is controlled by the cookie_count property.

This property is read-only.

bool

cookie_value property (GISBSender Struct)

The value of the cookie.

fn cookie_value(&self, CookieIndex : i32) -> Result<String, IPWorksEDIError> 
fn set_cookie_value(&self, CookieIndex : i32, value : &str) -> Option<IPWorksEDIError> fn set_cookie_value_ref(&self, CookieIndex : i32, value : &String) -> Option<IPWorksEDIError>

""

The value of the cookie. A corresponding value is associated with the cookie specified by cookie_name. This property holds that value.

The on_set_cookie event provides the cookies set by the server.

The CookieIndex parameter specifies the index of the item in the array. The size of the array is controlled by the cookie_count property.

String

data_element_count property (GISBSender Struct)

The number of records in the DataElement arrays.

Syntax

fn data_element_count(&self) -> Result<i32, IPWorksEDIError> 
fn set_data_element_count(&self, value : i32) -> Option<IPWorksEDIError>

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at data_element_count - 1.

Data Type

i32

data_element_name property (GISBSender Struct)

The name of the current data element.

Syntax

fn data_element_name(&self, ElementIndex : i32) -> Result<String, IPWorksEDIError> 
fn set_data_element_name(&self, ElementIndex : i32, value : &str) -> Option<IPWorksEDIError> fn set_data_element_name_ref(&self, ElementIndex : i32, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

The name of the current data element.

The ElementIndex parameter specifies the index of the item in the array. The size of the array is controlled by the data_element_count property.

Data Type

String

data_element_value property (GISBSender Struct)

The value of the current data element.

Syntax

fn data_element_value(&self, ElementIndex : i32) -> Result<String, IPWorksEDIError> 
fn set_data_element_value(&self, ElementIndex : i32, value : &str) -> Option<IPWorksEDIError> fn set_data_element_value_ref(&self, ElementIndex : i32, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

The value of the current data element.

The ElementIndex parameter specifies the index of the item in the array. The size of the array is controlled by the data_element_count property.

Data Type

String

data_from property (GISBSender Struct)

The identity of the sending system.

Syntax

fn data_from(&self) -> Result<String, IPWorksEDIError> 
fn set_data_from(&self, value : &str) -> Option<IPWorksEDIError> fn set_data_from_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

Will generally be the DUNS number of the sending trading partner. Required.

Data Type

String

data_to property (GISBSender Struct)

The identity of the receiving system.

Syntax

fn data_to(&self) -> Result<String, IPWorksEDIError> 
fn set_data_to(&self, value : &str) -> Option<IPWorksEDIError> fn set_data_to_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

Will generally be the DUNS number of the receiving trading partner. Required.

Data Type

String

encrypt_data property (GISBSender Struct)

Whether or not to encrypt the data.

Syntax

fn encrypt_data(&self) -> Result<bool, IPWorksEDIError> 
fn set_encrypt_data(&self, value : bool) -> Option<IPWorksEDIError>

Default Value

false

Remarks

If true, then the data will be encrypted before sending to the server.

Data Type

bool

firewall_auto_detect property (GISBSender Struct)

Whether to automatically detect and use firewall system settings, if available.

Syntax

fn firewall_auto_detect(&self) -> Result<bool, IPWorksEDIError> 
fn set_firewall_auto_detect(&self, value : bool) -> Option<IPWorksEDIError>

Default Value

false

Remarks

Data Type

bool

firewall_type property (GISBSender Struct)

The type of firewall to connect through.

Syntax

fn firewall_type(&self) -> Result<i32, IPWorksEDIError> 
fn set_firewall_type(&self, value : i32) -> Option<IPWorksEDIError>

Possible Values

0   // None
1 // Tunnel
2 // SOCKS4
3 // SOCKS5
10 // SOCKS4A

Default Value

0

Remarks

The type of firewall to connect through. The applicable values are as follows:

fwNone (0)No firewall (default setting).
fwTunnel (1)Connect through a tunneling proxy. firewall_port is set to 80.
fwSOCKS4 (2)Connect through a SOCKS4 Proxy. firewall_port is set to 1080.
fwSOCKS5 (3)Connect through a SOCKS5 Proxy. firewall_port is set to 1080.
fwSOCKS4A (10)Connect through a SOCKS4A Proxy. firewall_port is set to 1080.

Data Type

i32

firewall_host property (GISBSender Struct)

The name or IP address of the firewall (optional).

Syntax

fn firewall_host(&self) -> Result<String, IPWorksEDIError> 
fn set_firewall_host(&self, value : &str) -> Option<IPWorksEDIError> fn set_firewall_host_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

The name or IP address of the firewall (optional). If a firewall_host is given, the requested connections will be authenticated through the specified firewall when connecting.

If this property is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, this property is set to the corresponding address. If the search is not successful, the struct fails with an error.

Data Type

String

firewall_password property (GISBSender Struct)

A password if authentication is to be used when connecting through the firewall.

Syntax

fn firewall_password(&self) -> Result<String, IPWorksEDIError> 
fn set_firewall_password(&self, value : &str) -> Option<IPWorksEDIError> fn set_firewall_password_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

A password if authentication is to be used when connecting through the firewall. If firewall_host is specified, the firewall_user and firewall_password properties are used to connect and authenticate to the given firewall. If the authentication fails, the struct fails with an error.

Data Type

String

firewall_port property (GISBSender Struct)

The Transmission Control Protocol (TCP) port for the firewall Host .

Syntax

fn firewall_port(&self) -> Result<i32, IPWorksEDIError> 
fn set_firewall_port(&self, value : i32) -> Option<IPWorksEDIError>

Default Value

0

Remarks

The Transmission Control Protocol (TCP) port for the firewall firewall_host. See the description of the firewall_host property for details.

NOTE: This property is set automatically when firewall_type is set to a valid value. See the description of the firewall_type property for details.

Data Type

i32

firewall_user property (GISBSender Struct)

A username if authentication is to be used when connecting through a firewall.

Syntax

fn firewall_user(&self) -> Result<String, IPWorksEDIError> 
fn set_firewall_user(&self, value : &str) -> Option<IPWorksEDIError> fn set_firewall_user_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

A username if authentication is to be used when connecting through a firewall. If firewall_host is specified, this property and the firewall_password property are used to connect and authenticate to the given Firewall. If the authentication fails, the struct fails with an error.

Data Type

String

edi_data property (GISBSender Struct)

This property contains the EDI payload of the transmission.

Syntax

fn edi_data(&self) -> Result<Vec<u8>, IPWorksEDIError> 
fn set_edi_data(&self, value : Vec<u8>) -> Option<IPWorksEDIError> fn set_edi_data_ref(&self, value : &[u8]) -> Option<IPWorksEDIError>

Default Value

""

Remarks

In a receiver, this property will only be populated if edi_output_stream has not been specified and parse_request finishes without an error. edi_data will contain the full decrypted text of the EDI message.

Data Type

Vec<u8>

edi_type property (GISBSender Struct)

The EDIType of the EDI message.

Syntax

fn edi_type(&self) -> Result<String, IPWorksEDIError> 
fn set_edi_type(&self, value : &str) -> Option<IPWorksEDIError> fn set_edi_type_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

"X12"

Remarks

The EDIType of the EDI message. The default value is "X12". edi_type may also be set to "error", in which case the message is an error relating to a previous message. In this case the error_message property and related properties will provide more information.

Data Type

String

edi_file_name property (GISBSender Struct)

In a sender, if FileName is specified, the file specified will be used for the EDI payload of the transmission.

Syntax

fn edi_file_name(&self) -> Result<String, IPWorksEDIError> 
fn set_edi_file_name(&self, value : &str) -> Option<IPWorksEDIError> fn set_edi_file_name_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

In a sender, if edi_file_name is specified, the file specified will be used for the EDI payload of the transmission. edi_name will be populated with the name of the file.

In a receiver, if this property is set prior to calling parse_form_data and parse_request the incoming data will be decrypted and written to the file at the specified path.

Note: When edi_output_stream is set, the data will be written to the stream and this property will not be populated.

Data Type

String

edi_name property (GISBSender Struct)

Name is the final name to be associated with the contents of either the Data or FileName properties.

Syntax

fn edi_name(&self) -> Result<String, IPWorksEDIError> 
fn set_edi_name(&self, value : &str) -> Option<IPWorksEDIError> fn set_edi_name_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

"rfc1767.edi"

Remarks

edi_name is the final name to be associated with the contents of either the edi_data or edi_file_name properties. This corresponds to the filename attribute of the Content-Disposition header for the EDI payload.

When constructing EDI data to be sent, edi_name will be set to the same value as edi_file_name, but can be overridden after setting edi_file_name to indicate that another name should be used in the outbound request's Content-Disposition MIME header.

When receiving EDI data, edi_name will be read out of the "filename" attribute of the inbound request's Content-Disposition MIME header.

Data Type

String

gisb_version property (GISBSender Struct)

The version of GISB/NAESB being used.

Syntax

fn gisb_version(&self) -> Result<String, IPWorksEDIError> 
fn set_gisb_version(&self, value : &str) -> Option<IPWorksEDIError> fn set_gisb_version_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

"1.6"

Remarks

The version of the GISB/NAESB EDM being used. Supported values are "1.4", "1.6", "2.0", and "2.1". Note that requesting a receipt is only supported in version 1.6 and up.

Data Type

String

local_host property (GISBSender Struct)

The name of the local host or user-assigned IP interface through which connections are initiated or accepted.

Syntax

fn local_host(&self) -> Result<String, IPWorksEDIError> 
fn set_local_host(&self, value : &str) -> Option<IPWorksEDIError> fn set_local_host_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multihomed hosts (machines with more than one IP interface) setting LocalHost to the IP address of an interface will make the struct initiate connections (or accept in the case of server structs) only through that interface. It is recommended to provide an IP address rather than a hostname when setting this property to ensure the desired interface is used.

If the struct is connected, the local_host property shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multihomed hosts (machines with more than one IP interface).

NOTE: local_host is not persistent. You must always set it in code, and never in the property window.

Data Type

String

log_directory property (GISBSender Struct)

The path to a directory for logging.

Syntax

fn log_directory(&self) -> Result<String, IPWorksEDIError> 
fn set_log_directory(&self, value : &str) -> Option<IPWorksEDIError> fn set_log_directory_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

Setting LogDirectory will instruct the component to log the details of each transmission to unique files in the specified directory. For each request processed, the struct will log the original EDI data, the complete text of the outgoing request and the incoming response.

The struct will write a single file for each transmission, with extension ".log". In case of error an additional file will be written with extension ".err", and the error will be reported in both files.

The filenames will be chosen automatically by the struct. Each filename will be the system time, in the format YYYY-MM-DD-HH-MM-SS-MMMM, with extensions "-2", "-3", used in case files of those names already exist. After each transaction is processed log_file will contain the name of the files just written, minus the extension ".log" or ".err".

If logs cannot be written an exception will be thrown.

Data Type

String

log_file property (GISBSender Struct)

The log file written.

Syntax

fn log_file(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

In case log_directory is specified a log file will be written in the specified directory and log_file will contain the path. A diagnostic log will be written with filename log_file + ".log", and in case of error, an additional file will be written with filename log_file + ".dat".

This property is read-only.

Data Type

String

proxy_auth_scheme property (GISBSender Struct)

The type of authorization to perform when connecting to the proxy.

Syntax

fn proxy_auth_scheme(&self) -> Result<i32, IPWorksEDIError> 
fn set_proxy_auth_scheme(&self, value : i32) -> Option<IPWorksEDIError>

Possible Values

0   // Basic
1 // Digest
2 // Proprietary
3 // None
4 // Ntlm
5 // Negotiate

Default Value

0

Remarks

The type of authorization to perform when connecting to the proxy. This is used only when the proxy_user and proxy_password properties are set.

proxy_auth_scheme should be set to authNone (3) when no authentication is expected.

By default, proxy_auth_scheme is authBasic (0), and if the proxy_user and proxy_password properties are set, the struct will attempt basic authentication.

If proxy_auth_scheme is set to authDigest (1), digest authentication will be attempted instead.

If proxy_auth_scheme is set to authProprietary (2), then the authorization token will not be generated by the struct. Look at the configuration file for the struct being used to find more information about manually setting this token.

If proxy_auth_scheme is set to authNtlm (4), NTLM authentication will be used.

For security reasons, setting this property will clear the values of proxy_user and proxy_password.

Data Type

i32

proxy_auto_detect property (GISBSender Struct)

Whether to automatically detect and use proxy system settings, if available.

Syntax

fn proxy_auto_detect(&self) -> Result<bool, IPWorksEDIError> 
fn set_proxy_auto_detect(&self, value : bool) -> Option<IPWorksEDIError>

Default Value

false

Remarks

Whether to automatically detect and use proxy system settings, if available. The default value is false.

Data Type

bool

proxy_password property (GISBSender Struct)

A password if authentication is to be used for the proxy.

Syntax

fn proxy_password(&self) -> Result<String, IPWorksEDIError> 
fn set_proxy_password(&self, value : &str) -> Option<IPWorksEDIError> fn set_proxy_password_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

If proxy_auth_scheme is set to Basic Authentication, the proxy_user and proxy_password properties are Base64 encoded and the proxy authentication token will be generated in the form Basic [encoded-user-password].

If proxy_auth_scheme is set to Digest Authentication, the proxy_user and proxy_password properties are used to respond to the Digest Authentication challenge from the server.

If proxy_auth_scheme is set to NTLM Authentication, the proxy_user and proxy_password properties are used to authenticate through NTLM negotiation.

Data Type

String

proxy_port property (GISBSender Struct)

The Transmission Control Protocol (TCP) port for the proxy Server (default 80).

Syntax

fn proxy_port(&self) -> Result<i32, IPWorksEDIError> 
fn set_proxy_port(&self, value : i32) -> Option<IPWorksEDIError>

Default Value

80

Remarks

The Transmission Control Protocol (TCP) port for the proxy proxy_server (default 80). See the description of the proxy_server property for details.

Data Type

i32

proxy_server property (GISBSender Struct)

If a proxy Server is given, then the HTTP request is sent to the proxy instead of the server otherwise specified.

Syntax

fn proxy_server(&self) -> Result<String, IPWorksEDIError> 
fn set_proxy_server(&self, value : &str) -> Option<IPWorksEDIError> fn set_proxy_server_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

If the proxy_server property is set to a domain name, a DNS request is initiated. Upon successful termination of the request, the proxy_server property is set to the corresponding address. If the search is not successful, an error is returned.

Data Type

String

proxy_ssl property (GISBSender Struct)

When to use a Secure Sockets Layer (SSL) for the connection to the proxy.

Syntax

fn proxy_ssl(&self) -> Result<i32, IPWorksEDIError> 
fn set_proxy_ssl(&self, value : i32) -> Option<IPWorksEDIError>

Possible Values

0   // Automatic
1 // Always
2 // Never
3 // Tunnel

Default Value

0

Remarks

When to use a Secure Sockets Layer (SSL) for the connection to the proxy. The applicable values are as follows:

psAutomatic (0)Default setting. If the URL is an https URL, the struct will use the psTunnel option. If the URL is an http URL, the struct will use the psNever option.
psAlways (1)The connection is always SSL-enabled.
psNever (2)The connection is not SSL-enabled.
psTunnel (3)The connection is made through a tunneling (HTTP) proxy.

Data Type

i32

proxy_user property (GISBSender Struct)

A username if authentication is to be used for the proxy.

Syntax

fn proxy_user(&self) -> Result<String, IPWorksEDIError> 
fn set_proxy_user(&self, value : &str) -> Option<IPWorksEDIError> fn set_proxy_user_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

If proxy_auth_scheme is set to Basic Authentication, the proxy_user and proxy_password properties are Base64 encoded and the proxy authentication token will be generated in the form Basic [encoded-user-password].

If proxy_auth_scheme is set to Digest Authentication, the proxy_user and proxy_password properties are used to respond to the Digest Authentication challenge from the server.

If proxy_auth_scheme is set to NTLM Authentication, the proxy_user and proxy_password properties are used to authenticate through NTLM negotiation.

Data Type

String

public_keyring_data property (GISBSender Struct)

Public keyring data.

Syntax

fn public_keyring_data(&self) -> Result<Vec<u8>, IPWorksEDIError> 
fn set_public_keyring_data(&self, value : Vec<u8>) -> Option<IPWorksEDIError> fn set_public_keyring_data_ref(&self, value : &[u8]) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property allows the public keyring data to be specific in the form of a byte array. Use this in conjunction with secret_keyring_data and the keyring will be loaded from this data instead of the homedir.

Data Type

Vec<u8>

receipt_security property (GISBSender Struct)

[1.6] Used to indicate the security options requested for the receipt.

Syntax

fn receipt_security(&self) -> Result<String, IPWorksEDIError> 
fn set_receipt_security(&self, value : &str) -> Option<IPWorksEDIError> fn set_receipt_security_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

"signed-receipt-protocol=optional, pgp-signature; signed-receipt-micalg=optional, sha1, md5"

Remarks

Only supported for Version 1.6.

By default, the struct will request that the receipt be signed with a PGP signature over an SHA1 or MD5 hash (if these algorithms are supported by the server).

Set receipt_security to an empty string to request an unsigned receipt.

The string format is that of the Disposition-notification-options HTTP header, as specified in RFC 3335.

Data Type

String

receipt_signing_protocol property (GISBSender Struct)

[1.6] Indicates the protocol used to sign the receipt.

Syntax

fn receipt_signing_protocol(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

Only supported for Version 1.6.

This property will be populated after a receipt is received from the server and validated. It will contain the MIME type of the signature used, if any (i.e., "application/pgp-signature"). It will contain an empty string if the receipt is unsigned.

This property is read-only.

Data Type

String

receipt_to property (GISBSender Struct)

[1.6] Used to request a receipt.

Syntax

fn receipt_to(&self) -> Result<String, IPWorksEDIError> 
fn set_receipt_to(&self, value : &str) -> Option<IPWorksEDIError> fn set_receipt_to_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

Only supported for Version 1.6.

If this property is set, a Receipt-Notification-To form variable will be added to the request, and a receipt will be requested. Generally this should be the same as data_from.

By default, the struct will request a GISB-Acknowledgement-Receipt, signed with PGP and delivered synchronously in the HTTP reply. You may set receipt_security to request a different type of signature, or no signature at all.

Data Type

String

receipt_type property (GISBSender Struct)

[1.6] The type of receipt requested.

Syntax

fn receipt_type(&self) -> Result<String, IPWorksEDIError> 
fn set_receipt_type(&self, value : &str) -> Option<IPWorksEDIError> fn set_receipt_type_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

"gisb-acknowledgement-receipt"

Remarks

Only supported for Version 1.6.

If receipt_to is set, the struct will request a receipt of the indicated type. Note that the only type of receipt readable by the struct is a gisb-acknowledgement-receipt, and only if using version 1.6 of the GISB/NAESB protocol.

The security settings for the receipt (signed or unsigned) may be configured by setting receipt_security.

Data Type

String

reply_headers property (GISBSender Struct)

The HTTP headers provided for the ResponseContent .

Syntax

fn reply_headers(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The HTTP headers provided for the response_content.

This property is read-only.

Data Type

String

request_status property (GISBSender Struct)

The status of the request.

Syntax

fn request_status(&self) -> Result<String, IPWorksEDIError> 

Default Value

"ok"

Remarks

request_status will be determined from the server response after a post. If the request status is anything other than "ok" the struct will throw an exception. Note that servers are not required to process data immediately, and a request_status of "ok" is not a guarantee that the server was able to process your data.

The following is the complete list of error codes defined by the GISB 1.4 and NAESB 1.6 specifications.

The following is the complete list of error codes defined by the GISB 1.4 and NAESB 1.6 specification. Error codes only defined in version 1.6 are notated with "1.6" below, and errors that will be detected and reported automatically by the GISBReceiver struct are indicated with an asterisk.

The following is the complete list of error codes defined by the GISB 1.4 specification.

EEDM100*: Missing From Common Code Identifier Code

EEDM101*: Missing To Common Code Identifier Code

EEDM102*: Missing Input Format

EEDM103*: Missing Data File

EEDM104: Missing Transaction Set

EEDM105: Invalid From Common Code Identifier

EEDM106: Invalid To Common Code Identifier

EEDM107: Invalid Input Format

EEDM108: Invalid Transaction Set

EEDM109: No Parameters Supplied

EEDM110: (1.6) Invalid "version"

EEDM111: (1.6) Missing "version"

EEDM112: (1.6) "receipt-security-selection" not mutually agreed

EEDM113*: (1.6) Invalid "receipt-security-selection"

EEDM114: (1.6) Missing "receipt-disposition-to"

EEDM115: (1.6) Invalid "receipt-disposition-to"

EEDM116: (1.6) Missing "receipt-report-type"

EEDM117: (1.6) Invalid "receipt-report-type"

EEDM118: (1.6) Missing "receipt-security-selection"

EEDM119: (1.6) Mutually agreed element, refnum, not present

EEDM601: Public Key Invalid

EEDM602: File Not Encrypted

EEDM603: Encrypted File Truncated

EEDM604*: Encrypted File Not Signed Or Signature Not Matched

EEDM699: Decryption Error

EEDM701: EDM Party Not Associated With EDI Party

EEDM702: Data Structure Error

EEDM703: Data Set Exchange Not Established For Trading Partner

EEDM999: System Error

WEDM100: Transaction Set Sent Not Mutually Agreed

WEDM102: (1.6) "receipt-security-selection" not mutually agreed

WEDM103: (1.6) Missing "receipt-security-selection"

WEDM104: (1.6) Element refnum received; not mutually agreed; ignored

This property is read-only.

Data Type

String

response_content property (GISBSender Struct)

The response returned from the server.

Syntax

fn response_content(&self) -> Result<Vec<u8>, IPWorksEDIError> 

Default Value

""

Remarks

This property will be populated after a response is received from the server. If a receipt was requested this property will contain the receipt; otherwise this property will contain at least a small bit of HTML describing whether or not the transmission succeeded.

In case the receipt was signed, response_content will contain the unsigned receipt, together with its MIME headers.

Note that if a signature was requested but an unsigned receipt is received the struct will throw an exception.

This property is read-only.

Data Type

Vec<u8>

secret_keyring_data property (GISBSender Struct)

Secret keyring data.

Syntax

fn secret_keyring_data(&self) -> Result<Vec<u8>, IPWorksEDIError> 
fn set_secret_keyring_data(&self, value : Vec<u8>) -> Option<IPWorksEDIError> fn set_secret_keyring_data_ref(&self, value : &[u8]) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property allows the secret keyring data to be specific in the form of a byte array. Use this in conjunction with public_keyring_data and the keyring will be loaded from this data instead of the homedir.

Data Type

Vec<u8>

sign_data property (GISBSender Struct)

Whether or not to sign the data.

Syntax

fn sign_data(&self) -> Result<bool, IPWorksEDIError> 
fn set_sign_data(&self, value : bool) -> Option<IPWorksEDIError>

Default Value

false

Remarks

If true, then the data will be signed before sending to the server.

Data Type

bool

ssl_accept_server_cert_effective_date property (GISBSender Struct)

The date on which this certificate becomes valid.

Syntax

fn ssl_accept_server_cert_effective_date(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The date on which this certificate becomes valid. Before this date, it is not valid. The date is localized to the system's time zone. The following example illustrates the format of an encoded date:

23-Jan-2000 15:00:00.

This property is read-only.

Data Type

String

ssl_accept_server_cert_expiration_date property (GISBSender Struct)

The date on which the certificate expires.

Syntax

fn ssl_accept_server_cert_expiration_date(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The date on which the certificate expires. After this date, the certificate will no longer be valid. The date is localized to the system's time zone. The following example illustrates the format of an encoded date:

23-Jan-2001 15:00:00.

This property is read-only.

Data Type

String

ssl_accept_server_cert_extended_key_usage property (GISBSender Struct)

A comma-delimited list of extended key usage identifiers.

Syntax

fn ssl_accept_server_cert_extended_key_usage(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

A comma-delimited list of extended key usage identifiers. These are the same as ASN.1 object identifiers (OIDs).

This property is read-only.

Data Type

String

ssl_accept_server_cert_fingerprint property (GISBSender Struct)

The hex-encoded, 16-byte MD5 fingerprint of the certificate.

Syntax

fn ssl_accept_server_cert_fingerprint(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The hex-encoded, 16-byte MD5 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.

The following example illustrates the format: bc:2a:72:af:fe:58:17:43:7a:5f:ba:5a:7c:90:f7:02

This property is read-only.

Data Type

String

ssl_accept_server_cert_fingerprint_sha1 property (GISBSender Struct)

The hex-encoded, 20-byte SHA-1 fingerprint of the certificate.

Syntax

fn ssl_accept_server_cert_fingerprint_sha1(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The hex-encoded, 20-byte SHA-1 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.

The following example illustrates the format: 30:7b:fa:38:65:83:ff:da:b4:4e:07:3f:17:b8:a4:ed:80:be:ff:84

This property is read-only.

Data Type

String

ssl_accept_server_cert_fingerprint_sha256 property (GISBSender Struct)

The hex-encoded, 32-byte SHA-256 fingerprint of the certificate.

Syntax

fn ssl_accept_server_cert_fingerprint_sha256(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The hex-encoded, 32-byte SHA-256 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.

The following example illustrates the format: 6a:80:5c:33:a9:43:ea:b0:96:12:8a:64:96:30:ef:4a:8a:96:86:ce:f4:c7:be:10:24:8e:2b:60:9e:f3:59:53

This property is read-only.

Data Type

String

ssl_accept_server_cert_issuer property (GISBSender Struct)

The issuer of the certificate.

Syntax

fn ssl_accept_server_cert_issuer(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The issuer of the certificate. This property contains a string representation of the name of the issuing authority for the certificate.

This property is read-only.

Data Type

String

ssl_accept_server_cert_private_key property (GISBSender Struct)

The private key of the certificate (if available).

Syntax

fn ssl_accept_server_cert_private_key(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The private key of the certificate (if available). The key is provided as PEM/Base64-encoded data.

NOTE: The ssl_accept_server_cert_private_key may be available but not exportable. In this case, ssl_accept_server_cert_private_key returns an empty string.

This property is read-only.

Data Type

String

ssl_accept_server_cert_private_key_available property (GISBSender Struct)

Whether a PrivateKey is available for the selected certificate.

Syntax

fn ssl_accept_server_cert_private_key_available(&self) -> Result<bool, IPWorksEDIError> 

Default Value

false

Remarks

Whether a ssl_accept_server_cert_private_key is available for the selected certificate. If ssl_accept_server_cert_private_key_available is True, the certificate may be used for authentication purposes (e.g., server authentication).

This property is read-only.

Data Type

bool

ssl_accept_server_cert_private_key_container property (GISBSender Struct)

The name of the PrivateKey container for the certificate (if available).

Syntax

fn ssl_accept_server_cert_private_key_container(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The name of the ssl_accept_server_cert_private_key container for the certificate (if available). This functionality is available only on Windows platforms.

This property is read-only.

Data Type

String

ssl_accept_server_cert_public_key property (GISBSender Struct)

The public key of the certificate.

Syntax

fn ssl_accept_server_cert_public_key(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The public key of the certificate. The key is provided as PEM/Base64-encoded data.

This property is read-only.

Data Type

String

ssl_accept_server_cert_public_key_algorithm property (GISBSender Struct)

The textual description of the certificate's public key algorithm.

Syntax

fn ssl_accept_server_cert_public_key_algorithm(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The textual description of the certificate's public key algorithm. The property contains either the name of the algorithm (e.g., "RSA" or "RSA_DH") or an object identifier (OID) string representing the algorithm.

This property is read-only.

Data Type

String

ssl_accept_server_cert_public_key_length property (GISBSender Struct)

The length of the certificate's public key (in bits).

Syntax

fn ssl_accept_server_cert_public_key_length(&self) -> Result<i32, IPWorksEDIError> 

Default Value

0

Remarks

The length of the certificate's public key (in bits). Common values are 512, 1024, and 2048.

This property is read-only.

Data Type

i32

ssl_accept_server_cert_serial_number property (GISBSender Struct)

The serial number of the certificate encoded as a string.

Syntax

fn ssl_accept_server_cert_serial_number(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The serial number of the certificate encoded as a string. The number is encoded as a series of hexadecimal digits, with each pair representing a byte of the serial number.

This property is read-only.

Data Type

String

ssl_accept_server_cert_signature_algorithm property (GISBSender Struct)

The text description of the certificate's signature algorithm.

Syntax

fn ssl_accept_server_cert_signature_algorithm(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The text description of the certificate's signature algorithm. The property contains either the name of the algorithm (e.g., "RSA" or "RSA_MD5RSA") or an object identifier (OID) string representing the algorithm.

This property is read-only.

Data Type

String

ssl_accept_server_cert_store property (GISBSender Struct)

The name of the certificate store for the client certificate.

Syntax

fn ssl_accept_server_cert_store(&self) -> Result<Vec<u8>, IPWorksEDIError> 
fn set_ssl_accept_server_cert_store(&self, value : Vec<u8>) -> Option<IPWorksEDIError> fn set_ssl_accept_server_cert_store_ref(&self, value : &[u8]) -> Option<IPWorksEDIError>

Default Value

"MY"

Remarks

The ssl_accept_server_cert_store_type property denotes the type of the certificate store specified by ssl_accept_server_cert_store. If the store is password-protected, specify the password in ssl_accept_server_cert_store_password.

ssl_accept_server_cert_store is used in conjunction with the ssl_accept_server_cert_subject property to specify client certificates. If ssl_accept_server_cert_store has a value, and ssl_accept_server_cert_subject or ssl_accept_server_cert_encoded is set, a search for a certificate is initiated. Please see the ssl_accept_server_cert_subject property for details.

Designations of certificate stores are platform dependent.

The following designations are the most common User and Machine certificate stores in Windows:

MYA certificate store holding personal certificates with their associated private keys.
CACertifying authority certificates.
ROOTRoot certificates.

When the certificate store type is cstPFXFile, this property must be set to the name of the file. When the type is cstPFXBlob, the property must be set to the binary contents of a PFX file (i.e., PKCS#12 certificate store).

Data Type

Vec<u8>

ssl_accept_server_cert_store_password property (GISBSender Struct)

If the type of certificate store requires a password, this property is used to specify the password needed to open the certificate store.

Syntax

fn ssl_accept_server_cert_store_password(&self) -> Result<String, IPWorksEDIError> 
fn set_ssl_accept_server_cert_store_password(&self, value : &str) -> Option<IPWorksEDIError> fn set_ssl_accept_server_cert_store_password_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

If the type of certificate store requires a password, this property is used to specify the password needed to open the certificate store.

Data Type

String

ssl_accept_server_cert_store_type property (GISBSender Struct)

The type of certificate store for this certificate.

Syntax

fn ssl_accept_server_cert_store_type(&self) -> Result<i32, IPWorksEDIError> 
fn set_ssl_accept_server_cert_store_type(&self, value : i32) -> Option<IPWorksEDIError>

Possible Values

0   // User
1 // Machine
2 // PFXFile
3 // PFXBlob
4 // JKSFile
5 // JKSBlob
6 // PEMKeyFile
7 // PEMKeyBlob
8 // PublicKeyFile
9 // PublicKeyBlob
10 // SSHPublicKeyBlob
11 // P7BFile
12 // P7BBlob
13 // SSHPublicKeyFile
14 // PPKFile
15 // PPKBlob
16 // XMLFile
17 // XMLBlob
18 // JWKFile
19 // JWKBlob
20 // SecurityKey
21 // BCFKSFile
22 // BCFKSBlob
23 // PKCS11
99 // Auto

Default Value

0

Remarks

The struct supports both public and private keys in a variety of formats. When the cstAuto value is used, the struct will automatically determine the type. This property can take one of the following values:

0 (cstUser - default)For Windows, this specifies that the certificate store is a certificate store owned by the current user.

NOTE: This store type is not available in Java.

1 (cstMachine)For Windows, this specifies that the certificate store is a machine store.

NOTE: This store type is not available in Java.

2 (cstPFXFile)The certificate store is the name of a PFX (PKCS#12) file containing certificates.
3 (cstPFXBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in PFX (PKCS#12) format.
4 (cstJKSFile)The certificate store is the name of a Java Key Store (JKS) file containing certificates.

NOTE: This store type is only available in Java.

5 (cstJKSBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in Java Key Store (JKS) format.

NOTE: This store type is only available in Java.

6 (cstPEMKeyFile)The certificate store is the name of a PEM-encoded file that contains a private key and an optional certificate.
7 (cstPEMKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains a private key and an optional certificate.
8 (cstPublicKeyFile)The certificate store is the name of a file that contains a PEM- or DER-encoded public key certificate.
9 (cstPublicKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains a PEM- or DER-encoded public key certificate.
10 (cstSSHPublicKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains an SSH-style public key.
11 (cstP7BFile)The certificate store is the name of a PKCS#7 file containing certificates.
12 (cstP7BBlob)The certificate store is a string (binary) representing a certificate store in PKCS#7 format.
13 (cstSSHPublicKeyFile)The certificate store is the name of a file that contains an SSH-style public key.
14 (cstPPKFile)The certificate store is the name of a file that contains a PPK (PuTTY Private Key).
15 (cstPPKBlob)The certificate store is a string (binary) that contains a PPK (PuTTY Private Key).
16 (cstXMLFile)The certificate store is the name of a file that contains a certificate in XML format.
17 (cstXMLBlob)The certificate store is a string that contains a certificate in XML format.
18 (cstJWKFile)The certificate store is the name of a file that contains a JWK (JSON Web Key).
19 (cstJWKBlob)The certificate store is a string that contains a JWK (JSON Web Key).
21 (cstBCFKSFile)The certificate store is the name of a file that contains a BCFKS (Bouncy Castle FIPS Key Store).

NOTE: This store type is only available in Java and .NET.

22 (cstBCFKSBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in BCFKS (Bouncy Castle FIPS Key Store) format.

NOTE: This store type is only available in Java and .NET.

23 (cstPKCS11)The certificate is present on a physical security key accessible via a PKCS#11 interface.

To use a security key, create a new Certificate object and pass cstPKCS11 as the ssl_accept_server_cert_store_type, the full path of the PKCS#11 DLL as the ssl_accept_server_cert_store, and the PIN as the ssl_accept_server_cert_store_password.

Code Example. SSH Authentication with Security Key (without CertMgr): sftp.SSHCert = new Certificate(CertStoreTypes.cstPKCS11, @"C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll", "123456", // PIN "CN=cert_subject"); sftp.SSHUser = "test"; sftp.SSHLogon("myhost", 22);

Alternatively, collect the necessary data using the CertMgr struct by calling the list_store_certificates method after setting the corresponding properties accordingly. The certificate information returned in the on_cert_list event's CertEncoded parameter may be saved for later use.

When using a certificate obtained with this approach, pass the previously saved security key information as the ssl_accept_server_cert_store and set ssl_accept_server_cert_store_password to the PIN.

Code Example. SSH Authentication with Security Key (with CertMgr): certmgr.CertStoreType = CertStoreTypes.cstPKCS11; certmgr.OnCertList += (s, e) => { secKeyBlob = e.CertEncoded; }; certmgr.CertStore = @"C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll"; certmgr.CertStorePassword = "123456"; // PIN certmgr.ListStoreCertificates(); sftp.SSHCert = new Certificate(CertStoreTypes.cstPKCS11, secKeyBlob, "123456", "*"); sftp.SSHUser = "test"; sftp.SSHLogon("myhost", 22);

99 (cstAuto)The store type is automatically detected from the input data. This setting may be used with both public and private keys and can detect any of the supported formats automatically.

Data Type

i32

ssl_accept_server_cert_subject_alt_names property (GISBSender Struct)

Comma-separated lists of alternative subject names for the certificate.

Syntax

fn ssl_accept_server_cert_subject_alt_names(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

Comma-separated lists of alternative subject names for the certificate.

This property is read-only.

Data Type

String

ssl_accept_server_cert_thumbprint_md5 property (GISBSender Struct)

The MD5 hash of the certificate.

Syntax

fn ssl_accept_server_cert_thumbprint_md5(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The MD5 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.

This property is read-only.

Data Type

String

ssl_accept_server_cert_thumbprint_sha1 property (GISBSender Struct)

The SHA-1 hash of the certificate.

Syntax

fn ssl_accept_server_cert_thumbprint_sha1(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The SHA-1 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.

This property is read-only.

Data Type

String

ssl_accept_server_cert_thumbprint_sha256 property (GISBSender Struct)

The SHA-256 hash of the certificate.

Syntax

fn ssl_accept_server_cert_thumbprint_sha256(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The SHA-256 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.

This property is read-only.

Data Type

String

ssl_accept_server_cert_usage property (GISBSender Struct)

The text description of UsageFlags .

Syntax

fn ssl_accept_server_cert_usage(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

This value will be one or more of the following strings and will be separated by commas:

  • Digital Signature
  • Non-Repudiation
  • Key Encipherment
  • Data Encipherment
  • Key Agreement
  • Certificate Signing
  • CRL Signing
  • Encipher Only

If the provider is OpenSSL, the value is a comma-separated list of X.509 certificate extension names.

This property is read-only.

Data Type

String

ssl_accept_server_cert_usage_flags property (GISBSender Struct)

The flags that show intended use for the certificate.

Syntax

fn ssl_accept_server_cert_usage_flags(&self) -> Result<i32, IPWorksEDIError> 

Default Value

0

Remarks

The flags that show intended use for the certificate. The value of ssl_accept_server_cert_usage_flags is a combination of the following flags:

0x80Digital Signature
0x40Non-Repudiation
0x20Key Encipherment
0x10Data Encipherment
0x08Key Agreement
0x04Certificate Signing
0x02CRL Signing
0x01Encipher Only

Please see the ssl_accept_server_cert_usage property for a text representation of ssl_accept_server_cert_usage_flags.

This functionality currently is not available when the provider is OpenSSL.

This property is read-only.

Data Type

i32

ssl_accept_server_cert_version property (GISBSender Struct)

The certificate's version number.

Syntax

fn ssl_accept_server_cert_version(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The certificate's version number. The possible values are the strings "V1", "V2", and "V3".

This property is read-only.

Data Type

String

ssl_accept_server_cert_subject property (GISBSender Struct)

The subject of the certificate used for client authentication.

Syntax

fn ssl_accept_server_cert_subject(&self) -> Result<String, IPWorksEDIError> 
fn set_ssl_accept_server_cert_subject(&self, value : &str) -> Option<IPWorksEDIError> fn set_ssl_accept_server_cert_subject_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property must be set after all other certificate properties are set. When this property is set, a search is performed in the current certificate store to locate a certificate with a matching subject.

If a matching certificate is found, the property is set to the full subject of the matching certificate.

If an exact match is not found, the store is searched for subjects containing the value of the property.

If a match is still not found, the property is set to an empty string, and no certificate is selected.

The special value "*" picks a random certificate in the certificate store.

The certificate subject is a comma-separated list of distinguished name fields and values. For instance, "CN=www.server.com, OU=test, C=US, E=example@email.com". Common fields and their meanings are as follows:

FieldMeaning
CNCommon Name. This is commonly a hostname like www.server.com.
OOrganization
OUOrganizational Unit
LLocality
SState
CCountry
EEmail Address

If a field value contains a comma, it must be quoted.

Data Type

String

ssl_accept_server_cert_encoded property (GISBSender Struct)

The certificate (PEM/Base64 encoded).

Syntax

fn ssl_accept_server_cert_encoded(&self) -> Result<Vec<u8>, IPWorksEDIError> 
fn set_ssl_accept_server_cert_encoded(&self, value : Vec<u8>) -> Option<IPWorksEDIError> fn set_ssl_accept_server_cert_encoded_ref(&self, value : &[u8]) -> Option<IPWorksEDIError>

Default Value

""

Remarks

The certificate (PEM/Base64 encoded). This property is used to assign a specific certificate. The ssl_accept_server_cert_store and ssl_accept_server_cert_subject properties also may be used to specify a certificate.

When ssl_accept_server_cert_encoded is set, a search is initiated in the current ssl_accept_server_cert_store for the private key of the certificate. If the key is found, ssl_accept_server_cert_subject is updated to reflect the full subject of the selected certificate; otherwise, ssl_accept_server_cert_subject is set to an empty string.

Data Type

Vec<u8>

ssl_cert_effective_date property (GISBSender Struct)

The date on which this certificate becomes valid.

Syntax

fn ssl_cert_effective_date(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The date on which this certificate becomes valid. Before this date, it is not valid. The date is localized to the system's time zone. The following example illustrates the format of an encoded date:

23-Jan-2000 15:00:00.

This property is read-only.

Data Type

String

ssl_cert_expiration_date property (GISBSender Struct)

The date on which the certificate expires.

Syntax

fn ssl_cert_expiration_date(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The date on which the certificate expires. After this date, the certificate will no longer be valid. The date is localized to the system's time zone. The following example illustrates the format of an encoded date:

23-Jan-2001 15:00:00.

This property is read-only.

Data Type

String

ssl_cert_extended_key_usage property (GISBSender Struct)

A comma-delimited list of extended key usage identifiers.

Syntax

fn ssl_cert_extended_key_usage(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

A comma-delimited list of extended key usage identifiers. These are the same as ASN.1 object identifiers (OIDs).

This property is read-only.

Data Type

String

ssl_cert_fingerprint property (GISBSender Struct)

The hex-encoded, 16-byte MD5 fingerprint of the certificate.

Syntax

fn ssl_cert_fingerprint(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The hex-encoded, 16-byte MD5 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.

The following example illustrates the format: bc:2a:72:af:fe:58:17:43:7a:5f:ba:5a:7c:90:f7:02

This property is read-only.

Data Type

String

ssl_cert_fingerprint_sha1 property (GISBSender Struct)

The hex-encoded, 20-byte SHA-1 fingerprint of the certificate.

Syntax

fn ssl_cert_fingerprint_sha1(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The hex-encoded, 20-byte SHA-1 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.

The following example illustrates the format: 30:7b:fa:38:65:83:ff:da:b4:4e:07:3f:17:b8:a4:ed:80:be:ff:84

This property is read-only.

Data Type

String

ssl_cert_fingerprint_sha256 property (GISBSender Struct)

The hex-encoded, 32-byte SHA-256 fingerprint of the certificate.

Syntax

fn ssl_cert_fingerprint_sha256(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The hex-encoded, 32-byte SHA-256 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.

The following example illustrates the format: 6a:80:5c:33:a9:43:ea:b0:96:12:8a:64:96:30:ef:4a:8a:96:86:ce:f4:c7:be:10:24:8e:2b:60:9e:f3:59:53

This property is read-only.

Data Type

String

ssl_cert_issuer property (GISBSender Struct)

The issuer of the certificate.

Syntax

fn ssl_cert_issuer(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The issuer of the certificate. This property contains a string representation of the name of the issuing authority for the certificate.

This property is read-only.

Data Type

String

ssl_cert_private_key property (GISBSender Struct)

The private key of the certificate (if available).

Syntax

fn ssl_cert_private_key(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The private key of the certificate (if available). The key is provided as PEM/Base64-encoded data.

NOTE: The ssl_cert_private_key may be available but not exportable. In this case, ssl_cert_private_key returns an empty string.

This property is read-only.

Data Type

String

ssl_cert_private_key_available property (GISBSender Struct)

Whether a PrivateKey is available for the selected certificate.

Syntax

fn ssl_cert_private_key_available(&self) -> Result<bool, IPWorksEDIError> 

Default Value

false

Remarks

Whether a ssl_cert_private_key is available for the selected certificate. If ssl_cert_private_key_available is True, the certificate may be used for authentication purposes (e.g., server authentication).

This property is read-only.

Data Type

bool

ssl_cert_private_key_container property (GISBSender Struct)

The name of the PrivateKey container for the certificate (if available).

Syntax

fn ssl_cert_private_key_container(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The name of the ssl_cert_private_key container for the certificate (if available). This functionality is available only on Windows platforms.

This property is read-only.

Data Type

String

ssl_cert_public_key property (GISBSender Struct)

The public key of the certificate.

Syntax

fn ssl_cert_public_key(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The public key of the certificate. The key is provided as PEM/Base64-encoded data.

This property is read-only.

Data Type

String

ssl_cert_public_key_algorithm property (GISBSender Struct)

The textual description of the certificate's public key algorithm.

Syntax

fn ssl_cert_public_key_algorithm(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The textual description of the certificate's public key algorithm. The property contains either the name of the algorithm (e.g., "RSA" or "RSA_DH") or an object identifier (OID) string representing the algorithm.

This property is read-only.

Data Type

String

ssl_cert_public_key_length property (GISBSender Struct)

The length of the certificate's public key (in bits).

Syntax

fn ssl_cert_public_key_length(&self) -> Result<i32, IPWorksEDIError> 

Default Value

0

Remarks

The length of the certificate's public key (in bits). Common values are 512, 1024, and 2048.

This property is read-only.

Data Type

i32

ssl_cert_serial_number property (GISBSender Struct)

The serial number of the certificate encoded as a string.

Syntax

fn ssl_cert_serial_number(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The serial number of the certificate encoded as a string. The number is encoded as a series of hexadecimal digits, with each pair representing a byte of the serial number.

This property is read-only.

Data Type

String

ssl_cert_signature_algorithm property (GISBSender Struct)

The text description of the certificate's signature algorithm.

Syntax

fn ssl_cert_signature_algorithm(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The text description of the certificate's signature algorithm. The property contains either the name of the algorithm (e.g., "RSA" or "RSA_MD5RSA") or an object identifier (OID) string representing the algorithm.

This property is read-only.

Data Type

String

ssl_cert_store property (GISBSender Struct)

The name of the certificate store for the client certificate.

Syntax

fn ssl_cert_store(&self) -> Result<Vec<u8>, IPWorksEDIError> 
fn set_ssl_cert_store(&self, value : Vec<u8>) -> Option<IPWorksEDIError> fn set_ssl_cert_store_ref(&self, value : &[u8]) -> Option<IPWorksEDIError>

Default Value

"MY"

Remarks

The ssl_cert_store_type property denotes the type of the certificate store specified by ssl_cert_store. If the store is password-protected, specify the password in ssl_cert_store_password.

ssl_cert_store is used in conjunction with the ssl_cert_subject property to specify client certificates. If ssl_cert_store has a value, and ssl_cert_subject or ssl_cert_encoded is set, a search for a certificate is initiated. Please see the ssl_cert_subject property for details.

Designations of certificate stores are platform dependent.

The following designations are the most common User and Machine certificate stores in Windows:

MYA certificate store holding personal certificates with their associated private keys.
CACertifying authority certificates.
ROOTRoot certificates.

When the certificate store type is cstPFXFile, this property must be set to the name of the file. When the type is cstPFXBlob, the property must be set to the binary contents of a PFX file (i.e., PKCS#12 certificate store).

Data Type

Vec<u8>

ssl_cert_store_password property (GISBSender Struct)

If the type of certificate store requires a password, this property is used to specify the password needed to open the certificate store.

Syntax

fn ssl_cert_store_password(&self) -> Result<String, IPWorksEDIError> 
fn set_ssl_cert_store_password(&self, value : &str) -> Option<IPWorksEDIError> fn set_ssl_cert_store_password_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

If the type of certificate store requires a password, this property is used to specify the password needed to open the certificate store.

Data Type

String

ssl_cert_store_type property (GISBSender Struct)

The type of certificate store for this certificate.

Syntax

fn ssl_cert_store_type(&self) -> Result<i32, IPWorksEDIError> 
fn set_ssl_cert_store_type(&self, value : i32) -> Option<IPWorksEDIError>

Possible Values

0   // User
1 // Machine
2 // PFXFile
3 // PFXBlob
4 // JKSFile
5 // JKSBlob
6 // PEMKeyFile
7 // PEMKeyBlob
8 // PublicKeyFile
9 // PublicKeyBlob
10 // SSHPublicKeyBlob
11 // P7BFile
12 // P7BBlob
13 // SSHPublicKeyFile
14 // PPKFile
15 // PPKBlob
16 // XMLFile
17 // XMLBlob
18 // JWKFile
19 // JWKBlob
20 // SecurityKey
21 // BCFKSFile
22 // BCFKSBlob
23 // PKCS11
99 // Auto

Default Value

0

Remarks

The struct supports both public and private keys in a variety of formats. When the cstAuto value is used, the struct will automatically determine the type. This property can take one of the following values:

0 (cstUser - default)For Windows, this specifies that the certificate store is a certificate store owned by the current user.

NOTE: This store type is not available in Java.

1 (cstMachine)For Windows, this specifies that the certificate store is a machine store.

NOTE: This store type is not available in Java.

2 (cstPFXFile)The certificate store is the name of a PFX (PKCS#12) file containing certificates.
3 (cstPFXBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in PFX (PKCS#12) format.
4 (cstJKSFile)The certificate store is the name of a Java Key Store (JKS) file containing certificates.

NOTE: This store type is only available in Java.

5 (cstJKSBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in Java Key Store (JKS) format.

NOTE: This store type is only available in Java.

6 (cstPEMKeyFile)The certificate store is the name of a PEM-encoded file that contains a private key and an optional certificate.
7 (cstPEMKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains a private key and an optional certificate.
8 (cstPublicKeyFile)The certificate store is the name of a file that contains a PEM- or DER-encoded public key certificate.
9 (cstPublicKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains a PEM- or DER-encoded public key certificate.
10 (cstSSHPublicKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains an SSH-style public key.
11 (cstP7BFile)The certificate store is the name of a PKCS#7 file containing certificates.
12 (cstP7BBlob)The certificate store is a string (binary) representing a certificate store in PKCS#7 format.
13 (cstSSHPublicKeyFile)The certificate store is the name of a file that contains an SSH-style public key.
14 (cstPPKFile)The certificate store is the name of a file that contains a PPK (PuTTY Private Key).
15 (cstPPKBlob)The certificate store is a string (binary) that contains a PPK (PuTTY Private Key).
16 (cstXMLFile)The certificate store is the name of a file that contains a certificate in XML format.
17 (cstXMLBlob)The certificate store is a string that contains a certificate in XML format.
18 (cstJWKFile)The certificate store is the name of a file that contains a JWK (JSON Web Key).
19 (cstJWKBlob)The certificate store is a string that contains a JWK (JSON Web Key).
21 (cstBCFKSFile)The certificate store is the name of a file that contains a BCFKS (Bouncy Castle FIPS Key Store).

NOTE: This store type is only available in Java and .NET.

22 (cstBCFKSBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in BCFKS (Bouncy Castle FIPS Key Store) format.

NOTE: This store type is only available in Java and .NET.

23 (cstPKCS11)The certificate is present on a physical security key accessible via a PKCS#11 interface.

To use a security key, create a new Certificate object and pass cstPKCS11 as the ssl_cert_store_type, the full path of the PKCS#11 DLL as the ssl_cert_store, and the PIN as the ssl_cert_store_password.

Code Example. SSH Authentication with Security Key (without CertMgr): sftp.SSHCert = new Certificate(CertStoreTypes.cstPKCS11, @"C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll", "123456", // PIN "CN=cert_subject"); sftp.SSHUser = "test"; sftp.SSHLogon("myhost", 22);

Alternatively, collect the necessary data using the CertMgr struct by calling the list_store_certificates method after setting the corresponding properties accordingly. The certificate information returned in the on_cert_list event's CertEncoded parameter may be saved for later use.

When using a certificate obtained with this approach, pass the previously saved security key information as the ssl_cert_store and set ssl_cert_store_password to the PIN.

Code Example. SSH Authentication with Security Key (with CertMgr): certmgr.CertStoreType = CertStoreTypes.cstPKCS11; certmgr.OnCertList += (s, e) => { secKeyBlob = e.CertEncoded; }; certmgr.CertStore = @"C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll"; certmgr.CertStorePassword = "123456"; // PIN certmgr.ListStoreCertificates(); sftp.SSHCert = new Certificate(CertStoreTypes.cstPKCS11, secKeyBlob, "123456", "*"); sftp.SSHUser = "test"; sftp.SSHLogon("myhost", 22);

99 (cstAuto)The store type is automatically detected from the input data. This setting may be used with both public and private keys and can detect any of the supported formats automatically.

Data Type

i32

ssl_cert_subject_alt_names property (GISBSender Struct)

Comma-separated lists of alternative subject names for the certificate.

Syntax

fn ssl_cert_subject_alt_names(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

Comma-separated lists of alternative subject names for the certificate.

This property is read-only.

Data Type

String

ssl_cert_thumbprint_md5 property (GISBSender Struct)

The MD5 hash of the certificate.

Syntax

fn ssl_cert_thumbprint_md5(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The MD5 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.

This property is read-only.

Data Type

String

ssl_cert_thumbprint_sha1 property (GISBSender Struct)

The SHA-1 hash of the certificate.

Syntax

fn ssl_cert_thumbprint_sha1(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The SHA-1 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.

This property is read-only.

Data Type

String

ssl_cert_thumbprint_sha256 property (GISBSender Struct)

The SHA-256 hash of the certificate.

Syntax

fn ssl_cert_thumbprint_sha256(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The SHA-256 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.

This property is read-only.

Data Type

String

ssl_cert_usage property (GISBSender Struct)

The text description of UsageFlags .

Syntax

fn ssl_cert_usage(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

This value will be one or more of the following strings and will be separated by commas:

  • Digital Signature
  • Non-Repudiation
  • Key Encipherment
  • Data Encipherment
  • Key Agreement
  • Certificate Signing
  • CRL Signing
  • Encipher Only

If the provider is OpenSSL, the value is a comma-separated list of X.509 certificate extension names.

This property is read-only.

Data Type

String

ssl_cert_usage_flags property (GISBSender Struct)

The flags that show intended use for the certificate.

Syntax

fn ssl_cert_usage_flags(&self) -> Result<i32, IPWorksEDIError> 

Default Value

0

Remarks

The flags that show intended use for the certificate. The value of ssl_cert_usage_flags is a combination of the following flags:

0x80Digital Signature
0x40Non-Repudiation
0x20Key Encipherment
0x10Data Encipherment
0x08Key Agreement
0x04Certificate Signing
0x02CRL Signing
0x01Encipher Only

Please see the ssl_cert_usage property for a text representation of ssl_cert_usage_flags.

This functionality currently is not available when the provider is OpenSSL.

This property is read-only.

Data Type

i32

ssl_cert_version property (GISBSender Struct)

The certificate's version number.

Syntax

fn ssl_cert_version(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The certificate's version number. The possible values are the strings "V1", "V2", and "V3".

This property is read-only.

Data Type

String

ssl_cert_subject property (GISBSender Struct)

The subject of the certificate used for client authentication.

Syntax

fn ssl_cert_subject(&self) -> Result<String, IPWorksEDIError> 
fn set_ssl_cert_subject(&self, value : &str) -> Option<IPWorksEDIError> fn set_ssl_cert_subject_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property must be set after all other certificate properties are set. When this property is set, a search is performed in the current certificate store to locate a certificate with a matching subject.

If a matching certificate is found, the property is set to the full subject of the matching certificate.

If an exact match is not found, the store is searched for subjects containing the value of the property.

If a match is still not found, the property is set to an empty string, and no certificate is selected.

The special value "*" picks a random certificate in the certificate store.

The certificate subject is a comma-separated list of distinguished name fields and values. For instance, "CN=www.server.com, OU=test, C=US, E=example@email.com". Common fields and their meanings are as follows:

FieldMeaning
CNCommon Name. This is commonly a hostname like www.server.com.
OOrganization
OUOrganizational Unit
LLocality
SState
CCountry
EEmail Address

If a field value contains a comma, it must be quoted.

Data Type

String

ssl_cert_encoded property (GISBSender Struct)

The certificate (PEM/Base64 encoded).

Syntax

fn ssl_cert_encoded(&self) -> Result<Vec<u8>, IPWorksEDIError> 
fn set_ssl_cert_encoded(&self, value : Vec<u8>) -> Option<IPWorksEDIError> fn set_ssl_cert_encoded_ref(&self, value : &[u8]) -> Option<IPWorksEDIError>

Default Value

""

Remarks

The certificate (PEM/Base64 encoded). This property is used to assign a specific certificate. The ssl_cert_store and ssl_cert_subject properties also may be used to specify a certificate.

When ssl_cert_encoded is set, a search is initiated in the current ssl_cert_store for the private key of the certificate. If the key is found, ssl_cert_subject is updated to reflect the full subject of the selected certificate; otherwise, ssl_cert_subject is set to an empty string.

Data Type

Vec<u8>

ssl_provider property (GISBSender Struct)

The Secure Sockets Layer/Transport Layer Security (SSL/TLS) implementation to use.

Syntax

fn ssl_provider(&self) -> Result<i32, IPWorksEDIError> 
fn set_ssl_provider(&self, value : i32) -> Option<IPWorksEDIError>

Possible Values

0   // Automatic
1 // Platform
2 // Internal

Default Value

0

Remarks

This property specifies the SSL/TLS implementation to use. In most cases the default value of 0 (Automatic) is recommended and should not be changed. When set to 0 (Automatic), the struct will select whether to use the platform implementation or the internal implementation depending on the operating system as well as the TLS version being used.

Possible values are as follows:

0 (sslpAutomatic - default)Automatically selects the appropriate implementation.
1 (sslpPlatform) Uses the platform/system implementation.
2 (sslpInternal) Uses the internal implementation.
Additional Notes

In most cases using the default value (Automatic) is recommended. The struct will select a provider depending on the current platform.

When Automatic is selected, on Windows, the struct will use the platform implementation. On Linux/macOS, the struct will use the internal implementation. When TLS 1.3 is enabled via SSLEnabledProtocols, the struct will always try and use the platform implementation. If the platform TLS 1.3 implementation is not available, the internal implementation will be used.

Data Type

i32

ssl_server_cert_effective_date property (GISBSender Struct)

The date on which this certificate becomes valid.

Syntax

fn ssl_server_cert_effective_date(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The date on which this certificate becomes valid. Before this date, it is not valid. The date is localized to the system's time zone. The following example illustrates the format of an encoded date:

23-Jan-2000 15:00:00.

This property is read-only.

Data Type

String

ssl_server_cert_expiration_date property (GISBSender Struct)

The date on which the certificate expires.

Syntax

fn ssl_server_cert_expiration_date(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The date on which the certificate expires. After this date, the certificate will no longer be valid. The date is localized to the system's time zone. The following example illustrates the format of an encoded date:

23-Jan-2001 15:00:00.

This property is read-only.

Data Type

String

ssl_server_cert_extended_key_usage property (GISBSender Struct)

A comma-delimited list of extended key usage identifiers.

Syntax

fn ssl_server_cert_extended_key_usage(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

A comma-delimited list of extended key usage identifiers. These are the same as ASN.1 object identifiers (OIDs).

This property is read-only.

Data Type

String

ssl_server_cert_fingerprint property (GISBSender Struct)

The hex-encoded, 16-byte MD5 fingerprint of the certificate.

Syntax

fn ssl_server_cert_fingerprint(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The hex-encoded, 16-byte MD5 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.

The following example illustrates the format: bc:2a:72:af:fe:58:17:43:7a:5f:ba:5a:7c:90:f7:02

This property is read-only.

Data Type

String

ssl_server_cert_fingerprint_sha1 property (GISBSender Struct)

The hex-encoded, 20-byte SHA-1 fingerprint of the certificate.

Syntax

fn ssl_server_cert_fingerprint_sha1(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The hex-encoded, 20-byte SHA-1 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.

The following example illustrates the format: 30:7b:fa:38:65:83:ff:da:b4:4e:07:3f:17:b8:a4:ed:80:be:ff:84

This property is read-only.

Data Type

String

ssl_server_cert_fingerprint_sha256 property (GISBSender Struct)

The hex-encoded, 32-byte SHA-256 fingerprint of the certificate.

Syntax

fn ssl_server_cert_fingerprint_sha256(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The hex-encoded, 32-byte SHA-256 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.

The following example illustrates the format: 6a:80:5c:33:a9:43:ea:b0:96:12:8a:64:96:30:ef:4a:8a:96:86:ce:f4:c7:be:10:24:8e:2b:60:9e:f3:59:53

This property is read-only.

Data Type

String

ssl_server_cert_issuer property (GISBSender Struct)

The issuer of the certificate.

Syntax

fn ssl_server_cert_issuer(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The issuer of the certificate. This property contains a string representation of the name of the issuing authority for the certificate.

This property is read-only.

Data Type

String

ssl_server_cert_private_key property (GISBSender Struct)

The private key of the certificate (if available).

Syntax

fn ssl_server_cert_private_key(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The private key of the certificate (if available). The key is provided as PEM/Base64-encoded data.

NOTE: The ssl_server_cert_private_key may be available but not exportable. In this case, ssl_server_cert_private_key returns an empty string.

This property is read-only.

Data Type

String

ssl_server_cert_private_key_available property (GISBSender Struct)

Whether a PrivateKey is available for the selected certificate.

Syntax

fn ssl_server_cert_private_key_available(&self) -> Result<bool, IPWorksEDIError> 

Default Value

false

Remarks

Whether a ssl_server_cert_private_key is available for the selected certificate. If ssl_server_cert_private_key_available is True, the certificate may be used for authentication purposes (e.g., server authentication).

This property is read-only.

Data Type

bool

ssl_server_cert_private_key_container property (GISBSender Struct)

The name of the PrivateKey container for the certificate (if available).

Syntax

fn ssl_server_cert_private_key_container(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The name of the ssl_server_cert_private_key container for the certificate (if available). This functionality is available only on Windows platforms.

This property is read-only.

Data Type

String

ssl_server_cert_public_key property (GISBSender Struct)

The public key of the certificate.

Syntax

fn ssl_server_cert_public_key(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The public key of the certificate. The key is provided as PEM/Base64-encoded data.

This property is read-only.

Data Type

String

ssl_server_cert_public_key_algorithm property (GISBSender Struct)

The textual description of the certificate's public key algorithm.

Syntax

fn ssl_server_cert_public_key_algorithm(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The textual description of the certificate's public key algorithm. The property contains either the name of the algorithm (e.g., "RSA" or "RSA_DH") or an object identifier (OID) string representing the algorithm.

This property is read-only.

Data Type

String

ssl_server_cert_public_key_length property (GISBSender Struct)

The length of the certificate's public key (in bits).

Syntax

fn ssl_server_cert_public_key_length(&self) -> Result<i32, IPWorksEDIError> 

Default Value

0

Remarks

The length of the certificate's public key (in bits). Common values are 512, 1024, and 2048.

This property is read-only.

Data Type

i32

ssl_server_cert_serial_number property (GISBSender Struct)

The serial number of the certificate encoded as a string.

Syntax

fn ssl_server_cert_serial_number(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The serial number of the certificate encoded as a string. The number is encoded as a series of hexadecimal digits, with each pair representing a byte of the serial number.

This property is read-only.

Data Type

String

ssl_server_cert_signature_algorithm property (GISBSender Struct)

The text description of the certificate's signature algorithm.

Syntax

fn ssl_server_cert_signature_algorithm(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The text description of the certificate's signature algorithm. The property contains either the name of the algorithm (e.g., "RSA" or "RSA_MD5RSA") or an object identifier (OID) string representing the algorithm.

This property is read-only.

Data Type

String

ssl_server_cert_store property (GISBSender Struct)

The name of the certificate store for the client certificate.

Syntax

fn ssl_server_cert_store(&self) -> Result<Vec<u8>, IPWorksEDIError> 

Default Value

"MY"

Remarks

The ssl_server_cert_store_type property denotes the type of the certificate store specified by ssl_server_cert_store. If the store is password-protected, specify the password in ssl_server_cert_store_password.

ssl_server_cert_store is used in conjunction with the ssl_server_cert_subject property to specify client certificates. If ssl_server_cert_store has a value, and ssl_server_cert_subject or ssl_server_cert_encoded is set, a search for a certificate is initiated. Please see the ssl_server_cert_subject property for details.

Designations of certificate stores are platform dependent.

The following designations are the most common User and Machine certificate stores in Windows:

MYA certificate store holding personal certificates with their associated private keys.
CACertifying authority certificates.
ROOTRoot certificates.

When the certificate store type is cstPFXFile, this property must be set to the name of the file. When the type is cstPFXBlob, the property must be set to the binary contents of a PFX file (i.e., PKCS#12 certificate store).

This property is read-only.

Data Type

Vec<u8>

ssl_server_cert_store_password property (GISBSender Struct)

If the type of certificate store requires a password, this property is used to specify the password needed to open the certificate store.

Syntax

fn ssl_server_cert_store_password(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

If the type of certificate store requires a password, this property is used to specify the password needed to open the certificate store.

This property is read-only.

Data Type

String

ssl_server_cert_store_type property (GISBSender Struct)

The type of certificate store for this certificate.

Syntax

fn ssl_server_cert_store_type(&self) -> Result<i32, IPWorksEDIError> 

Possible Values

0   // User
1 // Machine
2 // PFXFile
3 // PFXBlob
4 // JKSFile
5 // JKSBlob
6 // PEMKeyFile
7 // PEMKeyBlob
8 // PublicKeyFile
9 // PublicKeyBlob
10 // SSHPublicKeyBlob
11 // P7BFile
12 // P7BBlob
13 // SSHPublicKeyFile
14 // PPKFile
15 // PPKBlob
16 // XMLFile
17 // XMLBlob
18 // JWKFile
19 // JWKBlob
20 // SecurityKey
21 // BCFKSFile
22 // BCFKSBlob
23 // PKCS11
99 // Auto

Default Value

0

Remarks

The struct supports both public and private keys in a variety of formats. When the cstAuto value is used, the struct will automatically determine the type. This property can take one of the following values:

0 (cstUser - default)For Windows, this specifies that the certificate store is a certificate store owned by the current user.

NOTE: This store type is not available in Java.

1 (cstMachine)For Windows, this specifies that the certificate store is a machine store.

NOTE: This store type is not available in Java.

2 (cstPFXFile)The certificate store is the name of a PFX (PKCS#12) file containing certificates.
3 (cstPFXBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in PFX (PKCS#12) format.
4 (cstJKSFile)The certificate store is the name of a Java Key Store (JKS) file containing certificates.

NOTE: This store type is only available in Java.

5 (cstJKSBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in Java Key Store (JKS) format.

NOTE: This store type is only available in Java.

6 (cstPEMKeyFile)The certificate store is the name of a PEM-encoded file that contains a private key and an optional certificate.
7 (cstPEMKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains a private key and an optional certificate.
8 (cstPublicKeyFile)The certificate store is the name of a file that contains a PEM- or DER-encoded public key certificate.
9 (cstPublicKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains a PEM- or DER-encoded public key certificate.
10 (cstSSHPublicKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains an SSH-style public key.
11 (cstP7BFile)The certificate store is the name of a PKCS#7 file containing certificates.
12 (cstP7BBlob)The certificate store is a string (binary) representing a certificate store in PKCS#7 format.
13 (cstSSHPublicKeyFile)The certificate store is the name of a file that contains an SSH-style public key.
14 (cstPPKFile)The certificate store is the name of a file that contains a PPK (PuTTY Private Key).
15 (cstPPKBlob)The certificate store is a string (binary) that contains a PPK (PuTTY Private Key).
16 (cstXMLFile)The certificate store is the name of a file that contains a certificate in XML format.
17 (cstXMLBlob)The certificate store is a string that contains a certificate in XML format.
18 (cstJWKFile)The certificate store is the name of a file that contains a JWK (JSON Web Key).
19 (cstJWKBlob)The certificate store is a string that contains a JWK (JSON Web Key).
21 (cstBCFKSFile)The certificate store is the name of a file that contains a BCFKS (Bouncy Castle FIPS Key Store).

NOTE: This store type is only available in Java and .NET.

22 (cstBCFKSBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in BCFKS (Bouncy Castle FIPS Key Store) format.

NOTE: This store type is only available in Java and .NET.

23 (cstPKCS11)The certificate is present on a physical security key accessible via a PKCS#11 interface.

To use a security key, create a new Certificate object and pass cstPKCS11 as the ssl_server_cert_store_type, the full path of the PKCS#11 DLL as the ssl_server_cert_store, and the PIN as the ssl_server_cert_store_password.

Code Example. SSH Authentication with Security Key (without CertMgr): sftp.SSHCert = new Certificate(CertStoreTypes.cstPKCS11, @"C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll", "123456", // PIN "CN=cert_subject"); sftp.SSHUser = "test"; sftp.SSHLogon("myhost", 22);

Alternatively, collect the necessary data using the CertMgr struct by calling the list_store_certificates method after setting the corresponding properties accordingly. The certificate information returned in the on_cert_list event's CertEncoded parameter may be saved for later use.

When using a certificate obtained with this approach, pass the previously saved security key information as the ssl_server_cert_store and set ssl_server_cert_store_password to the PIN.

Code Example. SSH Authentication with Security Key (with CertMgr): certmgr.CertStoreType = CertStoreTypes.cstPKCS11; certmgr.OnCertList += (s, e) => { secKeyBlob = e.CertEncoded; }; certmgr.CertStore = @"C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll"; certmgr.CertStorePassword = "123456"; // PIN certmgr.ListStoreCertificates(); sftp.SSHCert = new Certificate(CertStoreTypes.cstPKCS11, secKeyBlob, "123456", "*"); sftp.SSHUser = "test"; sftp.SSHLogon("myhost", 22);

99 (cstAuto)The store type is automatically detected from the input data. This setting may be used with both public and private keys and can detect any of the supported formats automatically.

This property is read-only.

Data Type

i32

ssl_server_cert_subject_alt_names property (GISBSender Struct)

Comma-separated lists of alternative subject names for the certificate.

Syntax

fn ssl_server_cert_subject_alt_names(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

Comma-separated lists of alternative subject names for the certificate.

This property is read-only.

Data Type

String

ssl_server_cert_thumbprint_md5 property (GISBSender Struct)

The MD5 hash of the certificate.

Syntax

fn ssl_server_cert_thumbprint_md5(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The MD5 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.

This property is read-only.

Data Type

String

ssl_server_cert_thumbprint_sha1 property (GISBSender Struct)

The SHA-1 hash of the certificate.

Syntax

fn ssl_server_cert_thumbprint_sha1(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The SHA-1 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.

This property is read-only.

Data Type

String

ssl_server_cert_thumbprint_sha256 property (GISBSender Struct)

The SHA-256 hash of the certificate.

Syntax

fn ssl_server_cert_thumbprint_sha256(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The SHA-256 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.

This property is read-only.

Data Type

String

ssl_server_cert_usage property (GISBSender Struct)

The text description of UsageFlags .

Syntax

fn ssl_server_cert_usage(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

This value will be one or more of the following strings and will be separated by commas:

  • Digital Signature
  • Non-Repudiation
  • Key Encipherment
  • Data Encipherment
  • Key Agreement
  • Certificate Signing
  • CRL Signing
  • Encipher Only

If the provider is OpenSSL, the value is a comma-separated list of X.509 certificate extension names.

This property is read-only.

Data Type

String

ssl_server_cert_usage_flags property (GISBSender Struct)

The flags that show intended use for the certificate.

Syntax

fn ssl_server_cert_usage_flags(&self) -> Result<i32, IPWorksEDIError> 

Default Value

0

Remarks

The flags that show intended use for the certificate. The value of ssl_server_cert_usage_flags is a combination of the following flags:

0x80Digital Signature
0x40Non-Repudiation
0x20Key Encipherment
0x10Data Encipherment
0x08Key Agreement
0x04Certificate Signing
0x02CRL Signing
0x01Encipher Only

Please see the ssl_server_cert_usage property for a text representation of ssl_server_cert_usage_flags.

This functionality currently is not available when the provider is OpenSSL.

This property is read-only.

Data Type

i32

ssl_server_cert_version property (GISBSender Struct)

The certificate's version number.

Syntax

fn ssl_server_cert_version(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

The certificate's version number. The possible values are the strings "V1", "V2", and "V3".

This property is read-only.

Data Type

String

ssl_server_cert_subject property (GISBSender Struct)

The subject of the certificate used for client authentication.

Syntax

fn ssl_server_cert_subject(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

This property must be set after all other certificate properties are set. When this property is set, a search is performed in the current certificate store to locate a certificate with a matching subject.

If a matching certificate is found, the property is set to the full subject of the matching certificate.

If an exact match is not found, the store is searched for subjects containing the value of the property.

If a match is still not found, the property is set to an empty string, and no certificate is selected.

The special value "*" picks a random certificate in the certificate store.

The certificate subject is a comma-separated list of distinguished name fields and values. For instance, "CN=www.server.com, OU=test, C=US, E=example@email.com". Common fields and their meanings are as follows:

FieldMeaning
CNCommon Name. This is commonly a hostname like www.server.com.
OOrganization
OUOrganizational Unit
LLocality
SState
CCountry
EEmail Address

If a field value contains a comma, it must be quoted.

This property is read-only.

Data Type

String

ssl_server_cert_encoded property (GISBSender Struct)

The certificate (PEM/Base64 encoded).

Syntax

fn ssl_server_cert_encoded(&self) -> Result<Vec<u8>, IPWorksEDIError> 

Default Value

""

Remarks

The certificate (PEM/Base64 encoded). This property is used to assign a specific certificate. The ssl_server_cert_store and ssl_server_cert_subject properties also may be used to specify a certificate.

When ssl_server_cert_encoded is set, a search is initiated in the current ssl_server_cert_store for the private key of the certificate. If the key is found, ssl_server_cert_subject is updated to reflect the full subject of the selected certificate; otherwise, ssl_server_cert_subject is set to an empty string.

This property is read-only.

Data Type

Vec<u8>

subject property (GISBSender Struct)

The subject of the message.

Syntax

fn subject(&self) -> Result<String, IPWorksEDIError> 
fn set_subject(&self, value : &str) -> Option<IPWorksEDIError> fn set_subject_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

The optional human-readable subject of the message.

Data Type

String

timeout property (GISBSender Struct)

The timeout for the struct.

Syntax

fn timeout(&self) -> Result<i32, IPWorksEDIError> 
fn set_timeout(&self, value : i32) -> Option<IPWorksEDIError>

Default Value

60

Remarks

If the timeout property is set to 0, all operations will run uninterrupted until successful completion or an error condition is encountered.

If timeout is set to a positive value, the struct will wait for the operation to complete before returning control.

The struct will use do_events to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not freeze and remains responsive.

If timeout expires, and the operation is not yet complete, the struct fails with an error.

NOTE: By default, all timeouts are inactivity timeouts, that is, the timeout period is extended by timeout seconds when any amount of data is successfully sent or received.

The default value for the timeout property is 60 seconds.

Data Type

i32

transaction_id property (GISBSender Struct)

The transaction ID of the message.

Syntax

fn transaction_id(&self) -> Result<String, IPWorksEDIError> 

Default Value

""

Remarks

A unique ID for the transaction. In GISB the transaction_id will be generated by the server, so this property will be populated whenever you receive a response from the server.

This property is read-only.

Data Type

String

url property (GISBSender Struct)

The URL to post to.

Syntax

fn url(&self) -> Result<String, IPWorksEDIError> 
fn set_url(&self, value : &str) -> Option<IPWorksEDIError> fn set_url_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

SSL will be used if and only if the URL scheme is "https". Note that generally signed, unencrypted messages would be sent using SSL, as encrypting the message would be redundant.

Data Type

String

user_agent property (GISBSender Struct)

Information about the user agent.

Syntax

fn user_agent(&self) -> Result<String, IPWorksEDIError> 
fn set_user_agent(&self, value : &str) -> Option<IPWorksEDIError> fn set_user_agent_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

"IPWorks EDI GISBSender Component - www.nsoftware.com"

Remarks

Override the default with the name and version of your software.

Data Type

String

config method (GISBSender Struct)

Sets or retrieves a configuration setting.

Syntax

fn config(&self, configuration_string : &str) -> Result<String, IPWorksEDIError>

Remarks

config is a generic method available in every struct. It is used to set and retrieve configuration settings for the struct.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the struct, access to these internal properties is provided through the config method.

To set a configuration setting named PROPERTY, you must call Config("PROPERTY=VALUE"), where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY"). The value will be returned as a string.

do_events method (GISBSender Struct)

This method processes events from the internal message queue.

Syntax

fn do_events(&self) -> Result<(), IPWorksEDIError>

Remarks

When do_events is called, the struct processes any available events. If no events are available, it waits for a preset period of time, and then returns.

post method (GISBSender Struct)

Post data to the server, and check the receipt.

Syntax

fn post(&self) -> Result<(), IPWorksEDIError>

Remarks

post will generate the request and post it to the server. The reply will be checked; if a receipt was requested it will be validated, and any response will be checked for error messages.

reset method (GISBSender Struct)

Resets the state of the control.

Syntax

fn reset(&self) -> Result<(), IPWorksEDIError>

Remarks

Resets all HTTP headers as well as edi_data, etc. After invoking this method the struct may be reused as if it were newly created.

set_pgp_param method (GISBSender Struct)

Sets a parameter in the PGP provider.

Syntax

fn set_pgp_param(&self, name : &str, value : &str) -> Result<(), IPWorksEDIError>

Remarks

Invoke set_pgp_param to set parameters of your PGP provider. Please refer to the documentation provided with the PGP provider for the parameters required.

The following table defines possible values that may be passed to the set_pgp_param.

homedirThe directory containing the public keyring, secret keyring and trust database. Please note this defaults to the application preferences directory of the user, hence if the GNUPG provider is being used from a ASP.NET application, homedir should be specified.
passphraseThe passphrase to access the secret keys in the secret-keyring.
useridThe identifier used to identify a secret key within the secret-keyring. Note: When decrypting if this value is not specified the struct will attempt to find the key within the keyring automatically based on information available in the PGP message itself.
recipient-useridThe identifier used to identify a public key within the public keyring. Note: When verifying a signature if this value is not specified the struct will attempt to find the key within the keyring automatically based on information available in the PGP message itself.
timeoutThe timeout in milliseconds that the provider will wait for a response from the OpenPGP executable. The default is 5000 (5 seconds).
usetempfileIf set to "true" the provider will write data to be processed to a temporary file on disk. This is useful when working with large files or binary files.
signingalgorithmThe signing algorithm to use when sign_data is True. Possible values are:
  • SHA1
  • MD5
  • SHA256 (default)
  • SHA384
  • SHA512
  • SHA224
  • RIPEMD160
encryptingalgorithmThe encrypting algorithm to use when encrypt_data is True. Possible values are:
  • CAST5
  • 3DES
  • AES256
  • AES192
  • AES128 (default)
  • BLOWFISH
  • TWOFISH
  • IDEA
compressionmethodThe compression method to use. Possible values are:
  • zip (default)
  • zlib
  • bzip2
  • none

on_connected event (GISBSender Struct)

Fired immediately after a connection completes (or fails).

Syntax

// GISBSenderConnectedEventArgs carries the GISBSender Connected event's parameters.
pub struct GISBSenderConnectedEventArgs {
  fn status_code(&self) -> i32
  fn description(&self) -> &String
}

// GISBSenderConnectedEvent defines the signature of the GISBSender Connected event's handler function.
pub trait GISBSenderConnectedEvent {
  fn on_connected(&self, sender : GISBSender, e : &mut GISBSenderConnectedEventArgs);
}

impl <'a> GISBSender<'a> {
  pub fn on_connected(&self) -> &'a dyn GISBSenderConnectedEvent;
  pub fn set_on_connected(&mut self, value : &'a dyn GISBSenderConnectedEvent);
  ...
}

Remarks

If the connection is made normally, status_code is 0 and description is "OK".

If the connection fails, status_code has the error code returned by the Transmission Control Protocol (TCP)/IP stack. description contains a description of this code. The value of status_code is equal to the value of the error.

Please refer to the Error Codes section for more information.

on_disconnected event (GISBSender Struct)

Fired when a connection is closed.

Syntax

// GISBSenderDisconnectedEventArgs carries the GISBSender Disconnected event's parameters.
pub struct GISBSenderDisconnectedEventArgs {
  fn status_code(&self) -> i32
  fn description(&self) -> &String
}

// GISBSenderDisconnectedEvent defines the signature of the GISBSender Disconnected event's handler function.
pub trait GISBSenderDisconnectedEvent {
  fn on_disconnected(&self, sender : GISBSender, e : &mut GISBSenderDisconnectedEventArgs);
}

impl <'a> GISBSender<'a> {
  pub fn on_disconnected(&self) -> &'a dyn GISBSenderDisconnectedEvent;
  pub fn set_on_disconnected(&mut self, value : &'a dyn GISBSenderDisconnectedEvent);
  ...
}

Remarks

If the connection is broken normally, status_code is 0 and description is "OK".

If the connection is broken for any other reason, status_code has the error code returned by the Transmission Control Protocol (TCP/IP) subsystem. description contains a description of this code. The value of status_code is equal to the value of the TCP/IP error.

Please refer to the Error Codes section for more information.

on_end_transfer event (GISBSender Struct)

Fired when a document finishes transferring.

Syntax

// GISBSenderEndTransferEventArgs carries the GISBSender EndTransfer event's parameters.
pub struct GISBSenderEndTransferEventArgs {
  fn direction(&self) -> i32
}

// GISBSenderEndTransferEvent defines the signature of the GISBSender EndTransfer event's handler function.
pub trait GISBSenderEndTransferEvent {
  fn on_end_transfer(&self, sender : GISBSender, e : &mut GISBSenderEndTransferEventArgs);
}

impl <'a> GISBSender<'a> {
  pub fn on_end_transfer(&self) -> &'a dyn GISBSenderEndTransferEvent;
  pub fn set_on_end_transfer(&mut self, value : &'a dyn GISBSenderEndTransferEvent);
  ...
}

Remarks

This event is fired first when the client finishes sending data to the server (in a POST or PUT request) and then when the document text finishes transferring from the server to the local host.

The Direction parameter shows whether the client (0) or the server (1) is sending the data.

on_error event (GISBSender Struct)

Fired when information is available about errors during data delivery.

Syntax

// GISBSenderErrorEventArgs carries the GISBSender Error event's parameters.
pub struct GISBSenderErrorEventArgs {
  fn error_code(&self) -> i32
  fn description(&self) -> &String
}

// GISBSenderErrorEvent defines the signature of the GISBSender Error event's handler function.
pub trait GISBSenderErrorEvent {
  fn on_error(&self, sender : GISBSender, e : &mut GISBSenderErrorEventArgs);
}

impl <'a> GISBSender<'a> {
  pub fn on_error(&self) -> &'a dyn GISBSenderErrorEvent;
  pub fn set_on_error(&mut self, value : &'a dyn GISBSenderErrorEvent);
  ...
}

Remarks

The on_error event is fired in case of exceptional conditions during message processing. Normally the struct fails with an error.

The error_code parameter contains an error code, and the description parameter contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to the Error Codes section.

on_header event (GISBSender Struct)

Fired every time a header line comes in.

Syntax

// GISBSenderHeaderEventArgs carries the GISBSender Header event's parameters.
pub struct GISBSenderHeaderEventArgs {
  fn field(&self) -> &String
  fn value(&self) -> &String
}

// GISBSenderHeaderEvent defines the signature of the GISBSender Header event's handler function.
pub trait GISBSenderHeaderEvent {
  fn on_header(&self, sender : GISBSender, e : &mut GISBSenderHeaderEventArgs);
}

impl <'a> GISBSender<'a> {
  pub fn on_header(&self) -> &'a dyn GISBSenderHeaderEvent;
  pub fn set_on_header(&mut self, value : &'a dyn GISBSenderHeaderEvent);
  ...
}

Remarks

The field parameter contains the name of the HTTP header (which is the same as it is delivered). The value parameter contains the header contents.

If the header line being retrieved is a continuation header line, then the field parameter contains "" (empty string).

on_log event (GISBSender Struct)

Fired with log information while processing a message.

Syntax

// GISBSenderLogEventArgs carries the GISBSender Log event's parameters.
pub struct GISBSenderLogEventArgs {
  fn log_type(&self) -> &String
  fn log_message(&self) -> &[u8]
}

// GISBSenderLogEvent defines the signature of the GISBSender Log event's handler function.
pub trait GISBSenderLogEvent {
  fn on_log(&self, sender : GISBSender, e : &mut GISBSenderLogEventArgs);
}

impl <'a> GISBSender<'a> {
  pub fn on_log(&self) -> &'a dyn GISBSenderLogEvent;
  pub fn set_on_log(&mut self, value : &'a dyn GISBSenderLogEvent);
  ...
}

Remarks

This event fires once for each log message generated by the struct. The verbosity is controlled by the LogLevel setting.

Log messages available through this event correspond to log files written to log_directory. This event provides a way to obtain log messages without relying on files on disk. This event fires regardless of the value of log_directory (i.e. when log_directory is empty the event will still fire).

The LogMessage event parameter holds the raw log data.

The LogType event parameter indicates the type of log. Possible values are:

"LOG" Information about the status of the process.
"ERR" An error was encountered.
"DAT" The EDI payload.
"REQ" The raw request
"MDN" The MDN response.
"DEBUG" Debug information.
"DAT.INPUT" Debug information when processing payload. Only applicable when LogDebug is True.
"DAT.ENCRYPT" Debug information when processing payload. Only applicable when LogDebug is True.
"DAT.COMPRESS" Debug information when processing payload. Only applicable when LogDebug is True.
"DAT.SIGN" Debug information when processing payload. Only applicable when LogDebug is True.
"DAT.DECRYPT" Debug information when processing payload. Only applicable when LogDebug is True.
"DAT.DECOMPRESS" Debug information when processing payload. Only applicable when LogDebug is True.
"DAT.VERIFY" Debug information when processing payload. Only applicable when LogDebug is True.
"DAT.DEBUG" Debug information when processing payload. Only applicable when LogDebug is True.

on_set_cookie event (GISBSender Struct)

Fired for every cookie set by the server.

// GISBSenderSetCookieEventArgs carries the GISBSender SetCookie event's parameters.
pub struct GISBSenderSetCookieEventArgs {
  fn name(&self) -> &String
  fn value(&self) -> &String
  fn expires(&self) -> &String
  fn domain(&self) -> &String
  fn path(&self) -> &String
  fn secure(&self) -> bool
}

// GISBSenderSetCookieEvent defines the signature of the GISBSender SetCookie event's handler function.
pub trait GISBSenderSetCookieEvent {
  fn on_set_cookie(&self, sender : GISBSender, e : &mut GISBSenderSetCookieEventArgs);
}

impl <'a> GISBSender<'a> {
  pub fn on_set_cookie(&self) -> &'a dyn GISBSenderSetCookieEvent;
  pub fn set_on_set_cookie(&mut self, value : &'a dyn GISBSenderSetCookieEvent);
  ...
}

This event is fired for every Set-Cookie: header received from the HTTP server.

The name parameter contains the name of the cookie, with the corresponding value supplied in the value parameter.

The expires parameter contains an expiration time for the cookie (if provided by the server). The time format used is "Weekday, DD-Mon-YY HH:MM:SS GMT". If the server does not provide an expiration time, the expires parameter will be an empty string. In this case, the convention is to drop the cookie at the end of the session.

The domain parameter contains a domain name to limit the cookie to (if provided by the server). If the server does not provide a domain name, the domain parameter will be an empty string. The convention in this case is to use the server specified in the URL (url_server) as the cookie domain.

The path parameter contains a path name to limit the cookie to (if provided by the server). If the server does not provide a cookie path, the path parameter will be an empty string. The convention in this case is to use the path specified in the URL (url_path) as the cookie path.

The secure parameter specifies whether the cookie is secure. If the value of this parameter is True, the cookie value must be submitted only through a secure (HTTPS) connection.

on_ssl_server_authentication event (GISBSender Struct)

Fired after the server presents its certificate to the client.

Syntax

// GISBSenderSSLServerAuthenticationEventArgs carries the GISBSender SSLServerAuthentication event's parameters.
pub struct GISBSenderSSLServerAuthenticationEventArgs {
  fn cert_encoded(&self) -> &[u8]
  fn cert_subject(&self) -> &String
  fn cert_issuer(&self) -> &String
  fn status(&self) -> &String
  fn accept(&self) -> bool
  fn set_accept(&self, value : bool)
}

// GISBSenderSSLServerAuthenticationEvent defines the signature of the GISBSender SSLServerAuthentication event's handler function.
pub trait GISBSenderSSLServerAuthenticationEvent {
  fn on_ssl_server_authentication(&self, sender : GISBSender, e : &mut GISBSenderSSLServerAuthenticationEventArgs);
}

impl <'a> GISBSender<'a> {
  pub fn on_ssl_server_authentication(&self) -> &'a dyn GISBSenderSSLServerAuthenticationEvent;
  pub fn set_on_ssl_server_authentication(&mut self, value : &'a dyn GISBSenderSSLServerAuthenticationEvent);
  ...
}

Remarks

This event is where the client can decide whether to continue with the connection process or not. The Accept parameter is a recommendation on whether to continue or close the connection. This is just a suggestion: application software must use its own logic to determine whether to continue or not.

When Accept is False, Status shows why the verification failed (otherwise, Status contains the string "OK").

on_ssl_status event (GISBSender Struct)

Fired when secure connection progress messages are available.

Syntax

// GISBSenderSSLStatusEventArgs carries the GISBSender SSLStatus event's parameters.
pub struct GISBSenderSSLStatusEventArgs {
  fn message(&self) -> &String
}

// GISBSenderSSLStatusEvent defines the signature of the GISBSender SSLStatus event's handler function.
pub trait GISBSenderSSLStatusEvent {
  fn on_ssl_status(&self, sender : GISBSender, e : &mut GISBSenderSSLStatusEventArgs);
}

impl <'a> GISBSender<'a> {
  pub fn on_ssl_status(&self) -> &'a dyn GISBSenderSSLStatusEvent;
  pub fn set_on_ssl_status(&mut self, value : &'a dyn GISBSenderSSLStatusEvent);
  ...
}

Remarks

The event is fired for informational and logging purposes only. This event tracks the progress of the connection.

on_start_transfer event (GISBSender Struct)

Fired when a document starts transferring (after the headers).

Syntax

// GISBSenderStartTransferEventArgs carries the GISBSender StartTransfer event's parameters.
pub struct GISBSenderStartTransferEventArgs {
  fn direction(&self) -> i32
}

// GISBSenderStartTransferEvent defines the signature of the GISBSender StartTransfer event's handler function.
pub trait GISBSenderStartTransferEvent {
  fn on_start_transfer(&self, sender : GISBSender, e : &mut GISBSenderStartTransferEventArgs);
}

impl <'a> GISBSender<'a> {
  pub fn on_start_transfer(&self) -> &'a dyn GISBSenderStartTransferEvent;
  pub fn set_on_start_transfer(&mut self, value : &'a dyn GISBSenderStartTransferEvent);
  ...
}

Remarks

This event is fired first when the client starts sending data to the server (in a POST or PUT request) and then when the document text starts transferring from the server to the local host.

The Direction parameter shows whether the client (0) or the server (1) is sending the data.

on_transfer event (GISBSender Struct)

Fired while a document transfers (delivers document).

Syntax

// GISBSenderTransferEventArgs carries the GISBSender Transfer event's parameters.
pub struct GISBSenderTransferEventArgs {
  fn direction(&self) -> i32
  fn bytes_transferred(&self) -> i64
  fn percent_done(&self) -> i32
  fn text(&self) -> &[u8]
}

// GISBSenderTransferEvent defines the signature of the GISBSender Transfer event's handler function.
pub trait GISBSenderTransferEvent {
  fn on_transfer(&self, sender : GISBSender, e : &mut GISBSenderTransferEventArgs);
}

impl <'a> GISBSender<'a> {
  pub fn on_transfer(&self) -> &'a dyn GISBSenderTransferEvent;
  pub fn set_on_transfer(&mut self, value : &'a dyn GISBSenderTransferEvent);
  ...
}

Remarks

The text parameter contains the portion of the document text being received. It is empty if data are being posted to the server.

The bytes_transferred parameter contains the number of bytes transferred in this direction since the beginning of the document text (excluding HTTP response headers).

The Direction parameter shows whether the client (0) or the server (1) is sending the data.

The PercentDone parameter shows the progress of the transfer in the corresponding direction. If PercentDone can not be calculated the value will be -1.

NOTE: Events are not re-entrant. Performing time-consuming operations within this event will prevent it from firing again in a timely manner and may affect overall performance.

Config Settings (GISBSender Struct)

The struct accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the struct, access to these internal properties is provided through the config method.

GISBSender Config Settings

AllowOldPacketType:   Whether to allow the older encrypted packet type.

By default the struct will only encrypt data using the newer and more secure integrity protected data packet type. Old implementations such as PGP 6.5.8 may require the older less secure data packet type.

When set to True the struct will read the features from the recipient key to determine if the older packet type is required. If the key does require the old packet type, then the older packet type will be used. If the key does not require the old packet type, then the new integrity protected packet type will still be used.

By default this value is False. This means under no conditions is the older less secure packet type used. The newer integrity protected packet type is always used.

Only enable this setting if you have a requirement to do so.

Authorization:   The Authorization string to be sent to the server.

If the Authorization setting contains a non-empty string, an Authorization HTTP request header is added to the request. This header conveys Authorization information to the server.

This setting is provided so that the struct can be extended with other security schemes in addition to the authorization schemes already implemented by the struct.

The AuthScheme; setting defines the authentication scheme used. In the case of HTTP Basic Authentication (default), every time User and Password are set, they are Base64 encoded, and the result is put in the Authorization setting in the form "Basic [encoded-user-password]".

AuthScheme:   The authorization scheme to be used when server authorization is to be performed.

Use the AuthScheme property to tell the struct which type of authorization to perform when the User and Password properties are set. Possible values are:

0 (default)Basic
1Digest
2Proprietary
3None
4NTLM
5Negotiate
6OAuth
By default, AuthScheme is Basic (0), and if the User and Password configuration settings are set, the struct will attempt basic authentication. If AuthScheme is set to Digest (1), digest authentication will be attempted instead.

For security reasons, setting this value will clear the values of User and Password.

LogFilename:   The base name of the log file.

If set, this will be used as for the filename of the log file.

Note that only the base name should be specified as the struct will append the appropriate file extension.

LogLevel:   Specifies the level of detail that is logged.

This setting controls the level of detail that is logged through the on_status event. Possible values are:

0 (None)No events are logged.
1 (Info - default)Informational events are logged.
2 (Verbose)Detailed data is logged.
3 (Debug)Debug data is logged.
Password:   A password if authentication is to be used.

If AuthScheme is set to Basic, the User and Password are Base64 encoded and the result is put in the Authorization configuration setting in the form "Basic [encoded-user-password]".

If AuthScheme is set to Digest, the User and Password properties are used to respond to the HTTP Digest Authentication challenge from the server.

The User and Password properties must be set only after the url property is set. When the url property is set, for security reasons, User and Password are immediately cleared.

PGPCombineSignAndEncrypt:   Whether to sign and encrypt in a single step or not.

By default, when signing and encrypting the GISB data, the struct will sign first and then encrypt the signed message in a separate step. When this property is set to true, signing and encrypting will be combined into a single step.

Note that if you are using an external provider (i.e. PGPProviderType is set to 0), setting PGPCombineSignAndEncrypt to true will cause the struct to call the PGPProvider's SignAndEncrypt method.

User:   A user name if authentication is to be used.

If AuthScheme is set to Basic, the User and Password are Base64 encoded and the result is put in the Authorization configuration setting in the form "Basic [encoded-user-password]".

If AuthScheme is set to Digest, the User and Password properties are used to respond to the HTTP Digest Authentication challenge from the server.

The User and Password properties must be set only after the url property is set. When the url property is set, for security reasons, User and Password are immediately cleared.

Base Config Settings

BuildInfo:   Information about the product's build.

When queried, this setting will return a string containing information about the product's build.

CodePage:   The system code page used for Unicode to Multibyte translations.

The default code page is Unicode UTF-8 (65001).

The following is a list of valid code page identifiers:

IdentifierName
037IBM EBCDIC - U.S./Canada
437OEM - United States
500IBM EBCDIC - International
708Arabic - ASMO 708
709Arabic - ASMO 449+, BCON V4
710Arabic - Transparent Arabic
720Arabic - Transparent ASMO
737OEM - Greek (formerly 437G)
775OEM - Baltic
850OEM - Multilingual Latin I
852OEM - Latin II
855OEM - Cyrillic (primarily Russian)
857OEM - Turkish
858OEM - Multilingual Latin I + Euro symbol
860OEM - Portuguese
861OEM - Icelandic
862OEM - Hebrew
863OEM - Canadian-French
864OEM - Arabic
865OEM - Nordic
866OEM - Russian
869OEM - Modern Greek
870IBM EBCDIC - Multilingual/ROECE (Latin-2)
874ANSI/OEM - Thai (same as 28605, ISO 8859-15)
875IBM EBCDIC - Modern Greek
932ANSI/OEM - Japanese, Shift-JIS
936ANSI/OEM - Simplified Chinese (PRC, Singapore)
949ANSI/OEM - Korean (Unified Hangul Code)
950ANSI/OEM - Traditional Chinese (Taiwan; Hong Kong SAR, PRC)
1026IBM EBCDIC - Turkish (Latin-5)
1047IBM EBCDIC - Latin 1/Open System
1140IBM EBCDIC - U.S./Canada (037 + Euro symbol)
1141IBM EBCDIC - Germany (20273 + Euro symbol)
1142IBM EBCDIC - Denmark/Norway (20277 + Euro symbol)
1143IBM EBCDIC - Finland/Sweden (20278 + Euro symbol)
1144IBM EBCDIC - Italy (20280 + Euro symbol)
1145IBM EBCDIC - Latin America/Spain (20284 + Euro symbol)
1146IBM EBCDIC - United Kingdom (20285 + Euro symbol)
1147IBM EBCDIC - France (20297 + Euro symbol)
1148IBM EBCDIC - International (500 + Euro symbol)
1149IBM EBCDIC - Icelandic (20871 + Euro symbol)
1200Unicode UCS-2 Little-Endian (BMP of ISO 10646)
1201Unicode UCS-2 Big-Endian
1250ANSI - Central European
1251ANSI - Cyrillic
1252ANSI - Latin I
1253ANSI - Greek
1254ANSI - Turkish
1255ANSI - Hebrew
1256ANSI - Arabic
1257ANSI - Baltic
1258ANSI/OEM - Vietnamese
1361Korean (Johab)
10000MAC - Roman
10001MAC - Japanese
10002MAC - Traditional Chinese (Big5)
10003MAC - Korean
10004MAC - Arabic
10005MAC - Hebrew
10006MAC - Greek I
10007MAC - Cyrillic
10008MAC - Simplified Chinese (GB 2312)
10010MAC - Romania
10017MAC - Ukraine
10021MAC - Thai
10029MAC - Latin II
10079MAC - Icelandic
10081MAC - Turkish
10082MAC - Croatia
12000Unicode UCS-4 Little-Endian
12001Unicode UCS-4 Big-Endian
20000CNS - Taiwan
20001TCA - Taiwan
20002Eten - Taiwan
20003IBM5550 - Taiwan
20004TeleText - Taiwan
20005Wang - Taiwan
20105IA5 IRV International Alphabet No. 5 (7-bit)
20106IA5 German (7-bit)
20107IA5 Swedish (7-bit)
20108IA5 Norwegian (7-bit)
20127US-ASCII (7-bit)
20261T.61
20269ISO 6937 Non-Spacing Accent
20273IBM EBCDIC - Germany
20277IBM EBCDIC - Denmark/Norway
20278IBM EBCDIC - Finland/Sweden
20280IBM EBCDIC - Italy
20284IBM EBCDIC - Latin America/Spain
20285IBM EBCDIC - United Kingdom
20290IBM EBCDIC - Japanese Katakana Extended
20297IBM EBCDIC - France
20420IBM EBCDIC - Arabic
20423IBM EBCDIC - Greek
20424IBM EBCDIC - Hebrew
20833IBM EBCDIC - Korean Extended
20838IBM EBCDIC - Thai
20866Russian - KOI8-R
20871IBM EBCDIC - Icelandic
20880IBM EBCDIC - Cyrillic (Russian)
20905IBM EBCDIC - Turkish
20924IBM EBCDIC - Latin-1/Open System (1047 + Euro symbol)
20932JIS X 0208-1990 & 0121-1990
20936Simplified Chinese (GB2312)
21025IBM EBCDIC - Cyrillic (Serbian, Bulgarian)
21027Extended Alpha Lowercase
21866Ukrainian (KOI8-U)
28591ISO 8859-1 Latin I
28592ISO 8859-2 Central Europe
28593ISO 8859-3 Latin 3
28594ISO 8859-4 Baltic
28595ISO 8859-5 Cyrillic
28596ISO 8859-6 Arabic
28597ISO 8859-7 Greek
28598ISO 8859-8 Hebrew
28599ISO 8859-9 Latin 5
28605ISO 8859-15 Latin 9
29001Europa 3
38598ISO 8859-8 Hebrew
50220ISO 2022 Japanese with no halfwidth Katakana
50221ISO 2022 Japanese with halfwidth Katakana
50222ISO 2022 Japanese JIS X 0201-1989
50225ISO 2022 Korean
50227ISO 2022 Simplified Chinese
50229ISO 2022 Traditional Chinese
50930Japanese (Katakana) Extended
50931US/Canada and Japanese
50933Korean Extended and Korean
50935Simplified Chinese Extended and Simplified Chinese
50936Simplified Chinese
50937US/Canada and Traditional Chinese
50939Japanese (Latin) Extended and Japanese
51932EUC - Japanese
51936EUC - Simplified Chinese
51949EUC - Korean
51950EUC - Traditional Chinese
52936HZ-GB2312 Simplified Chinese
54936Windows XP: GB18030 Simplified Chinese (4 Byte)
57002ISCII Devanagari
57003ISCII Bengali
57004ISCII Tamil
57005ISCII Telugu
57006ISCII Assamese
57007ISCII Oriya
57008ISCII Kannada
57009ISCII Malayalam
57010ISCII Gujarati
57011ISCII Punjabi
65000Unicode UTF-7
65001Unicode UTF-8
The following is a list of valid code page identifiers for Mac OS only:
IdentifierName
1ASCII
2NEXTSTEP
3JapaneseEUC
4UTF8
5ISOLatin1
6Symbol
7NonLossyASCII
8ShiftJIS
9ISOLatin2
10Unicode
11WindowsCP1251
12WindowsCP1252
13WindowsCP1253
14WindowsCP1254
15WindowsCP1250
21ISO2022JP
30MacOSRoman
10UTF16String
0x90000100UTF16BigEndian
0x94000100UTF16LittleEndian
0x8c000100UTF32String
0x98000100UTF32BigEndian
0x9c000100UTF32LittleEndian
65536Proprietary

LicenseInfo:   Information about the current license.

When queried, this setting will return a string containing information about the license this instance of a struct is using. It will return the following information:

  • Product: The product the license is for.
  • Product Key: The key the license was generated from.
  • License Source: Where the license was found (e.g., RuntimeLicense, License File).
  • License Type: The type of license installed (e.g., Royalty Free, Single Server).
  • Last Valid Build: The last valid build number for which the license will work.
MaskSensitiveData:   Whether sensitive data is masked in log messages.

In certain circumstances it may be beneficial to mask sensitive data, like passwords, in log messages. Set this to true to mask sensitive data. The default is true.

UseInternalSecurityAPI:   Whether or not to use the system security libraries or an internal implementation.

When set to false, the struct will use the system security libraries by default to perform cryptographic functions where applicable.

Setting this configuration setting to true tells the struct to use the internal implementation instead of using the system security libraries.

On Windows, this setting is set to false by default. On Linux/macOS, this setting is set to true by default.

To use the system security libraries for Linux, OpenSSL support must be enabled. For more information on how to enable OpenSSL, please refer to the OpenSSL Notes section.

Trappable Errors (GISBSender Struct)

GISBSender Errors

651   Required field unspecified (by client).
662   Invalid request status reported by server (details follow).
664   Data was not processed by PGP.
701   Unable to write log file.
713   Unable to decompress message.

MIME Errors

3   Can't create the file for write (illegal name or disk is write-protected).
4   Can't open the file for read (doesn't exist?).
5   Can't read from file.
6   Can't write to file (disk full?).
280   Invalid Part Index.
281   Unknown MIME type.
282   No MIME-boundary found.
283   No file given.
284   The struct is busy.
285   Can't create a temporary file to decode the data.
286   Can't read message file.
287   No header separator found.
289   No separator found.
290   Input stream must have seeking enabled.

HTTP Errors

118   Firewall error. The error description contains the detailed message.
143   Busy executing current method.
151   HTTP protocol error. The error message has the server response.
152   No server specified in url.
153   Specified url_scheme is invalid.
155   Range operation is not supported by server.
156   Invalid cookie index (out of range).
301   Interrupted.
302   Cannot open attached_file.

The class may also return one of the following error codes, which are inherited from other classes.

TCPClient Errors

100   You cannot change the remote_port at this time. A connection is in progress.
101   You cannot change the remote_host (Server) at this time. A connection is in progress.
102   The remote_host address is invalid (0.0.0.0).
104   Already connected. If you want to reconnect, close the current connection first.
106   You cannot change the local_port at this time. A connection is in progress.
107   You cannot change the local_host at this time. A connection is in progress.
112   You cannot change MaxLineLength at this time. A connection is in progress.
116   remote_port cannot be zero. Please specify a valid service port number.
117   You cannot change the UseConnection option while the struct is active.
135   Operation would block.
201   Timeout.
211   Action impossible in control's present state.
212   Action impossible while not connected.
213   Action impossible while listening.
301   Timeout.
302   Could not open file.
434   Unable to convert string to selected CodePage.
1105   Already connecting. If you want to reconnect, close the current connection first.
1117   You need to connect first.
1119   You cannot change the LocalHost at this time. A connection is in progress.
1120   Connection dropped by remote host.

TCP/IP Errors

10004   [10004] Interrupted system call.
10009   [10009] Bad file number.
10013   [10013] Access denied.
10014   [10014] Bad address.
10022   [10022] Invalid argument.
10024   [10024] Too many open files.
10035   [10035] Operation would block.
10036   [10036] Operation now in progress.
10037   [10037] Operation already in progress.
10038   [10038] Socket operation on nonsocket.
10039   [10039] Destination address required.
10040   [10040] Message is too long.
10041   [10041] Protocol wrong type for socket.
10042   [10042] Bad protocol option.
10043   [10043] Protocol is not supported.
10044   [10044] Socket type is not supported.
10045   [10045] Operation is not supported on socket.
10046   [10046] Protocol family is not supported.
10047   [10047] Address family is not supported by protocol family.
10048   [10048] Address already in use.
10049   [10049] Cannot assign requested address.
10050   [10050] Network is down.
10051   [10051] Network is unreachable.
10052   [10052] Net dropped connection or reset.
10053   [10053] Software caused connection abort.
10054   [10054] Connection reset by peer.
10055   [10055] No buffer space available.
10056   [10056] Socket is already connected.
10057   [10057] Socket is not connected.
10058   [10058] Cannot send after socket shutdown.
10059   [10059] Too many references, cannot splice.
10060   [10060] Connection timed out.
10061   [10061] Connection refused.
10062   [10062] Too many levels of symbolic links.
10063   [10063] File name is too long.
10064   [10064] Host is down.
10065   [10065] No route to host.
10066   [10066] Directory is not empty
10067   [10067] Too many processes.
10068   [10068] Too many users.
10069   [10069] Disc Quota Exceeded.
10070   [10070] Stale NFS file handle.
10071   [10071] Too many levels of remote in path.
10091   [10091] Network subsystem is unavailable.
10092   [10092] WINSOCK DLL Version out of range.
10093   [10093] Winsock is not loaded yet.
11001   [11001] Host not found.
11002   [11002] Nonauthoritative 'Host not found' (try again or check DNS setup).
11003   [11003] Nonrecoverable errors: FORMERR, REFUSED, NOTIMP.
11004   [11004] Valid name, no data record (check DNS setup).