Struct ipworksedi::RNIFReceiver

Properties   Methods   Events   Config Settings   Errors  

The RNIFReceiver struct implements a RosettaNet server.

Syntax

ipworksedi::RNIFReceiver

Remarks

The RNIFReceiver implements server-side receiving of RosettaNet messages, as specified by the RosettaNet community. It can be used to decrypt and verify incoming messages and to generate synchronous receipts and replies if needed. The struct is designed to be easily incorporated into an HTTP server. RosettaNet is used in a variety of industries including Semiconductor Manufacturing, Electronic Components, Telecommunications, Logistics, the Chemical Industry (through CIDX), and more.

BASIC OPERATION

When a RosettaNet request comes in, you should first call the read_request method to read in the request. Once this is done, you must parse the headers and the request. You first parse the headers of the HTTP request using the parse_headers method. You may then set the appropriate certificates by setting the certificate to your private key certificate and signer_cert to your trading partner's (signing) certificate.

The next step is to parse the RosettaNet message using parse_request. This method decrypts the message if needed. The struct then parses all parts of the message. The preamble, delivery, and service headers are all parsed into the preamble_header_xml, delivery_header_xml, and the service_header_xml, respectively. It also parses the actual body of the RosettaNet message, or the PIP, into the service_content. Any attachments that may be in the message are parsed into the attachment array, and may be accessed via the attachments property.

The struct can also be used to handle synchronous responses. In order to complete this task, the receiver must first reset all header properties to values appropriate for a response. This may include changing values such as the message_sender_id, message_receiver_id, action_code, etc. The service_content should then be set to a response indicating the state of the transaction. A typical response is a simple receipt acknowledgement, which has all qualities of a valid RosettaNet action, but is simply a receipt. Once these properties have been set, the message is ready to be sent using the send_response method.

NOTE: the RNIFReceiver Struct can only handle sending synchronous responses. If an asynchronous response is desired, or required by a particular Partner Interface Process (PIP), you should use the RNIFSender struct.

The following example illustrates how to use the struct within a web page.

EXAMPLE

RNIFReceiver.ReadRequest(); RNIFReceiver.Certificate = new Certificate(CertStoreTypes.cstPFXFile, // Store type "\my_server_directory\encrypt.pfx", // File name "my password", // Password "CN=Encrypt"); // Subject RNIFReceiver.SignerCert = new Certificate("\my_server_directory\partnercert.cer"); RNIFReceiver.ParseHeaders(); RNIFReceiver.ParseRequest();

The server can then get the data from the preamble header, delivery header, service header, and the PIP content from their properties: preamble_header_xml, delivery_header_xml, service_header_xml<;, and the service_content, respectively. The message may then be easily processed, as all details of the transaction will be populated into their respective properties.

NOTE: Any attachments are saved by the name in the corresponding attachments entry, and in the directory specified by the receiver. The directory is specified using the AttachmentOutputPath config property, and must be specified before you read and process the request. For example:

RNIFReceiver.Config("AttachmentOutputPath='\my_server_directory\Attachments'")

NOTE: In the above example, a receipt acknowledgement was not sent.

Additional functionality allows the user to examine details of the client's request, to permit certain types of errors, or to customize the RosettaNet response message. See the property and method list for details.

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 RNIFReceiver struct cannot be disposed of automatically. Please, call the dispose(&self) method of RNIFReceiver 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.

action_codeThe code for this action.
action_messageWhether or not this message is an action message.
action_message_standard_nameThe name of the standard used to create this action.
action_message_standard_versionThe version of the standard used to create this action.
attachment_countThe number of records in the Attachment arrays.
attachment_dataData contains the raw data of the current attachment.
attachment_descriptionDescription contains descriptions for this attachment.
attachment_file_nameFileName is the name of the file containing the decoded data of the current attachment.
attachment_idId is a unique content-identifier used within the RosettaNet message to internally reference the attachments.
attachment_mime_typeMimeType is a value indicating how the rnifattachment should be interpreted.
business_activityThis property denotes the type of business activity.
cert_effective_dateThe date on which this certificate becomes valid.
cert_expiration_dateThe date on which the certificate expires.
cert_extended_key_usageA comma-delimited list of extended key usage identifiers.
cert_fingerprintThe hex-encoded, 16-byte MD5 fingerprint of the certificate.
cert_fingerprint_sha1The hex-encoded, 20-byte SHA-1 fingerprint of the certificate.
cert_fingerprint_sha256The hex-encoded, 32-byte SHA-256 fingerprint of the certificate.
cert_issuerThe issuer of the certificate.
cert_private_keyThe private key of the certificate (if available).
cert_private_key_availableWhether a PrivateKey is available for the selected certificate.
cert_private_key_containerThe name of the PrivateKey container for the certificate (if available).
cert_public_keyThe public key of the certificate.
cert_public_key_algorithmThe textual description of the certificate's public key algorithm.
cert_public_key_lengthThe length of the certificate's public key (in bits).
cert_serial_numberThe serial number of the certificate encoded as a string.
cert_signature_algorithmThe text description of the certificate's signature algorithm.
cert_storeThe name of the certificate store for the client certificate.
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.
cert_store_typeThe type of certificate store for this certificate.
cert_subject_alt_namesComma-separated lists of alternative subject names for the certificate.
cert_thumbprint_md5The MD5 hash of the certificate.
cert_thumbprint_sha1The SHA-1 hash of the certificate.
cert_thumbprint_sha256The SHA-256 hash of the certificate.
cert_usageThe text description of UsageFlags .
cert_usage_flagsThe flags that show intended use for the certificate.
cert_versionThe certificate's version number.
cert_subjectThe subject of the certificate used for client authentication.
cert_encodedThe certificate (PEM/Base64 encoded).
delivery_header_xmlThe complete XML data from the Delivery Header.
encryption_algorithmThe algorithm used to encrypt the EDI data.
encryption_typeThe encryption type for RNIF 2.0.
from_roleThe business role of the entity that originated this message.
from_serviceThe service that originated this message.
global_usage_codeA universal code describing basic usage for this message.
message_date_timeThe time at which this message was sent.
message_receiver_idIdentity of the entity receiving this message.
message_receiver_locationLocation of the entity receiving this message.
message_sender_idIdentity of the entity that sent this message.
message_sender_locationLocation of the entity that sent this message.
message_tracking_idUnique value that identifies this message.
original_action_codeThe action code of the original message.
original_message_standard_nameThe name of the standard used to create the original message.
original_message_standard_versionThe version of the standard used to create the original message.
original_message_tracking_idTracking identifier for the original message.
partner_idIdentity of the partner.
partner_knownWhether or not the partner is known.
partner_locationLocation of the partner.
partner_pip_binding_idThe partner-defined PIP payload binding ID.
partner_urlA URL to which replies must be sent if the partner is unknown.
pip_codeRosettaNet PIP code of this message.
pip_instance_idThe Id of this PIP instance.
pip_versionRosettaNet PIP version of this message.
preamble_header_xmlThe complete XML data from the Preamble Header.
qos_specification_countThe number of records in the QOSSpecification arrays.
qos_specification_codeCode is a string representing a quality of service measurement category.
qos_specification_valueValue is a string that defines the constraints for the category in Code .
recipient_cert_effective_dateThe date on which this certificate becomes valid.
recipient_cert_expiration_dateThe date on which the certificate expires.
recipient_cert_extended_key_usageA comma-delimited list of extended key usage identifiers.
recipient_cert_fingerprintThe hex-encoded, 16-byte MD5 fingerprint of the certificate.
recipient_cert_fingerprint_sha1The hex-encoded, 20-byte SHA-1 fingerprint of the certificate.
recipient_cert_fingerprint_sha256The hex-encoded, 32-byte SHA-256 fingerprint of the certificate.
recipient_cert_issuerThe issuer of the certificate.
recipient_cert_private_keyThe private key of the certificate (if available).
recipient_cert_private_key_availableWhether a PrivateKey is available for the selected certificate.
recipient_cert_private_key_containerThe name of the PrivateKey container for the certificate (if available).
recipient_cert_public_keyThe public key of the certificate.
recipient_cert_public_key_algorithmThe textual description of the certificate's public key algorithm.
recipient_cert_public_key_lengthThe length of the certificate's public key (in bits).
recipient_cert_serial_numberThe serial number of the certificate encoded as a string.
recipient_cert_signature_algorithmThe text description of the certificate's signature algorithm.
recipient_cert_storeThe name of the certificate store for the client certificate.
recipient_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.
recipient_cert_store_typeThe type of certificate store for this certificate.
recipient_cert_subject_alt_namesComma-separated lists of alternative subject names for the certificate.
recipient_cert_thumbprint_md5The MD5 hash of the certificate.
recipient_cert_thumbprint_sha1The SHA-1 hash of the certificate.
recipient_cert_thumbprint_sha256The SHA-256 hash of the certificate.
recipient_cert_usageThe text description of UsageFlags .
recipient_cert_usage_flagsThe flags that show intended use for the certificate.
recipient_cert_versionThe certificate's version number.
recipient_cert_subjectThe subject of the certificate used for client authentication.
recipient_cert_encodedThe certificate (PEM/Base64 encoded).
reply_messageWhether or not this message is a reply to another message.
requestThe HTTP request to be processed.
request_header_countThe number of records in the RequestHeader arrays.
request_header_fieldThis property contains the name of the HTTP header (this is the same case as it is delivered).
request_header_valueThis property contains the header contents.
request_headers_stringThe HTTP headers in the RNIF request.
response_typeRequested response type. Available only in RNIF 2.0.
rnif_versionThe RNIF Standard Version used to generate this message.
secure_transport_requiredIndicates that security is required when forwarding this message.
service_contentThe PIP message data.
service_header_xmlThe complete XML data from the Service Header.
signal_codeThe code for this signal.
signal_messageWhether or not this message is a signal.
signal_versionThe version of this signal.
signer_cert_effective_dateThe date on which this certificate becomes valid.
signer_cert_expiration_dateThe date on which the certificate expires.
signer_cert_extended_key_usageA comma-delimited list of extended key usage identifiers.
signer_cert_fingerprintThe hex-encoded, 16-byte MD5 fingerprint of the certificate.
signer_cert_fingerprint_sha1The hex-encoded, 20-byte SHA-1 fingerprint of the certificate.
signer_cert_fingerprint_sha256The hex-encoded, 32-byte SHA-256 fingerprint of the certificate.
signer_cert_issuerThe issuer of the certificate.
signer_cert_private_keyThe private key of the certificate (if available).
signer_cert_private_key_availableWhether a PrivateKey is available for the selected certificate.
signer_cert_private_key_containerThe name of the PrivateKey container for the certificate (if available).
signer_cert_public_keyThe public key of the certificate.
signer_cert_public_key_algorithmThe textual description of the certificate's public key algorithm.
signer_cert_public_key_lengthThe length of the certificate's public key (in bits).
signer_cert_serial_numberThe serial number of the certificate encoded as a string.
signer_cert_signature_algorithmThe text description of the certificate's signature algorithm.
signer_cert_storeThe name of the certificate store for the client certificate.
signer_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.
signer_cert_store_typeThe type of certificate store for this certificate.
signer_cert_subject_alt_namesComma-separated lists of alternative subject names for the certificate.
signer_cert_thumbprint_md5The MD5 hash of the certificate.
signer_cert_thumbprint_sha1The SHA-1 hash of the certificate.
signer_cert_thumbprint_sha256The SHA-256 hash of the certificate.
signer_cert_usageThe text description of UsageFlags .
signer_cert_usage_flagsThe flags that show intended use for the certificate.
signer_cert_versionThe certificate's version number.
signer_cert_subjectThe subject of the certificate used for client authentication.
signer_cert_encodedThe certificate (PEM/Base64 encoded).
standard_nameThe name of the standard used to create this message.
standard_versionThe version of the standard used to create this message.
to_roleThe role of the entity receiving this message.
to_serviceThe service for which this message is bound.

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.
parse_headersProcesses the headers, and populates the appropriate properties.
parse_requestParses the MIME message in the Request property.
read_requestReads the RNIF request from the given HTTP servlet request.
request_headerGets the specified header from the HTTP request.
resetThis property is used to reset all attributes of the Rnifreceiver instance.
send_responseOptional. Acknowledges the incoming request.

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_errorFired when information is available about errors during data delivery.

Config Settings


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

AttachmentOutputPathSpecifies a path on disk to which attachments will be saved.
ExpectedVersionThe RNIF document version that the RNIFReceiver is expecting to receive.
FromPartnerClassificationCodeCode identifying the sending partner's function in the supply chain.
GlobalProcessCodeBusiness process identifier e.g. 'Manage Product Subscriptions'. This code is the name of a PIP specification document.
HTTPStatusCodeThe HTTP status code to send in the response.
MessageDigestThe base-64 encoded hash of the received data.
RequireEncryptionWhether encryption is required when processing received messages.
RequireSignatureWhether a signature is required when processing received messages.
SignatureAlgorithmSignature algorithm to be used in outgoing messages.
ToPartnerClassificationCodeCode identifying the receiving partner's function in the supply chain.
TransactionCodeService transaction dialog. The code is the name of the business activity and the transaction dialog in the PIP specification document.
TransactionIdA unique alpha-numeric identifier that represents a specific instance of an business process, business transaction, business action or business signal. The instance identifier must be unique for a particular instance of a business process, business transaction, business action and business signal.
TransferredDataThe full body of the incoming request.
TransferredHeadersThe HTTP headers of the incoming request.
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.

action_code property (RNIFReceiver Struct)

The code for this action.

Syntax

fn action_code(&self) -> Result<String, IPWorksEDIError> 
fn set_action_code(&self, value : &str) -> Option<IPWorksEDIError> fn set_action_code_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property is a string which denotes the type of action for the current RosettaNet message, if it is an action. If it is a reply, then the ActionCode describes the type of action that the message is in reply to. An example is a "Purchase Order Request Action."

This property is a field of the service header.

Data Type

String

action_message property (RNIFReceiver Struct)

Whether or not this message is an action message.

Syntax

fn action_message(&self) -> Result<bool, IPWorksEDIError> 
fn set_action_message(&self, value : bool) -> Option<IPWorksEDIError>

Default Value

false

Remarks

This property indicates whether or not the message is an action message. A RosettaNet action is defined as a message which requires or requests a business activity. A "PurchaseOrderRequestMessage" is a valid Business Action message, as is the corresponding "PurchaseOrderConfirmMessage". The latter, however, is also a reply to the original action request.

Receipt acknowledgments are considered Signals, and not Business Action messages, even though they contain all of the properties of a valid Business Action message.

This property is a field of the service header.

Data Type

bool

action_message_standard_name property (RNIFReceiver Struct)

The name of the standard used to create this action.

Syntax

fn action_message_standard_name(&self) -> Result<String, IPWorksEDIError> 
fn set_action_message_standard_name(&self, value : &str) -> Option<IPWorksEDIError> fn set_action_message_standard_name_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

While the RosettaNet community has a set of widely adopted, pre-defined and standardized message templates, it also allows for business partners to agree on specification geared more toward their particular needs. If a special, non-RosettaNet standard is to be used to create the action message, the name of the standard must be reported in action_message_standard_name and the version in action_message_standard_version. This way, the receiving entity can know how to process and interpret the incoming business message.

Since replies may sent in response to a message created using such a specialized standard, the standard used to create the original message should be referenced using the original_message_standard_name and original_message_standard_version when creating or processing replies.

This property is a field of the service header.

Data Type

String

action_message_standard_version property (RNIFReceiver Struct)

The version of the standard used to create this action.

Syntax

fn action_message_standard_version(&self) -> Result<String, IPWorksEDIError> 
fn set_action_message_standard_version(&self, value : &str) -> Option<IPWorksEDIError> fn set_action_message_standard_version_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

While the RosettaNet community has a set of widely adopted, pre-defined and standardized message templates, it also allows for business partners to agree on specification geared more toward their particular needs. If a special, non-RosettaNet standard is to be used to create the action message, the name of the standard must be reported in action_message_standard_name and the version in action_message_standard_version. This way, the receiving entity can know how to process and interpret the incoming business message.

Since replies may sent in response to a message created using such a specialized standard, the standard used to create the original message should be referenced using the original_message_standard_name and original_message_standard_version when creating or processing replies.

This property is a field of the service header.

Data Type

String

attachment_count property (RNIFReceiver Struct)

The number of records in the Attachment arrays.

Syntax

fn attachment_count(&self) -> Result<i32, IPWorksEDIError> 
fn set_attachment_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 attachment_count - 1.

Data Type

i32

attachment_data property (RNIFReceiver Struct)

Data contains the raw data of the current attachment.

Syntax

fn attachment_data(&self, AttachmentIndex : i32) -> Result<Vec<u8>, IPWorksEDIError> 
fn set_attachment_data(&self, AttachmentIndex : i32, value : Vec<u8>) -> Option<IPWorksEDIError> fn set_attachment_data_ref(&self, AttachmentIndex : i32, value : &[u8]) -> Option<IPWorksEDIError>

Default Value

""

Remarks

attachment_data contains the raw data of the current attachment. If attachment_data is set, the value in attachment_file_name will be used to specify the name of the attachment when generating messages to be sent. When receiving, polling This property will cause the attachment to be parsed out of the transmitted MIME entity to memory rather than being parsed to a file.

The AttachmentIndex parameter specifies the index of the item in the array. The size of the array is controlled by the attachment_count property.

Data Type

Vec<u8>

attachment_description property (RNIFReceiver Struct)

Description contains descriptions for this attachment.

Syntax

fn attachment_description(&self, AttachmentIndex : i32) -> Result<String, IPWorksEDIError> 
fn set_attachment_description(&self, AttachmentIndex : i32, value : &str) -> Option<IPWorksEDIError> fn set_attachment_description_ref(&self, AttachmentIndex : i32, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

attachment_description contains descriptions for this attachment. These descriptions are human-readable strings and may set to any arbitrary value. These descriptions should play no role in how the message is processed or interpreted.

The AttachmentIndex parameter specifies the index of the item in the array. The size of the array is controlled by the attachment_count property.

Data Type

String

attachment_file_name property (RNIFReceiver Struct)

FileName is the name of the file containing the decoded data of the current attachment.

Syntax

fn attachment_file_name(&self, AttachmentIndex : i32) -> Result<String, IPWorksEDIError> 
fn set_attachment_file_name(&self, AttachmentIndex : i32, value : &str) -> Option<IPWorksEDIError> fn set_attachment_file_name_ref(&self, AttachmentIndex : i32, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

attachment_file_name is the name of the file containing the decoded data of the current attachment. When sending messages, this value tells the struct where to find the file and is used in accordance with MIME encoding rules to indicate the filename to be used by the receiving RNIF entity when parsing the attachments.

When receiving, polling This property will cause the attachment to be parsed out of the transmitted MIME entity to the filename indicated by the MIME encoding rules. When the property returns, the file will be written to the path indicated.

The AttachmentIndex parameter specifies the index of the item in the array. The size of the array is controlled by the attachment_count property.

Data Type

String

attachment_id property (RNIFReceiver Struct)

Id is a unique content-identifier used within the RosettaNet message to internally reference the attachments.

Syntax

fn attachment_id(&self, AttachmentIndex : i32) -> Result<String, IPWorksEDIError> 
fn set_attachment_id(&self, AttachmentIndex : i32, value : &str) -> Option<IPWorksEDIError> fn set_attachment_id_ref(&self, AttachmentIndex : i32, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

attachment_id is a unique content-identifier used within the RosettaNet message to internally reference the attachments. Because these identifiers are used to reference the attachments, each attachment must have a unique identifier, but they only need to be unique within the scope of the current message. These values may take the form of a URI.

The AttachmentIndex parameter specifies the index of the item in the array. The size of the array is controlled by the attachment_count property.

Data Type

String

attachment_mime_type property (RNIFReceiver Struct)

MimeType is a value indicating how the rnifattachment should be interpreted.

Syntax

fn attachment_mime_type(&self, AttachmentIndex : i32) -> Result<String, IPWorksEDIError> 
fn set_attachment_mime_type(&self, AttachmentIndex : i32, value : &str) -> Option<IPWorksEDIError> fn set_attachment_mime_type_ref(&self, AttachmentIndex : i32, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

attachment_mime_type is a value indicating how the RNIFAttachment should be interpreted. Valid MIME types include, but are not limited to, the following:

  • "plain/html"
  • "plain/text"
  • "image/jpg"
  • "image/gif"
  • "image/bmp"
  • "application/stream"

The AttachmentIndex parameter specifies the index of the item in the array. The size of the array is controlled by the attachment_count property.

Data Type

String

business_activity property (RNIFReceiver Struct)

This property denotes the type of business activity.

Syntax

fn business_activity(&self) -> Result<String, IPWorksEDIError> 
fn set_business_activity(&self, value : &str) -> Option<IPWorksEDIError> fn set_business_activity_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property simply tells the receiver what type of business activity the RosettaNet document that is sent refers to. An example is: "Create Purchase Order".

Data Type

String

cert_effective_date property (RNIFReceiver Struct)

The date on which this certificate becomes valid.

Syntax

fn 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

cert_expiration_date property (RNIFReceiver Struct)

The date on which the certificate expires.

Syntax

fn 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

cert_extended_key_usage property (RNIFReceiver Struct)

A comma-delimited list of extended key usage identifiers.

Syntax

fn 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

cert_fingerprint property (RNIFReceiver Struct)

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

Syntax

fn 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

cert_fingerprint_sha1 property (RNIFReceiver Struct)

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

Syntax

fn 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

cert_fingerprint_sha256 property (RNIFReceiver Struct)

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

Syntax

fn 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

cert_issuer property (RNIFReceiver Struct)

The issuer of the certificate.

Syntax

fn 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

cert_private_key property (RNIFReceiver Struct)

The private key of the certificate (if available).

Syntax

fn 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 cert_private_key may be available but not exportable. In this case, cert_private_key returns an empty string.

This property is read-only.

Data Type

String

cert_private_key_available property (RNIFReceiver Struct)

Whether a PrivateKey is available for the selected certificate.

Syntax

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

Default Value

false

Remarks

Whether a cert_private_key is available for the selected certificate. If 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

cert_private_key_container property (RNIFReceiver Struct)

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

Syntax

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

Default Value

""

Remarks

The name of the 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

cert_public_key property (RNIFReceiver Struct)

The public key of the certificate.

Syntax

fn 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

cert_public_key_algorithm property (RNIFReceiver Struct)

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

Syntax

fn 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

cert_public_key_length property (RNIFReceiver Struct)

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

Syntax

fn 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

cert_serial_number property (RNIFReceiver Struct)

The serial number of the certificate encoded as a string.

Syntax

fn 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

cert_signature_algorithm property (RNIFReceiver Struct)

The text description of the certificate's signature algorithm.

Syntax

fn 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

cert_store property (RNIFReceiver Struct)

The name of the certificate store for the client certificate.

Syntax

fn cert_store(&self) -> Result<Vec<u8>, IPWorksEDIError> 
fn set_cert_store(&self, value : Vec<u8>) -> Option<IPWorksEDIError> fn set_cert_store_ref(&self, value : &[u8]) -> Option<IPWorksEDIError>

Default Value

"MY"

Remarks

The cert_store_type property denotes the type of the certificate store specified by cert_store. If the store is password-protected, specify the password in cert_store_password.

cert_store is used in conjunction with the cert_subject property to specify client certificates. If cert_store has a value, and cert_subject or cert_encoded is set, a search for a certificate is initiated. Please see the 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>

cert_store_password property (RNIFReceiver 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 cert_store_password(&self) -> Result<String, IPWorksEDIError> 
fn set_cert_store_password(&self, value : &str) -> Option<IPWorksEDIError> fn set_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

cert_store_type property (RNIFReceiver Struct)

The type of certificate store for this certificate.

Syntax

fn cert_store_type(&self) -> Result<i32, IPWorksEDIError> 
fn set_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 cert_store_type, the full path of the PKCS#11 DLL as the cert_store, and the PIN as the 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 cert_store and set 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

cert_subject_alt_names property (RNIFReceiver Struct)

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

Syntax

fn 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

cert_thumbprint_md5 property (RNIFReceiver Struct)

The MD5 hash of the certificate.

Syntax

fn 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

cert_thumbprint_sha1 property (RNIFReceiver Struct)

The SHA-1 hash of the certificate.

Syntax

fn 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

cert_thumbprint_sha256 property (RNIFReceiver Struct)

The SHA-256 hash of the certificate.

Syntax

fn 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

cert_usage property (RNIFReceiver Struct)

The text description of UsageFlags .

Syntax

fn 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

cert_usage_flags property (RNIFReceiver Struct)

The flags that show intended use for the certificate.

Syntax

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

Default Value

0

Remarks

The flags that show intended use for the certificate. The value of 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 cert_usage property for a text representation of cert_usage_flags.

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

This property is read-only.

Data Type

i32

cert_version property (RNIFReceiver Struct)

The certificate's version number.

Syntax

fn 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

cert_subject property (RNIFReceiver Struct)

The subject of the certificate used for client authentication.

Syntax

fn cert_subject(&self) -> Result<String, IPWorksEDIError> 
fn set_cert_subject(&self, value : &str) -> Option<IPWorksEDIError> fn set_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

cert_encoded property (RNIFReceiver Struct)

The certificate (PEM/Base64 encoded).

Syntax

fn cert_encoded(&self) -> Result<Vec<u8>, IPWorksEDIError> 
fn set_cert_encoded(&self, value : Vec<u8>) -> Option<IPWorksEDIError> fn set_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 cert_store and cert_subject properties also may be used to specify a certificate.

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

Data Type

Vec<u8>

delivery_header_xml property (RNIFReceiver Struct)

The complete XML data from the Delivery Header.

Syntax

fn delivery_header_xml(&self) -> Result<String, IPWorksEDIError> 
fn set_delivery_header_xml(&self, value : &str) -> Option<IPWorksEDIError> fn set_delivery_header_xml_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property is the full XML data of the RosettaNet message Delivery Header. This header contains information about the sending and receiving business processes, as well as tracking data for the message itself. This header was introduced by RNIF 2.0 to speed the movement of RosettaNet messages through message-forwarding hubs.

This property is an aggregate property containing XML either generated from or parsed into various other properties of the struct. If the value of a related property changes, this property will be updated the next time it is polled and the current valid XML will be returned. When this property is set directly, the struct will automatically parse the XML and validate the content of the header to ensure that all required fields contain appropriate values. Once this property has been set and validated, the following properties will be populated:

NOTE: If rnif_version is set to v1, the value of this property is ignored when generating messages.

Data Type

String

encryption_algorithm property (RNIFReceiver Struct)

The algorithm used to encrypt the EDI data.

Syntax

fn encryption_algorithm(&self) -> Result<String, IPWorksEDIError> 
fn set_encryption_algorithm(&self, value : &str) -> Option<IPWorksEDIError> fn set_encryption_algorithm_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

"AESCBC256"

Remarks

If recipient_certs contains a valid certificate, the data will be encrypted using this certificate and the algorithm specified in encryption_algorithm. If encryption_algorithm is set to the empty string, the data will not be encrypted.

The struct supports "AESCBC256", or industry-standard 256-bit AES-CBC encryption, by default.

The struct supports "AES" encryption with a default keysize of 128 bits. You may also set "AESCBC192", "AESCBC256", "AESGCM128", "AESGCM192", or "AESGCM256" for other AES modes and keysizes. 3DES and DES remain available for legacy interoperability.

Possible values are:

  • 3DES
  • DES
  • AESCBC128
  • AESCBC192
  • AESCBC256 (default)
  • AESGCM128
  • AESGCM192
  • AESGCM256

Data Type

String

encryption_type property (RNIFReceiver Struct)

The encryption type for RNIF 2.0.

Syntax

fn encryption_type(&self) -> Result<i32, IPWorksEDIError> 
fn set_encryption_type(&self, value : i32) -> Option<IPWorksEDIError>

Possible Values

0   // NoEncryption
1 // EncryptServiceContent
2 // EncryptPayloadContainer

Default Value

0

Remarks

RNIF 2.0 allows encryption of a message at three different levels:

0 (etNoEncryption)The entire contents of the RosettaNet message are unencrypted.
1 (etEncryptServiceContent)The service content and attachments are encrypted.
2 (etEncryptPayloadContainer)The service header, content, and attachments are encrypted.

NOTE: By default, the value is etNoEncryption. Therefore, if encryption is desired, the encryption_type property must be specified, even if a certificate is supplied through the certificate properties. See recipient_cert for more information on specifying a certificate for encryption.

Data Type

i32

from_role property (RNIFReceiver Struct)

The business role of the entity that originated this message.

Syntax

fn from_role(&self) -> Result<String, IPWorksEDIError> 
fn set_from_role(&self, value : &str) -> Option<IPWorksEDIError> fn set_from_role_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property describes what role the process sending this message plays in the business model. This may be a one-word description, e.g. "Buyer".

This property is a field of the service header.

Data Type

String

from_service property (RNIFReceiver Struct)

The service that originated this message.

Syntax

fn from_service(&self) -> Result<String, IPWorksEDIError> 
fn set_from_service(&self, value : &str) -> Option<IPWorksEDIError> fn set_from_service_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property describes the type of service that is being provided by the sender of this message. This can be a short description of the service being provided, e.g. "Buyer Service".

This property is a field of the service header.

Data Type

String

global_usage_code property (RNIFReceiver Struct)

A universal code describing basic usage for this message.

Syntax

fn global_usage_code(&self) -> Result<i32, IPWorksEDIError> 
fn set_global_usage_code(&self, value : i32) -> Option<IPWorksEDIError>

Possible Values

0   // Test
1 // Production

Default Value

0

Remarks

global_usage_code is a value that specifies how the RosettaNet message is to be treated from a business standpoint.This property currently only supports the following two values:

  • 0 (gucTest)
  • 1 (gucProduction)

This property is a field of the service header.

Data Type

i32

message_date_time property (RNIFReceiver Struct)

The time at which this message was sent.

Syntax

fn message_date_time(&self) -> Result<String, IPWorksEDIError> 
fn set_message_date_time(&self, value : &str) -> Option<IPWorksEDIError> fn set_message_date_time_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property is a date and time stamp representing the moment the RosettaNet message was created. The sending process should set this value as close to the time when it sends as possible. The accepted standard for date fields in RosettaNet messages uses the format "YYYYMMDDThhmmss.sssZ", e.g. "20001121T145200.000Z". The format is interpreted as follows:

YYYYThis is the year of the time stamp.
MMThis is the month of the time stamp.
DDThis specifies the day of the month.
TThe 'T' denotes the separation between the date and the time stamps.
hhThis is the hour, in 24 hour format in which the message was sent.
mmThis specifies the minutes at which the message was sent.
ss.sss This is the seconds at which the message was sent. Everything after the decimal is a fraction of a seconds.
ZThis is a delimiter for the end of the date/time stamp.

The message in the example was sent at 2:52:00.000 PM November 11, 2000.

This property is a field of the delivery header.

Data Type

String

message_receiver_id property (RNIFReceiver Struct)

Identity of the entity receiving this message.

Syntax

fn message_receiver_id(&self) -> Result<String, IPWorksEDIError> 
fn set_message_receiver_id(&self, value : &str) -> Option<IPWorksEDIError> fn set_message_receiver_id_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

MessageReceiverId describes the identity of the receiver for this message. It is specifically the DUNS number for the trading partner.

This property is a field of the delivery header.

Data Type

String

message_receiver_location property (RNIFReceiver Struct)

Location of the entity receiving this message.

Syntax

fn message_receiver_location(&self) -> Result<String, IPWorksEDIError> 
fn set_message_receiver_location(&self, value : &str) -> Option<IPWorksEDIError> fn set_message_receiver_location_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property describes the location of the receiver for this message. The location is not an address, but may be a city name.

This property is a field of the delivery header.

Data Type

String

message_sender_id property (RNIFReceiver Struct)

Identity of the entity that sent this message.

Syntax

fn message_sender_id(&self) -> Result<String, IPWorksEDIError> 
fn set_message_sender_id(&self, value : &str) -> Option<IPWorksEDIError> fn set_message_sender_id_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

message_sender_id describes the identity of the sender for this message. It is specifically the DUNS number for the trading partner.

This property is a field of the delivery header.

Data Type

String

message_sender_location property (RNIFReceiver Struct)

Location of the entity that sent this message.

Syntax

fn message_sender_location(&self) -> Result<String, IPWorksEDIError> 
fn set_message_sender_location(&self, value : &str) -> Option<IPWorksEDIError> fn set_message_sender_location_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property describes the location of the sender for this message. The location is not an address, but may be a city name.

This property is a field of the delivery header.

Data Type

String

message_tracking_id property (RNIFReceiver Struct)

Unique value that identifies this message.

Syntax

fn message_tracking_id(&self) -> Result<String, IPWorksEDIError> 
fn set_message_tracking_id(&self, value : &str) -> Option<IPWorksEDIError> fn set_message_tracking_id_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

message_tracking_id is a unique instance identifier for this message. This value is used by both parties to keep a record of all the messages it receives. It is the responsibility of the sender to ensure that this value is unique for each transaction. The receiving entity should respond with an error if it receives a message with a previously used tracking id. This value can be used to persist any information relevant to the current business process to an external database .

This property is a field of the delivery header.

Data Type

String

original_action_code property (RNIFReceiver Struct)

The action code of the original message.

Syntax

fn original_action_code(&self) -> Result<String, IPWorksEDIError> 
fn set_original_action_code(&self, value : &str) -> Option<IPWorksEDIError> fn set_original_action_code_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property describes the action code of the original message. This is useful when acquiring or processing replies. This tells a process what the original action was which started the current business process of actions and replies.

This property is a field of the service header.

Data Type

String

original_message_standard_name property (RNIFReceiver Struct)

The name of the standard used to create the original message.

Syntax

fn original_message_standard_name(&self) -> Result<String, IPWorksEDIError> 
fn set_original_message_standard_name(&self, value : &str) -> Option<IPWorksEDIError> fn set_original_message_standard_name_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

While the RosettaNet community has a set of widely adopted, pre-defined and standardized message templates, it also allows for business partners to agree on specification geared more toward their particular needs. If a special, non-RosettaNet standard is to be used to create the action message, the name of the standard must be reported in action_message_standard_name and the version in action_message_standard_version. This way, the receiving entity can know how to process and interpret the incoming business message.

Since replies may sent in response to a message created using such a specialized standard, the standard used to create the original message should be referenced using the original_message_standard_name and original_message_standard_version when creating or processing replies.

This property is a field of the service header.

Data Type

String

original_message_standard_version property (RNIFReceiver Struct)

The version of the standard used to create the original message.

Syntax

fn original_message_standard_version(&self) -> Result<String, IPWorksEDIError> 
fn set_original_message_standard_version(&self, value : &str) -> Option<IPWorksEDIError> fn set_original_message_standard_version_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

While the RosettaNet community has a set of widely adopted, pre-defined and standardized message templates, it also allows for business partners to agree on specification geared more toward their particular needs. If a special, non-RosettaNet standard is to be used to create the action message, the name of the standard must be reported in action_message_standard_name and the version in action_message_standard_version. This way, the receiving entity can know how to process and interpret the incoming business message.

Since replies may sent in response to a message created using such a specialized standard, the standard used to create the original message should be referenced using the original_message_standard_name and original_message_standard_version when creating or processing replies.

This property is a field of the service header.

Data Type

String

original_message_tracking_id property (RNIFReceiver Struct)

Tracking identifier for the original message.

Syntax

fn original_message_tracking_id(&self) -> Result<String, IPWorksEDIError> 
fn set_original_message_tracking_id(&self, value : &str) -> Option<IPWorksEDIError> fn set_original_message_tracking_id_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property contains the identifier used to track the original message. This can be used when processing replies to previous actions to look up details about the original action that started the current business process. Complementary to the message_tracking_id, this property can be used to retrieve any information relevant to the current business process from an external database.

This property is a field of the service header.

Data Type

String

partner_id property (RNIFReceiver Struct)

Identity of the partner.

Syntax

fn partner_id(&self) -> Result<String, IPWorksEDIError> 
fn set_partner_id(&self, value : &str) -> Option<IPWorksEDIError> fn set_partner_id_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

partner_known denotes whether or not the initiating partner for the current transaction is known. If the partner is known the sender should specify their business identifier using the partner_id property. This allows the receiving entity to look up information on how to reply, or forward the current message, to the partner in question. Also, partner_location can be specified. This property is not an address, but may be a city.

NOTE: If the partner is not known, then a partner_url MUST be specified in order for the messages and responses to reach their appropriate destinations.

This property is a field of the service header.

Data Type

String

partner_known property (RNIFReceiver Struct)

Whether or not the partner is known.

Syntax

fn partner_known(&self) -> Result<bool, IPWorksEDIError> 
fn set_partner_known(&self, value : bool) -> Option<IPWorksEDIError>

Default Value

false

Remarks

partner_known denotes whether or not the initiating partner for the current transaction is known. If the partner is known the sender should specify their business identifier using the partner_id property. This allows the receiving entity to look up information on how to reply, or forward the current message, to the partner in question. Also, partner_location can be specified. This property is not an address, but may be a city.

NOTE: If the partner is not known, then a partner_url MUST be specified in order for the messages and responses to reach their appropriate destinations.

This property is a field of the service header.

Data Type

bool

partner_location property (RNIFReceiver Struct)

Location of the partner.

Syntax

fn partner_location(&self) -> Result<String, IPWorksEDIError> 
fn set_partner_location(&self, value : &str) -> Option<IPWorksEDIError> fn set_partner_location_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

partner_known denotes whether or not the initiating partner for the current transaction is known. If the partner is known the sender should specify their business identifier using the partner_id property. This allows the receiving entity to look up information on how to reply, or forward the current message, to the partner in question. Also, partner_location can be specified. This property is not an address, but may be a city.

NOTE: If the partner is not known, then a partner_url MUST be specified in order for the messages and responses to reach their appropriate destinations.

This property is a field of the service header.

Data Type

String

partner_pip_binding_id property (RNIFReceiver Struct)

The partner-defined PIP payload binding ID.

Syntax

fn partner_pip_binding_id(&self) -> Result<String, IPWorksEDIError> 
fn set_partner_pip_binding_id(&self, value : &str) -> Option<IPWorksEDIError> fn set_partner_pip_binding_id_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property is only defined when non-RosettaNet content is bound in the payload portion of the RosettaNet Business message. This may only be used with PIPs which specifically support the use of non-RosettaNet content. Both trading partners must agree on the use of non-RosettaNet content, and on the Id being used. The Id is used to identify the two partners' own version of the PIP used.

NOTE: This property MUST be set when non-RosettaNet content is being sent in the payload, and MUST NOT be set when regular PIP's are being used.

Data Type

String

partner_url property (RNIFReceiver Struct)

A URL to which replies must be sent if the partner is unknown.

Syntax

fn partner_url(&self) -> Result<String, IPWorksEDIError> 
fn set_partner_url(&self, value : &str) -> Option<IPWorksEDIError> fn set_partner_url_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

partner_known denotes whether or not the initiating partner for the current transaction is known. If the partner is known the sender should specify their business identifier using the partner_id property. This allows the receiving entity to look up information on how to reply, or forward the current message, to the partner in question. Also, partner_location can be specified. This property is not an address, but may be a city.

NOTE: If the partner is not known, then a partner_url MUST be specified in order for the messages and responses to reach their appropriate destinations.

This property is a field of the service header.

This property is a field of the service header.

NOTE: If partner is unknown and this value is not specified, further processing may not be possible.

Data Type

String

pip_code property (RNIFReceiver Struct)

RosettaNet PIP code of this message.

Syntax

fn pip_code(&self) -> Result<String, IPWorksEDIError> 
fn set_pip_code(&self, value : &str) -> Option<IPWorksEDIError> fn set_pip_code_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

The service_content of a RosettaNet message is an instance of a pre-defined, widely accepted and standardized RosettaNet business action document called a Partner Interface Process (PIP). These documents define the most common business action scenarios, as well as the most common information used by a company to complete transactions under these scenarios. Each PIP has its own code, and many PIPs are defined in multiple versions. To ensure that the receiving partner knows how to interpret the PIP instance, the code should be set in pip_code and the version in pip_version.

Since no two business actions are exactly the same, each instance of PIP needs to have an associated identifier so that information about the transaction may be easily persisted to and retrieved from an external database. These instance ids are reported by the pip_instance_id property. It is up to the sending client to ensure that this value is unique. The receiver should respond with an error if it receives a PIP instance id that has already been used.

This property is a field of the service header.

Data Type

String

pip_instance_id property (RNIFReceiver Struct)

The Id of this PIP instance.

Syntax

fn pip_instance_id(&self) -> Result<String, IPWorksEDIError> 
fn set_pip_instance_id(&self, value : &str) -> Option<IPWorksEDIError> fn set_pip_instance_id_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

The service_content of a RosettaNet message is an instance of a pre-defined, widely accepted and standardized RosettaNet business action document called a Partner Interface Process (PIP). These documents define the most common business action scenarios, as well as the most common information used by a company to complete transactions under these scenarios. Each PIP has its own code, and many PIPs are defined in multiple versions. To ensure that the receiving partner knows how to interpret the PIP instance, the code should be set in pip_code and the version in pip_version.

Since no two business actions are exactly the same, each instance of PIP needs to have an associated identifier so that information about the transaction may be easily persisted to and retrieved from an external database. These instance ids are reported by the pip_instance_id property. It is up to the sending client to ensure that this value is unique. The receiver should respond with an error if it receives a PIP instance id that has already been used.

This property is a field of the service header.

Data Type

String

pip_version property (RNIFReceiver Struct)

RosettaNet PIP version of this message.

Syntax

fn pip_version(&self) -> Result<String, IPWorksEDIError> 
fn set_pip_version(&self, value : &str) -> Option<IPWorksEDIError> fn set_pip_version_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

The service_content of a RosettaNet message is an instance of a pre-defined, widely accepted and standardized RosettaNet business action document called a Partner Interface Process (PIP). These documents define the most common business action scenarios, as well as the most common information used by a company to complete transactions under these scenarios. Each PIP has its own code, and many PIPs are defined in multiple versions. To ensure that the receiving partner knows how to interpret the PIP instance, the code should be set in pip_code and the version in pip_version.

Since no two business actions are exactly the same, each instance of PIP needs to have an associated identifier so that information about the transaction may be easily persisted to and retrieved from an external database. These instance ids are reported by the pip_instance_id property. It is up to the sending client to ensure that this value is unique. The receiver should respond with an error if it receives a PIP instance id that has already been used.

This property is a field of the service header.

Data Type

String

preamble_header_xml property (RNIFReceiver Struct)

The complete XML data from the Preamble Header.

Syntax

fn preamble_header_xml(&self) -> Result<String, IPWorksEDIError> 
fn set_preamble_header_xml(&self, value : &str) -> Option<IPWorksEDIError> fn set_preamble_header_xml_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

The contents of preamble_header_xml are the full XML data RosettaNet message Preamble Header. This header includes information about the version of the RosettaNet Implementation Framework (RNIF) protocol used to create the message.

This property is an aggregate property containing XML either generated from or parsed into various other properties of the struct. If the value of a related property changes, this property will be updated the next time it is polled and the current valid XML will be returned. When this property is set directly, the struct will automatically parse the XML and validate the content of the header to ensure that all required fields contain appropriate values. Once this property has been set and validated, the following properties will be populated:

Data Type

String

qos_specification_count property (RNIFReceiver Struct)

The number of records in the QOSSpecification arrays.

Syntax

fn qos_specification_count(&self) -> Result<i32, IPWorksEDIError> 
fn set_qos_specification_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 qos_specification_count - 1.

Data Type

i32

qos_specification_code property (RNIFReceiver Struct)

Code is a string representing a quality of service measurement category.

Syntax

fn qos_specification_code(&self, QOSIndex : i32) -> Result<String, IPWorksEDIError> 
fn set_qos_specification_code(&self, QOSIndex : i32, value : &str) -> Option<IPWorksEDIError> fn set_qos_specification_code_ref(&self, QOSIndex : i32, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

qos_specification_code is a string representing a quality of service measurement category.

The QOSIndex parameter specifies the index of the item in the array. The size of the array is controlled by the qos_specification_count property.

Data Type

String

qos_specification_value property (RNIFReceiver Struct)

Value is a string that defines the constraints for the category in Code .

Syntax

fn qos_specification_value(&self, QOSIndex : i32) -> Result<String, IPWorksEDIError> 
fn set_qos_specification_value(&self, QOSIndex : i32, value : &str) -> Option<IPWorksEDIError> fn set_qos_specification_value_ref(&self, QOSIndex : i32, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

qos_specification_value is a string that defines the constraints for the category in qos_specification_code.

The QOSIndex parameter specifies the index of the item in the array. The size of the array is controlled by the qos_specification_count property.

Data Type

String

recipient_cert_effective_date property (RNIFReceiver Struct)

The date on which this certificate becomes valid.

Syntax

fn recipient_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

recipient_cert_expiration_date property (RNIFReceiver Struct)

The date on which the certificate expires.

Syntax

fn recipient_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

recipient_cert_extended_key_usage property (RNIFReceiver Struct)

A comma-delimited list of extended key usage identifiers.

Syntax

fn recipient_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

recipient_cert_fingerprint property (RNIFReceiver Struct)

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

Syntax

fn recipient_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

recipient_cert_fingerprint_sha1 property (RNIFReceiver Struct)

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

Syntax

fn recipient_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

recipient_cert_fingerprint_sha256 property (RNIFReceiver Struct)

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

Syntax

fn recipient_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

recipient_cert_issuer property (RNIFReceiver Struct)

The issuer of the certificate.

Syntax

fn recipient_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

recipient_cert_private_key property (RNIFReceiver Struct)

The private key of the certificate (if available).

Syntax

fn recipient_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 recipient_cert_private_key may be available but not exportable. In this case, recipient_cert_private_key returns an empty string.

This property is read-only.

Data Type

String

recipient_cert_private_key_available property (RNIFReceiver Struct)

Whether a PrivateKey is available for the selected certificate.

Syntax

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

Default Value

false

Remarks

Whether a recipient_cert_private_key is available for the selected certificate. If recipient_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

recipient_cert_private_key_container property (RNIFReceiver Struct)

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

Syntax

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

Default Value

""

Remarks

The name of the recipient_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

recipient_cert_public_key property (RNIFReceiver Struct)

The public key of the certificate.

Syntax

fn recipient_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

recipient_cert_public_key_algorithm property (RNIFReceiver Struct)

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

Syntax

fn recipient_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

recipient_cert_public_key_length property (RNIFReceiver Struct)

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

Syntax

fn recipient_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

recipient_cert_serial_number property (RNIFReceiver Struct)

The serial number of the certificate encoded as a string.

Syntax

fn recipient_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

recipient_cert_signature_algorithm property (RNIFReceiver Struct)

The text description of the certificate's signature algorithm.

Syntax

fn recipient_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

recipient_cert_store property (RNIFReceiver Struct)

The name of the certificate store for the client certificate.

Syntax

fn recipient_cert_store(&self) -> Result<Vec<u8>, IPWorksEDIError> 
fn set_recipient_cert_store(&self, value : Vec<u8>) -> Option<IPWorksEDIError> fn set_recipient_cert_store_ref(&self, value : &[u8]) -> Option<IPWorksEDIError>

Default Value

"MY"

Remarks

The recipient_cert_store_type property denotes the type of the certificate store specified by recipient_cert_store. If the store is password-protected, specify the password in recipient_cert_store_password.

recipient_cert_store is used in conjunction with the recipient_cert_subject property to specify client certificates. If recipient_cert_store has a value, and recipient_cert_subject or recipient_cert_encoded is set, a search for a certificate is initiated. Please see the recipient_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>

recipient_cert_store_password property (RNIFReceiver 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 recipient_cert_store_password(&self) -> Result<String, IPWorksEDIError> 
fn set_recipient_cert_store_password(&self, value : &str) -> Option<IPWorksEDIError> fn set_recipient_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

recipient_cert_store_type property (RNIFReceiver Struct)

The type of certificate store for this certificate.

Syntax

fn recipient_cert_store_type(&self) -> Result<i32, IPWorksEDIError> 
fn set_recipient_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 recipient_cert_store_type, the full path of the PKCS#11 DLL as the recipient_cert_store, and the PIN as the recipient_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 recipient_cert_store and set recipient_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

recipient_cert_subject_alt_names property (RNIFReceiver Struct)

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

Syntax

fn recipient_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

recipient_cert_thumbprint_md5 property (RNIFReceiver Struct)

The MD5 hash of the certificate.

Syntax

fn recipient_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

recipient_cert_thumbprint_sha1 property (RNIFReceiver Struct)

The SHA-1 hash of the certificate.

Syntax

fn recipient_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

recipient_cert_thumbprint_sha256 property (RNIFReceiver Struct)

The SHA-256 hash of the certificate.

Syntax

fn recipient_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

recipient_cert_usage property (RNIFReceiver Struct)

The text description of UsageFlags .

Syntax

fn recipient_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

recipient_cert_usage_flags property (RNIFReceiver Struct)

The flags that show intended use for the certificate.

Syntax

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

Default Value

0

Remarks

The flags that show intended use for the certificate. The value of recipient_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 recipient_cert_usage property for a text representation of recipient_cert_usage_flags.

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

This property is read-only.

Data Type

i32

recipient_cert_version property (RNIFReceiver Struct)

The certificate's version number.

Syntax

fn recipient_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

recipient_cert_subject property (RNIFReceiver Struct)

The subject of the certificate used for client authentication.

Syntax

fn recipient_cert_subject(&self) -> Result<String, IPWorksEDIError> 
fn set_recipient_cert_subject(&self, value : &str) -> Option<IPWorksEDIError> fn set_recipient_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

recipient_cert_encoded property (RNIFReceiver Struct)

The certificate (PEM/Base64 encoded).

Syntax

fn recipient_cert_encoded(&self) -> Result<Vec<u8>, IPWorksEDIError> 
fn set_recipient_cert_encoded(&self, value : Vec<u8>) -> Option<IPWorksEDIError> fn set_recipient_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 recipient_cert_store and recipient_cert_subject properties also may be used to specify a certificate.

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

Data Type

Vec<u8>

reply_message property (RNIFReceiver Struct)

Whether or not this message is a reply to another message.

Syntax

fn reply_message(&self) -> Result<bool, IPWorksEDIError> 
fn set_reply_message(&self, value : bool) -> Option<IPWorksEDIError>

Default Value

false

Remarks

This property is a boolean value indicating whether or not the message is a reply to a previous message or not. The first message in any business process is always an action message. Reply messages may be an update, another action, or a signal.

Some actions may request data, in which case a reply RosettaNet message must be sent with the data that was requested. All action messages sent in response to the original action message are considered replies.

When sending a reply, this property should be set to "True" to tell the receiver how to interpret and handle the message.

This property is a field of the service header.

Data Type

bool

request property (RNIFReceiver Struct)

The HTTP request to be processed.

Syntax

fn request(&self) -> Result<Vec<u8>, IPWorksEDIError> 
fn set_request(&self, value : Vec<u8>) -> Option<IPWorksEDIError> fn set_request_ref(&self, value : &[u8]) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property holds the body of the request to be processed. The HTTP headers may be set separately in request_headers or may be included in request. If they are included, a double CRLF pair should be used to separate the headers from the body.

When read_request is called the contents of request are overwritten.

Data Type

Vec<u8>

request_header_count property (RNIFReceiver Struct)

The number of records in the RequestHeader arrays.

Syntax

fn request_header_count(&self) -> Result<i32, IPWorksEDIError> 
fn set_request_header_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 request_header_count - 1.

Data Type

i32

request_header_field property (RNIFReceiver Struct)

This property contains the name of the HTTP header (this is the same case as it is delivered).

Syntax

fn request_header_field(&self, RequestHeaderIndex : i32) -> Result<String, IPWorksEDIError> 
fn set_request_header_field(&self, RequestHeaderIndex : i32, value : &str) -> Option<IPWorksEDIError> fn set_request_header_field_ref(&self, RequestHeaderIndex : i32, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property contains the name of the HTTP Header (this is the same case as it is delivered).

The RequestHeaderIndex parameter specifies the index of the item in the array. The size of the array is controlled by the request_header_count property.

Data Type

String

request_header_value property (RNIFReceiver Struct)

This property contains the header contents.

Syntax

fn request_header_value(&self, RequestHeaderIndex : i32) -> Result<String, IPWorksEDIError> 
fn set_request_header_value(&self, RequestHeaderIndex : i32, value : &str) -> Option<IPWorksEDIError> fn set_request_header_value_ref(&self, RequestHeaderIndex : i32, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property contains the Header contents.

The RequestHeaderIndex parameter specifies the index of the item in the array. The size of the array is controlled by the request_header_count property.

Data Type

String

request_headers_string property (RNIFReceiver Struct)

The HTTP headers in the RNIF request.

Syntax

fn request_headers_string(&self) -> Result<String, IPWorksEDIError> 
fn set_request_headers_string(&self, value : &str) -> Option<IPWorksEDIError> fn set_request_headers_string_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

The entire list of headers, concatenated into a single string. These will include RNIF-specific headers as well as general HTTP headers. You may access specific headers through request_headers.

When assigning an RNIF request to the component, the headers may be included in request or specified separately in request_headers or request_headers_string. If the headers are included in request they will be parsed out whenever read_request, parse_request, or process_request is invoked.

Data Type

String

response_type property (RNIFReceiver Struct)

Requested response type. Available only in RNIF 2.0.

Syntax

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

Possible Values

0   // Sync
1 // Async

Default Value

0

Remarks

This property tells the receiver which type of response the sender is expecting.

The following types of supported responses are:

rtSyncThe response will be received on the same HTTP session as the initial request.
rtAsyncThe response will be received later.

This property is only available in RNIF version 2.0.

This property is read-only.

Data Type

i32

rnif_version property (RNIFReceiver Struct)

The RNIF Standard Version used to generate this message.

Syntax

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

Possible Values

0   // 1
1 // 2

Default Value

0

Remarks

This property describes which standard version of RNIF was used to generate this message. Possible values are::

v1RosettaNet version 1.1
v2RosettaNet version 2.0

This property is read-only.

Data Type

i32

secure_transport_required property (RNIFReceiver Struct)

Indicates that security is required when forwarding this message.

Syntax

fn secure_transport_required(&self) -> Result<bool, IPWorksEDIError> 
fn set_secure_transport_required(&self, value : bool) -> Option<IPWorksEDIError>

Default Value

false

Remarks

This property is a boolean value which denotes whether or not security is required when forwarding this message. Since RosettaNet messages are business messages, secure transport is often required. See RNIFSender for more information on sending messages over a secure transport.

This property is a field of the delivery header.

Data Type

bool

service_content property (RNIFReceiver Struct)

The PIP message data.

Syntax

fn service_content(&self) -> Result<String, IPWorksEDIError> 
fn set_service_content(&self, value : &str) -> Option<IPWorksEDIError> fn set_service_content_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

The ServiceContent property contains the PIP message data. This is the body of the message which contains the request, action, or reply being sent from one business process to another.

There are specific formats to which this data must adhere. These formats are specified by the RosettaNet community in the form of Partner Interface Processes (PIPs). Each PIP instance also has an ID associated with it which is stored in the pip_instance_id property.

Data Type

String

service_header_xml property (RNIFReceiver Struct)

The complete XML data from the Service Header.

Syntax

fn service_header_xml(&self) -> Result<String, IPWorksEDIError> 
fn set_service_header_xml(&self, value : &str) -> Option<IPWorksEDIError> fn set_service_header_xml_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

service_header_xml contains the full XML data of the RosettaNet message Service Header. This header includes information about the contents of the RosettaNet message itself. It contains information about the type of message, the PIP used to create the service content, and the various attachments as well as information about the business partners involved in the transaction, such as each entity's role.

This property is an aggregate property containing XML either generated from or parsed into various other properties of the struct. If the value of a related property changes, this property will be updated the next time it is polled and the current valid XML will be returned. When this property is set directly, the struct will automatically parse the XML and validate the content of the header to ensure that all required fields contain appropriate values. Once this property has been set and validated, the following properties will be populated:

Data Type

String

signal_code property (RNIFReceiver Struct)

The code for this signal.

Syntax

fn signal_code(&self) -> Result<String, IPWorksEDIError> 
fn set_signal_code(&self, value : &str) -> Option<IPWorksEDIError> fn set_signal_code_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This is the code for the signal message received. This property is only set if the message is a signal. The code denotes what type of signal is being received, or sent.

Data Type

String

signal_message property (RNIFReceiver Struct)

Whether or not this message is a signal.

Syntax

fn signal_message(&self) -> Result<bool, IPWorksEDIError> 
fn set_signal_message(&self, value : bool) -> Option<IPWorksEDIError>

Default Value

false

Remarks

signal_message is a boolean value indicating whether or not the message is a signal. Signals do not contain content that is of business nature. Instead, they are simply acknowledgments to business actions.

RNIF 2.0 specifies two types of signals: a positive, and a negative. A positive signal has all of the properties of a valid RosettaNet action message, however it is simply an acknowledgement of receipt of a valid Business Action message. A negative signal is an acknowledgement sent to notify the originating entity of an error. In RNIF 2.0, there is only one type of exception message, as opposed to the three types in RNIF 1.1.

NOTE: only Business Actions may be acknowledged, Signals cannot.

This property is a field of the service header.

Data Type

bool

signal_version property (RNIFReceiver Struct)

The version of this signal.

Syntax

fn signal_version(&self) -> Result<String, IPWorksEDIError> 
fn set_signal_version(&self, value : &str) -> Option<IPWorksEDIError> fn set_signal_version_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This is the version for the signal message received. This property is only set if the message is a signal. The version denotes what version of signal is being received, or sent.

Data Type

String

signer_cert_effective_date property (RNIFReceiver Struct)

The date on which this certificate becomes valid.

Syntax

fn signer_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

signer_cert_expiration_date property (RNIFReceiver Struct)

The date on which the certificate expires.

Syntax

fn signer_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

signer_cert_extended_key_usage property (RNIFReceiver Struct)

A comma-delimited list of extended key usage identifiers.

Syntax

fn signer_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

signer_cert_fingerprint property (RNIFReceiver Struct)

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

Syntax

fn signer_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

signer_cert_fingerprint_sha1 property (RNIFReceiver Struct)

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

Syntax

fn signer_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

signer_cert_fingerprint_sha256 property (RNIFReceiver Struct)

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

Syntax

fn signer_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

signer_cert_issuer property (RNIFReceiver Struct)

The issuer of the certificate.

Syntax

fn signer_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

signer_cert_private_key property (RNIFReceiver Struct)

The private key of the certificate (if available).

Syntax

fn signer_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 signer_cert_private_key may be available but not exportable. In this case, signer_cert_private_key returns an empty string.

This property is read-only.

Data Type

String

signer_cert_private_key_available property (RNIFReceiver Struct)

Whether a PrivateKey is available for the selected certificate.

Syntax

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

Default Value

false

Remarks

Whether a signer_cert_private_key is available for the selected certificate. If signer_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

signer_cert_private_key_container property (RNIFReceiver Struct)

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

Syntax

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

Default Value

""

Remarks

The name of the signer_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

signer_cert_public_key property (RNIFReceiver Struct)

The public key of the certificate.

Syntax

fn signer_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

signer_cert_public_key_algorithm property (RNIFReceiver Struct)

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

Syntax

fn signer_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

signer_cert_public_key_length property (RNIFReceiver Struct)

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

Syntax

fn signer_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

signer_cert_serial_number property (RNIFReceiver Struct)

The serial number of the certificate encoded as a string.

Syntax

fn signer_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

signer_cert_signature_algorithm property (RNIFReceiver Struct)

The text description of the certificate's signature algorithm.

Syntax

fn signer_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

signer_cert_store property (RNIFReceiver Struct)

The name of the certificate store for the client certificate.

Syntax

fn signer_cert_store(&self) -> Result<Vec<u8>, IPWorksEDIError> 
fn set_signer_cert_store(&self, value : Vec<u8>) -> Option<IPWorksEDIError> fn set_signer_cert_store_ref(&self, value : &[u8]) -> Option<IPWorksEDIError>

Default Value

"MY"

Remarks

The signer_cert_store_type property denotes the type of the certificate store specified by signer_cert_store. If the store is password-protected, specify the password in signer_cert_store_password.

signer_cert_store is used in conjunction with the signer_cert_subject property to specify client certificates. If signer_cert_store has a value, and signer_cert_subject or signer_cert_encoded is set, a search for a certificate is initiated. Please see the signer_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>

signer_cert_store_password property (RNIFReceiver 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 signer_cert_store_password(&self) -> Result<String, IPWorksEDIError> 
fn set_signer_cert_store_password(&self, value : &str) -> Option<IPWorksEDIError> fn set_signer_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

signer_cert_store_type property (RNIFReceiver Struct)

The type of certificate store for this certificate.

Syntax

fn signer_cert_store_type(&self) -> Result<i32, IPWorksEDIError> 
fn set_signer_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 signer_cert_store_type, the full path of the PKCS#11 DLL as the signer_cert_store, and the PIN as the signer_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 signer_cert_store and set signer_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

signer_cert_subject_alt_names property (RNIFReceiver Struct)

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

Syntax

fn signer_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

signer_cert_thumbprint_md5 property (RNIFReceiver Struct)

The MD5 hash of the certificate.

Syntax

fn signer_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

signer_cert_thumbprint_sha1 property (RNIFReceiver Struct)

The SHA-1 hash of the certificate.

Syntax

fn signer_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

signer_cert_thumbprint_sha256 property (RNIFReceiver Struct)

The SHA-256 hash of the certificate.

Syntax

fn signer_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

signer_cert_usage property (RNIFReceiver Struct)

The text description of UsageFlags .

Syntax

fn signer_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

signer_cert_usage_flags property (RNIFReceiver Struct)

The flags that show intended use for the certificate.

Syntax

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

Default Value

0

Remarks

The flags that show intended use for the certificate. The value of signer_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 signer_cert_usage property for a text representation of signer_cert_usage_flags.

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

This property is read-only.

Data Type

i32

signer_cert_version property (RNIFReceiver Struct)

The certificate's version number.

Syntax

fn signer_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

signer_cert_subject property (RNIFReceiver Struct)

The subject of the certificate used for client authentication.

Syntax

fn signer_cert_subject(&self) -> Result<String, IPWorksEDIError> 
fn set_signer_cert_subject(&self, value : &str) -> Option<IPWorksEDIError> fn set_signer_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

signer_cert_encoded property (RNIFReceiver Struct)

The certificate (PEM/Base64 encoded).

Syntax

fn signer_cert_encoded(&self) -> Result<Vec<u8>, IPWorksEDIError> 
fn set_signer_cert_encoded(&self, value : Vec<u8>) -> Option<IPWorksEDIError> fn set_signer_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 signer_cert_store and signer_cert_subject properties also may be used to specify a certificate.

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

Data Type

Vec<u8>

standard_name property (RNIFReceiver Struct)

The name of the standard used to create this message.

Syntax

fn standard_name(&self) -> Result<String, IPWorksEDIError> 
fn set_standard_name(&self, value : &str) -> Option<IPWorksEDIError> fn set_standard_name_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property is the name of the standard which was used to create the message. In this case, we are working with RosettaNet, so RosettaNet will always be the StandardName, unless this specification is used to send a non-RosettaNet type message. The type name and version must be specified when this occurs.

This property is a field of the preamble.

Data Type

String

standard_version property (RNIFReceiver Struct)

The version of the standard used to create this message.

Syntax

fn standard_version(&self) -> Result<String, IPWorksEDIError> 
fn set_standard_version(&self, value : &str) -> Option<IPWorksEDIError> fn set_standard_version_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

StandardVersion describes the version of the standard used to create this message. In this case, the standard being used is RosettaNet. Therefore, the version will be which version of RosettaNet the sender is using.

This property is a field of the preamble.

Data Type

String

to_role property (RNIFReceiver Struct)

The role of the entity receiving this message.

Syntax

fn to_role(&self) -> Result<String, IPWorksEDIError> 
fn set_to_role(&self, value : &str) -> Option<IPWorksEDIError> fn set_to_role_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This describes what role the process receiving this message plays in the business model. This may be a one-word description, e.g. "Seller".

This property is a field of the service header.

Data Type

String

to_service property (RNIFReceiver Struct)

The service for which this message is bound.

Syntax

fn to_service(&self) -> Result<String, IPWorksEDIError> 
fn set_to_service(&self, value : &str) -> Option<IPWorksEDIError> fn set_to_service_ref(&self, value : &String) -> Option<IPWorksEDIError>

Default Value

""

Remarks

This property describes the type of service that is being provided by the receiver of this message. This can be a short description of the service being provided, e.g. "Seller Service".

This property is a field of the service header.

Data Type

String

config method (RNIFReceiver 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.

parse_headers method (RNIFReceiver Struct)

Processes the headers, and populates the appropriate properties.

Syntax

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

Remarks

When this method is called, the headers are parsed from the HTTP request. Based on the headers, the struct will set the rnif_version and response_type properties. After parse_headers is called, these two properties should be polled to determine how the message should be handled.

parse_request method (RNIFReceiver Struct)

Parses the MIME message in the Request property.

Syntax

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

Remarks

Once the message is acquired from the sender and the rnif_version and response_type properties have been parsed out, this method should be called to MIME decode the RosettaNet message, verify the signature if present, and decrypt the service content if needed. The preamble_header_xml, delivery_header_xml, service_header_xml and service_content properties are all populated, as well as the attachment properties, if any exist.

NOTE: before calling this method, the message must be read from the server via a call to read_request.

read_request method (RNIFReceiver Struct)

Reads the RNIF request from the given HTTP servlet request.

Syntax

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

Remarks

This method acquires the request from the HTTP servlet. Once this is done, read_request then calls parse_headers, which parses the headers for the acquired message.

request_header method (RNIFReceiver Struct)

Gets the specified header from the HTTP request.

Syntax

fn request_header(&self, header : &str) -> Result<String, IPWorksEDIError>

Remarks

This method is invoked to return a specific header from the HTTP request. Header is the name of a header from the incoming HTTP request. The method will return either the value of that header or the empty string if the header did not exist.

reset method (RNIFReceiver Struct)

This property is used to reset all attributes of the Rnifreceiver instance.

Syntax

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

Remarks

reset is used to reset all attributes of the Rnifreceiver instance including the headers, attachments, etc. to their default values. This may be useful when multiple messages need to be created.

NOTE: The application should always call Reset and set all message properties to valid value before sending a response message.

send_response method (RNIFReceiver Struct)

Optional. Acknowledges the incoming request.

Syntax

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

Remarks

This sends a signal to the client. The signal may be a receipt of acknowledgement or a notification of failure. send_response will send the response message synchronously over the original HTTP connection. If an asynchronous response is requested by the client or required by the PIP, you should use the RNIFSender.

NOTE: This method does not create the RosettaNet acknowledgement receipt or notification of failure, it simply sends it. You must create the response message and set it via the service_content, along with setting the headers to valid values, before you calling this method.

on_error event (RNIFReceiver Struct)

Fired when information is available about errors during data delivery.

Syntax

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

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

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

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.

Config Settings (RNIFReceiver 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.

RNIFReceiver Config Settings

AttachmentOutputPath:   Specifies a path on disk to which attachments will be saved.

This setting specifies a path on disk to which attachments will be saved when processing incoming messages.

ExpectedVersion:   The RNIF document version that the RNIFReceiver is expecting to receive.

This configuration option allow you to explicitly define the RNIF version of the document that you are expecting to receive. If this value is set, the struct will not attempt to parse the RNIF version from the received headers and will attempt to process the received document as an RNIF document of the version specified in this configuration option.

OptionEffect
0 (default)No expected version. Parses the RNIF version from received headers and process document based on this.
1Expect RNIF v1.1 document.
2Expect RNIF v2.0 document.
FromPartnerClassificationCode:   Code identifying the sending partner's function in the supply chain.

GlobalProcessCode:   Business process identifier e.g. 'Manage Product Subscriptions'. This code is the name of a PIP specification document.

HTTPStatusCode:   The HTTP status code to send in the response.

If set, this defines the HTTP status code returned by the struct when send_response is called. By default the struct will return a HTTP status code of 200.

MessageDigest:   The base-64 encoded hash of the received data.

This configuration setting will return the base-64 encoded hash of the received data.

RequireEncryption:   Whether encryption is required when processing received messages.

This setting may be set to True to require that received messages are encrypted. When True if a message is received that is not encrypted the struct will throw an exception. The default value is False.

RequireSignature:   Whether a signature is required when processing received messages.

This setting may be set to True to require that received messages are signed. When True if a message is received that is not signed the struct will throw an exception. The default value is False.

SignatureAlgorithm:   Signature algorithm to be used in outgoing messages.

Signature Algorithm can be set to md5 or sha1, to indicate the preferred signing algorithm.

ToPartnerClassificationCode:   Code identifying the receiving partner's function in the supply chain.

TransactionCode:   Service transaction dialog. The code is the name of the business activity and the transaction dialog in the PIP specification document.

TransactionId:   A unique alpha-numeric identifier that represents a specific instance of an business process, business transaction, business action or business signal. The instance identifier must be unique for a particular instance of a business process, business transaction, business action and business signal.

TransferredData:   The full body of the incoming request.

After calling parse_request this will contain the full body of the incoming request.

TransferredHeaders:   The HTTP headers of the incoming request.

After calling parse_request this will contain the full HTTP headers of the incoming request.

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 (RNIFReceiver Struct)

SMIME Errors

10191   Invalid index (RecipientIndex).
10192   Message decoding error (code).
10193   Unexpected message type.
10194   Unsupported hashing/signing algorithm.
10195   The message does not have any signers.
10196   The message signature could not be verified.
10197   Could not locate a suitable decryption certificate.
10198   The signer certificate could not be found.
10199   No signing certificate was supplied for signing the message.
10201   The specified certificate was not the one required.
10202   The specified certificate could not be found.
10221   Could not acquire CSP.
10222   Type validation error.
10223   Unsupported key size.
10224   Unrecognized Content-Type object identifier.
10225   Unrecognized public key format.
10226   No choices specified.
10228   Must specify output stream.
10280   Error decoding certificate.
10281   Unknown MIME type.
10283   No MIME-boundary found.

XML Errors

101   Invalid attribute index.
102   No attributes available.
103   Invalid namespace index.
104   No namespaces available.
105   Invalid element index.
106   No elements available.
107   Attribute does not exist.
201   Unbalanced element tag.
202   Unknown element prefix (cannot find namespace).
203   Unknown attribute prefix (cannot find namespace).
204   Invalid XML markup.
205   Invalid end state for parser.
206   Document contains unbalanced elements.
207   Invalid xpath.
208   No such child.
209   Top element does not match start of path.
210   DOM tree unavailable (set build_dom to true and reparse).
302   Cannot open file.
401   Invalid XML would be generated.
402   An invalid XML name has been specified.