IPWorks EDI 2020 Delphi Edition

Questions / Feedback?

CEMDetail Type

This type defines details about the CEM request.

Remarks

This type defines details about the CEM request. Not all fields are applicable for all operations.

Fields

Accepted
Boolean

Whether the CEM request is accepted.

Before calling SendCEMResponse set this to True to accept the CEM request.

When processing a CEM response check this property to determine if the request was accepted.

CertId
String

A user defined identifier for the certificate.

This property defines a user specified identifier for the certificate. This may be set to a value which helps the recipient identify the certificate. For instance "CompanyA.Encryption.Cert.2014".

This property may be set before calling SendCEMRequest or SendCEMResponse from AS2Sender.

This property may be queried when received a CEM request or response with AS2Receiver.

CertIssuer
String

This property holds the issuer of the certificate. This may be queried when receiving a CEM request with AS2Receiver. This may be set before calling SendCEMResponse with AS2Sender.

CertSerialNumber
String

This property holds the serial number of the certificate. This may be queried when receiving a CEM request with AS2Receiver. This may be set before calling SendCEMResponse with AS2Sender.

CertStore
String

The name of the certificate store for the certificate.

This property defines the store location for the type specified by CertStoreType.

Designations of certificate stores are platform-dependent.

The following are designations of 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 PFXFile, this property must be set to the name of the file. When the type is PFXBlob, the property must be set to the binary contents of a PFX file (i.e. PKCS12 certificate store).

CertStoreB
TBytes

The name of the certificate store for the certificate.

This property defines the store location for the type specified by CertStoreType.

Designations of certificate stores are platform-dependent.

The following are designations of 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 PFXFile, this property must be set to the name of the file. When the type is PFXBlob, the property must be set to the binary contents of a PFX file (i.e. PKCS12 certificate store).

CertStorePassword
String

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

CertStoreType
TibeCertStoreTypes

The type of certificate store for this certificate.

The component supports both public and private keys in a variety of formats. When the cstAuto value is used the component 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 (PKCS12) file containing certificates.
3 (cstPFXBlob)The certificate store is a string (binary or base64-encoded) representing a certificate store in PFX (PKCS12) 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 PKCS7 file containing certificates.
12 (cstP7BBlob)The certificate store is a string (binary) representing a certificate store in PKCS7 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).
20 (cstSecurityKey)The certificate is present on a physical security key accessible via a PKCS11 interface.

To use a security key the necessary data must first be collected using the CertMgr component. The ListStoreCertificates method may be called after setting CertStoreType to cstSecurityKey, CertStorePassword to the PIN, and CertStore to the full path of the PKCS11 dll. The certificate information returned in the CertList event's CertEncoded parameter may be saved for later use.

When using a certificate, pass the previously saved security key information as the Store and set StorePassword to the PIN.

Code Example: SSH Authentication with Security Key

certmgr.CertStoreType = CertStoreTypes.cstSecurityKey;
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.cstSecurityKey, secKeyBlob, "123456", "*");
sftp.SSHUser = "test";
sftp.SSHLogon("myhost", 22);

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.
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.

CertSubject
String

The subject of the certificate.

This property must be set after all other certificate properites are set. When this property is set, a search is performed in the current certificate store certificate with 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=support@nsoftware.com". Common fields and their meanings are displayed below.

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

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

CertUsage
Integer

This property defines which usages are applicable to the certificate. This may be set to a binary 'OR' of one or more of the following values:

  • 1 (TLS Client)
  • 2 (TLS Server)
  • 4 (Encryption)
  • 8 (Signature)
The default value is "15", meaning all usages are allowed.

RejectionReason
String

If Accepted is False this property specifies the reason a request was rejected.

When using AS2Sender this may be set to a string value which the recipient will see.

When using AS2Receiver query this property for details on why the request was rejected.

RespondByDate
String

This property specifies the date by which the other party should respond. If the other party does not respond the new certificate may be used without any further notice. This property exists to assist the recipient in knowing when they should respond by. It does not guarantee a response by the specified date.

The format is of the XML standard dateTime type expressed in local time with UTC offset. For instance: "2005-08-31T00:21:00-05:00".

When using AS2Sender set this before calling SendCEMRequest.

When using AS2Receiver this property may be queried.

ResponseURL
String

This property defines the URL to which the response should be sent.

When using AS2Sender set this property before calling SendCEMRequest. This tells the recipient where to send the response.

When using AS2Receiver query this property to determine the URL where the response should be sent.

Constructors

constructor Create();

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks EDI 2020 Delphi Edition - Version 20.0 [Build 8203]