SOAPQuickSigner Module
Properties Methods Events Config Settings Errors
The SOAPQuickSigner module signs SOAP messages.
Syntax
SecureBlackbox.Soapquicksigner
Remarks
The purpose of the SOAPQuickSigner class is creating simple generic signatures over SOAP messages. Unlike SOAPSigner, it does not include chain validation and LTV features, and may be more appropriate for scenarios where no chain validation is required.
Property List
The following is the full list of the properties of the module with short descriptions. Click on the links for further details.
CanonicalizationMethod | Specifies XML canonicalization method to use. |
EmbedCertificateMethod | Controls the certificate disposition within the signature. |
Encoding | Specifies XML encoding. |
ExternalCrypto | Provides access to external signing and DC parameters. |
FIPSMode | Reserved. |
HashAlgorithm | Specifies the hash algorithm to be used. |
InputFile | Specifies the SOAP message to be signed. |
OutputFile | A file where the signed SOAP message will be saved. |
References | A list of references to the data to be signed. |
SecurityHeaderIndex | Specifies the SecurityHeader index. |
SignatureType | The SOAP signature type to use. |
SigningCertificate | The certificate to be used for signing. |
SigningChain | The signing certificate chain. |
XPathNamespaces | Specifies namespaces for XPath expression. |
Method List
The following is the full list of the methods of the module with short descriptions. Click on the links for further details.
AddBodyReference | Creates a new XML reference to the Body element of the SOAP message. |
AddDataReference | Creates a new XML reference to the specified data. |
AddReference | Creates a new XML reference to the specified XML element. |
Config | Sets or retrieves a configuration setting. |
DoAction | Performs an additional action. |
ExtractAsyncData | Extracts user data from the DC signing service response. |
GetInnerXML | Get the inner XML content of the selected XML element. |
GetOuterXML | Get the outer XML content of the selected XML element. |
GetTextContent | Get the text content of the selected XML element. |
SetInnerXML | Set the inner XML content of the selected XML element. |
SetTextContent | Set the text content of the selected XML element. |
Sign | Signs the SOAP message. |
SignAsyncBegin | Initiates the asynchronous signing operation. |
SignAsyncEnd | Completes the asynchronous signing operation. |
SignExternal | Signs the document using an external signing facility. |
Event List
The following is the full list of the events fired by the module with short descriptions. Click on the links for further details.
Error | Information about errors during signing. |
ExternalSign | Handles remote or external signing initiated by the SignExternal method or other source. |
FormatElement | Reports the XML element that is currently being processed. |
FormatText | Reports XML text that is currently being processed. |
Notification | This event notifies the application about an underlying control flow event. |
ResolveReference | Asks the application to resolve a reference. |
Config Settings
The following is a list of config settings for the module with short descriptions. Click on the links for further details.
BinarySecurityTokenID | Specifies the ID for BinarySecurityToken element. |
HMACKey | The key value for HMAC. |
HMACOutputLength | Sets the length of the HMAC output. |
IncludeKey | Specifies whether to include the signing key to the signature. |
IncludeKeyValue | Specifies whether the key value must be included to the signature. |
InclusiveNamespacesPrefixList | Specifies the InclusiveNamespaces PrefixList. |
KeyInfoCustomXML | The custom XML content for KeyInfo element. |
KeyInfoDetails | Specifies the signing key info details to include to the signature. |
KeyInfoID | Specifies the ID for KeyInfo element. |
KeyName | Contains information about the key used for signing. |
PrependCustomXML | The custom XML content that prepended before signature. |
SecurityHeaderIndex | Specifies the SecurityHeader index. |
SecurityTokenReferenceID | Specifies the ID for SecurityTokenReference element. |
SignatureID | Specifies the ID for Signature element. |
SignaturePrefix | Specifies the signature prefix. |
SignatureValueID | Specifies the ID for SignatureValue element. |
SignedInfoID | Specifies the ID for SignedInfo element. |
TempPath | Location where the temporary files are stored. |
UseHMACSigning | Whether to use HMAC signing. |
UsePSS | Whether to use RSASSA-PSS algorithm. |
WriteBOM | Specifies whether byte-order mark should be written when saving the document. |
XMLFormatting | Specifies the signature XML formatting. |
CheckKeyIntegrityBeforeUse | Enables or disable private key integrity check before use. |
CookieCaching | Specifies whether a cookie cache should be used for HTTP(S) transports. |
Cookies | Gets or sets local cookies for the module (supported for HTTPClient, RESTClient and SOAPClient only). |
DefDeriveKeyIterations | Specifies the default key derivation algorithm iteration count. |
EnableClientSideSSLFFDHE | Enables or disables finite field DHE key exchange support in TLS clients. |
GlobalCookies | Gets or sets global cookies for all the HTTP transports. |
HttpUserAgent | Specifies the user agent name to be used by all HTTP clients. |
LogDestination | Specifies the debug log destination. |
LogDetails | Specifies the debug log details to dump. |
LogFile | Specifies the debug log filename. |
LogFilters | Specifies the debug log filters. |
LogFlushMode | Specifies the log flush mode. |
LogLevel | Specifies the debug log level. |
LogMaxEventCount | Specifies the maximum number of events to cache before further action is taken. |
LogRotationMode | Specifies the log rotation mode. |
MaxASN1BufferLength | Specifies the maximal allowed length for ASN.1 primitive tag data. |
MaxASN1TreeDepth | Specifies the maximal depth for processed ASN.1 trees. |
OCSPHashAlgorithm | Specifies the hash algorithm to be used to identify certificates in OCSP requests. |
StaticDNS | Specifies whether static DNS rules should be used. |
StaticIPAddress[domain] | Gets or sets an IP address for the specified domain name. |
StaticIPAddresses | Gets or sets all the static DNS rules. |
Tag | Allows to store any custom data. |
UseOwnDNSResolver | Specifies whether the client modules should use own DNS resolver. |
UseSharedSystemStorages | Specifies whether the validation engine should use a global per-process copy of the system certificate stores. |
UseSystemOAEPAndPSS | Enforces or disables the use of system-driven RSA OAEP and PSS computations. |
UseSystemRandom | Enables or disables the use of the OS PRNG. |
CanonicalizationMethod Property (SOAPQuickSigner Module)
Specifies XML canonicalization method to use.
Syntax
public var canonicalizationMethod: SoapquicksignerCanonicalizationMethods { get {...} set {...} }
public enum SoapquicksignerCanonicalizationMethods: Int32 { case cxcmNone = 0 case cxcmCanon = 1 case cxcmCanonComment = 2 case cxcmExclCanon = 3 case cxcmExclCanonComment = 4 case cxcmMinCanon = 5 case cxcmCanon_v1_1 = 6 case cxcmCanonComment_v1_1 = 7 }
@property (nonatomic,readwrite,assign,getter=canonicalizationMethod,setter=setCanonicalizationMethod:) int canonicalizationMethod; - (int)canonicalizationMethod; - (void)setCanonicalizationMethod :(int)newCanonicalizationMethod;
Default Value
1
Remarks
Use this property to specify the method for XML canonicalization of SignedInfo element. See XML-Signature Syntax and Processing specification for details.
Supported canonicalization methods:
cxcmNone | 0 | |
cxcmCanon | 1 | |
cxcmCanonComment | 2 | |
cxcmExclCanon | 3 | |
cxcmExclCanonComment | 4 | |
cxcmMinCanon | 5 | |
cxcmCanon_v1_1 | 6 | |
cxcmCanonComment_v1_1 | 7 |
EmbedCertificateMethod Property (SOAPQuickSigner Module)
Controls the certificate disposition within the signature.
Syntax
public var embedCertificateMethod: SoapquicksignerEmbedCertificateMethods { get {...} set {...} }
public enum SoapquicksignerEmbedCertificateMethods: Int32 { case cwecInSignature = 0 case cwecInBinarySecurityToken = 1 case cwecInSignedBinarySecurityToken = 2 case cwecInBinarySecurityTokenAndSignature = 3 case cwecNone = 4 }
@property (nonatomic,readwrite,assign,getter=embedCertificateMethod,setter=setEmbedCertificateMethod:) int embedCertificateMethod; - (int)embedCertificateMethod; - (void)setEmbedCertificateMethod :(int)newEmbedCertificateMethod;
Default Value
1
Remarks
This property controls the method of embedding the signing certificate(s) into the signature if WS-Security signature type is used.
Supported values:
cwecInSignature | 0 | Embed certificate(s) into the signature |
cwecInBinarySecurityToken | 1 | Embed certificate(s) into the BinarySecurityToken element |
cwecInSignedBinarySecurityToken | 2 | Embed certificate(s) into the BinarySecurityToken element and sign them |
cwecInBinarySecurityTokenAndSignature | 3 | Embed certificate(s) into the BinarySecurityToken element and the signature |
cwecNone | 4 | Don't embed certificate(s) into the BinarySecurityToken element or the signature |
Encoding Property (SOAPQuickSigner Module)
Specifies XML encoding.
Syntax
public var encoding: String { get {...} set {...} }
@property (nonatomic,readwrite,assign,getter=encoding,setter=setEncoding:) NSString* encoding; - (NSString*)encoding; - (void)setEncoding :(NSString*)newEncoding;
Default Value
""
Remarks
Use this property to specify the encoding to apply to the XML documents.
ExternalCrypto Property (SOAPQuickSigner Module)
Provides access to external signing and DC parameters.
Syntax
public var externalCrypto: ExternalCrypto { get {...} }
@property (nonatomic,readwrite,assign,getter=externalCryptoAsyncDocumentID,setter=setExternalCryptoAsyncDocumentID:) NSString* externalCryptoAsyncDocumentID; - (NSString*)externalCryptoAsyncDocumentID; - (void)setExternalCryptoAsyncDocumentID :(NSString*)newExternalCryptoAsyncDocumentID; @property (nonatomic,readwrite,assign,getter=externalCryptoCustomParams,setter=setExternalCryptoCustomParams:) NSString* externalCryptoCustomParams; - (NSString*)externalCryptoCustomParams; - (void)setExternalCryptoCustomParams :(NSString*)newExternalCryptoCustomParams; @property (nonatomic,readwrite,assign,getter=externalCryptoData,setter=setExternalCryptoData:) NSString* externalCryptoData; - (NSString*)externalCryptoData; - (void)setExternalCryptoData :(NSString*)newExternalCryptoData; @property (nonatomic,readwrite,assign,getter=externalCryptoExternalHashCalculation,setter=setExternalCryptoExternalHashCalculation:) BOOL externalCryptoExternalHashCalculation; - (BOOL)externalCryptoExternalHashCalculation; - (void)setExternalCryptoExternalHashCalculation :(BOOL)newExternalCryptoExternalHashCalculation; @property (nonatomic,readwrite,assign,getter=externalCryptoHashAlgorithm,setter=setExternalCryptoHashAlgorithm:) NSString* externalCryptoHashAlgorithm; - (NSString*)externalCryptoHashAlgorithm; - (void)setExternalCryptoHashAlgorithm :(NSString*)newExternalCryptoHashAlgorithm; @property (nonatomic,readwrite,assign,getter=externalCryptoKeyID,setter=setExternalCryptoKeyID:) NSString* externalCryptoKeyID; - (NSString*)externalCryptoKeyID; - (void)setExternalCryptoKeyID :(NSString*)newExternalCryptoKeyID; @property (nonatomic,readwrite,assign,getter=externalCryptoKeySecret,setter=setExternalCryptoKeySecret:) NSString* externalCryptoKeySecret; - (NSString*)externalCryptoKeySecret; - (void)setExternalCryptoKeySecret :(NSString*)newExternalCryptoKeySecret; @property (nonatomic,readwrite,assign,getter=externalCryptoMethod,setter=setExternalCryptoMethod:) int externalCryptoMethod; - (int)externalCryptoMethod; - (void)setExternalCryptoMethod :(int)newExternalCryptoMethod; @property (nonatomic,readwrite,assign,getter=externalCryptoMode,setter=setExternalCryptoMode:) int externalCryptoMode; - (int)externalCryptoMode; - (void)setExternalCryptoMode :(int)newExternalCryptoMode; @property (nonatomic,readwrite,assign,getter=externalCryptoPublicKeyAlgorithm,setter=setExternalCryptoPublicKeyAlgorithm:) NSString* externalCryptoPublicKeyAlgorithm; - (NSString*)externalCryptoPublicKeyAlgorithm; - (void)setExternalCryptoPublicKeyAlgorithm :(NSString*)newExternalCryptoPublicKeyAlgorithm;
Default Value
""
Remarks
FIPSMode Property (SOAPQuickSigner Module)
Reserved.
Syntax
public var fipsMode: Bool { get {...} set {...} }
@property (nonatomic,readwrite,assign,getter=FIPSMode,setter=setFIPSMode:) BOOL FIPSMode; - (BOOL)FIPSMode; - (void)setFIPSMode :(BOOL)newFIPSMode;
Default Value
False
Remarks
This property is reserved for future use.
HashAlgorithm Property (SOAPQuickSigner Module)
Specifies the hash algorithm to be used.
Syntax
public var hashAlgorithm: String { get {...} set {...} }
@property (nonatomic,readwrite,assign,getter=hashAlgorithm,setter=setHashAlgorithm:) NSString* hashAlgorithm; - (NSString*)hashAlgorithm; - (void)setHashAlgorithm :(NSString*)newHashAlgorithm;
Default Value
"SHA256"
Remarks
Use this property to set the hash algorithm for signature calculation.
Supported values:
SB_HASH_ALGORITHM_MD5 | MD5 | |
SB_HASH_ALGORITHM_SHA1 | SHA1 | |
SB_HASH_ALGORITHM_SHA224 | SHA224 | |
SB_HASH_ALGORITHM_SHA256 | SHA256 | |
SB_HASH_ALGORITHM_SHA384 | SHA384 | |
SB_HASH_ALGORITHM_SHA512 | SHA512 | |
SB_HASH_ALGORITHM_RIPEMD160 | RIPEMD160 | |
SB_HASH_ALGORITHM_GOST_R3411_1994 | GOST1994 | |
SB_HASH_ALGORITHM_WHIRLPOOL | WHIRLPOOL | |
SB_HASH_ALGORITHM_SHA3_256 | SHA3_256 | |
SB_HASH_ALGORITHM_SHA3_384 | SHA3_384 | |
SB_HASH_ALGORITHM_SHA3_512 | SHA3_512 |
InputFile Property (SOAPQuickSigner Module)
Specifies the SOAP message to be signed.
Syntax
public var inputFile: String { get {...} set {...} }
@property (nonatomic,readwrite,assign,getter=inputFile,setter=setInputFile:) NSString* inputFile; - (NSString*)inputFile; - (void)setInputFile :(NSString*)newInputFile;
Default Value
""
Remarks
Provide a full path to the SOAP message to be signed.
OutputFile Property (SOAPQuickSigner Module)
A file where the signed SOAP message will be saved.
Syntax
public var outputFile: String { get {...} set {...} }
@property (nonatomic,readwrite,assign,getter=outputFile,setter=setOutputFile:) NSString* outputFile; - (NSString*)outputFile; - (void)setOutputFile :(NSString*)newOutputFile;
Default Value
""
Remarks
Provide a full path to the file where the signed SOAP message should be saved.
References Property (SOAPQuickSigner Module)
A list of references to the data to be signed.
Syntax
public var references: Array<XMLReference> { get {...} }
@property (nonatomic,readwrite,assign,getter=referenceCount,setter=setReferenceCount:) int referenceCount; - (int)referenceCount; - (void)setReferenceCount :(int)newReferenceCount; - (BOOL)referenceAutoGenerateElementId:(int)referenceIndex; - (void)setReferenceAutoGenerateElementId:(int)referenceIndex :(BOOL)newReferenceAutoGenerateElementId; - (int)referenceCanonicalizationMethod:(int)referenceIndex; - (void)setReferenceCanonicalizationMethod:(int)referenceIndex :(int)newReferenceCanonicalizationMethod; - (NSString*)referenceCustomElementId:(int)referenceIndex; - (void)setReferenceCustomElementId:(int)referenceIndex :(NSString*)newReferenceCustomElementId; - (NSData*)referenceDigestValue:(int)referenceIndex; - (void)setReferenceDigestValue:(int)referenceIndex :(NSData*)newReferenceDigestValue; - (long long)referenceHandle:(int)referenceIndex; - (void)setReferenceHandle:(int)referenceIndex :(long long)newReferenceHandle; - (NSString*)referenceHashAlgorithm:(int)referenceIndex; - (void)setReferenceHashAlgorithm:(int)referenceIndex :(NSString*)newReferenceHashAlgorithm; - (BOOL)referenceHasURI:(int)referenceIndex; - (void)setReferenceHasURI:(int)referenceIndex :(BOOL)newReferenceHasURI; - (NSString*)referenceID:(int)referenceIndex; - (void)setReferenceID:(int)referenceIndex :(NSString*)newReferenceID; - (NSString*)referenceInclusiveNamespacesPrefixList:(int)referenceIndex; - (void)setReferenceInclusiveNamespacesPrefixList:(int)referenceIndex :(NSString*)newReferenceInclusiveNamespacesPrefixList; - (NSString*)referenceReferenceType:(int)referenceIndex; - (void)setReferenceReferenceType:(int)referenceIndex :(NSString*)newReferenceReferenceType; - (int)referenceSignatureIndex:(int)referenceIndex; - (NSData*)referenceTargetData:(int)referenceIndex; - (void)setReferenceTargetData:(int)referenceIndex :(NSData*)newReferenceTargetData; - (int)referenceTargetType:(int)referenceIndex; - (void)setReferenceTargetType:(int)referenceIndex :(int)newReferenceTargetType; - (NSString*)referenceTargetXMLElement:(int)referenceIndex; - (void)setReferenceTargetXMLElement:(int)referenceIndex :(NSString*)newReferenceTargetXMLElement; - (NSString*)referenceURI:(int)referenceIndex; - (void)setReferenceURI:(int)referenceIndex :(NSString*)newReferenceURI; - (BOOL)referenceUseBase64Transform:(int)referenceIndex; - (void)setReferenceUseBase64Transform:(int)referenceIndex :(BOOL)newReferenceUseBase64Transform; - (BOOL)referenceUseEnvelopedSignatureTransform:(int)referenceIndex; - (void)setReferenceUseEnvelopedSignatureTransform:(int)referenceIndex :(BOOL)newReferenceUseEnvelopedSignatureTransform; - (BOOL)referenceUseXPathFilter2Transform:(int)referenceIndex; - (void)setReferenceUseXPathFilter2Transform:(int)referenceIndex :(BOOL)newReferenceUseXPathFilter2Transform; - (BOOL)referenceUseXPathTransform:(int)referenceIndex; - (void)setReferenceUseXPathTransform:(int)referenceIndex :(BOOL)newReferenceUseXPathTransform; - (NSString*)referenceXPathExpression:(int)referenceIndex; - (void)setReferenceXPathExpression:(int)referenceIndex :(NSString*)newReferenceXPathExpression; - (NSString*)referenceXPathFilter2Expressions:(int)referenceIndex; - (void)setReferenceXPathFilter2Expressions:(int)referenceIndex :(NSString*)newReferenceXPathFilter2Expressions; - (NSString*)referenceXPathFilter2Filters:(int)referenceIndex; - (void)setReferenceXPathFilter2Filters:(int)referenceIndex :(NSString*)newReferenceXPathFilter2Filters; - (NSString*)referenceXPathFilter2PrefixList:(int)referenceIndex; - (void)setReferenceXPathFilter2PrefixList:(int)referenceIndex :(NSString*)newReferenceXPathFilter2PrefixList; - (NSString*)referenceXPathPrefixList:(int)referenceIndex; - (void)setReferenceXPathPrefixList:(int)referenceIndex :(NSString*)newReferenceXPathPrefixList;
Default Value
""
Remarks
SecurityHeaderIndex Property (SOAPQuickSigner Module)
Specifies the SecurityHeader index.
Syntax
public var securityHeaderIndex: Int32 { get {...} set {...} }
@property (nonatomic,readwrite,assign,getter=securityHeaderIndex,setter=setSecurityHeaderIndex:) int securityHeaderIndex; - (int)securityHeaderIndex; - (void)setSecurityHeaderIndex :(int)newSecurityHeaderIndex;
Default Value
-1
Remarks
Use this property to specify the index of SecurityHeader element where to put the signature. If the specified SecurityHeader element doesn't exist then a new SecurityHeader element will be created. The default value is "-1", in this case a new SecurityHeader element will be always created.
SignatureType Property (SOAPQuickSigner Module)
The SOAP signature type to use.
Syntax
public var signatureType: SoapquicksignerSignatureTypes { get {...} set {...} }
public enum SoapquicksignerSignatureTypes: Int32 { case sstUnknown = 0 case sstWSSSignature = 1 case sstSOAPSignature = 2 }
@property (nonatomic,readwrite,assign,getter=signatureType,setter=setSignatureType:) int signatureType; - (int)signatureType; - (void)setSignatureType :(int)newSignatureType;
Default Value
1
Remarks
Use this property to specify the signature type to use when forming the signature.
Supported values:
sstUnknown | 0 | Unknown signature |
sstWSSSignature | 1 | Uses Web Services Security (WS-Security, WSS) signature. It is implemented according to the OASIS Web Services Security extension to SOAP |
sstSOAPSignature | 2 | Uses SOAP signature. It is implemented according to the SOAP Security Extensions: Digital Signature. |
SigningCertificate Property (SOAPQuickSigner Module)
The certificate to be used for signing.
Syntax
public var signingCertificate: Certificate { get {...} set {...} }
@property (nonatomic,readonly,assign,getter=signingCertBytes) NSData* signingCertBytes; - (NSData*)signingCertBytes; @property (nonatomic,readwrite,assign,getter=signingCertHandle,setter=setSigningCertHandle:) long long signingCertHandle; - (long long)signingCertHandle; - (void)setSigningCertHandle :(long long)newSigningCertHandle;
Default Value
""
Remarks
SigningChain Property (SOAPQuickSigner Module)
The signing certificate chain.
Syntax
public var signingChain: Array<Certificate> { get {...} }
@property (nonatomic,readwrite,assign,getter=signingChainCount,setter=setSigningChainCount:) int signingChainCount; - (int)signingChainCount; - (void)setSigningChainCount :(int)newSigningChainCount; - (NSData*)signingChainBytes:(int)signingChainIndex; - (long long)signingChainHandle:(int)signingChainIndex; - (void)setSigningChainHandle:(int)signingChainIndex :(long long)newSigningChainHandle;
Default Value
""
Remarks
XPathNamespaces Property (SOAPQuickSigner Module)
Specifies namespaces for XPath expression.
Syntax
public var xPathNamespaces: Array<XMLNamespace> { get {...} }
@property (nonatomic,readwrite,assign,getter=namespaceCount,setter=setNamespaceCount:) int namespaceCount; - (int)namespaceCount; - (void)setNamespaceCount :(int)newNamespaceCount; - (NSString*)namespacePrefix:(int)namespaceIndex; - (void)setNamespacePrefix:(int)namespaceIndex :(NSString*)newNamespacePrefix; - (NSString*)namespaceURI:(int)namespaceIndex; - (void)setNamespaceURI:(int)namespaceIndex :(NSString*)newNamespaceURI;
Default Value
""
Remarks
AddBodyReference Method (SOAPQuickSigner Module)
Creates a new XML reference to the Body element of the SOAP message.
Syntax
- (int)addBodyReference:(NSString*)customId :(BOOL)autoGenerateId;
Remarks
Use this method to add a reference to the Body element of the SOAP message.
The reference's URI is set basing on the ID of the XML element. If the XML element doesn't have an ID then a CustomId value will be used. If CustomId is empty and AutoGenerateId is set, the ID will be generated automatically. An exception will be thrown otherwise.
Use CanonicalizationMethod and HashAlgorithm properties to specify the canonicalization method and hash algorithm to use.
The method returns the index of the new reference entry in the References collection.
AddDataReference Method (SOAPQuickSigner Module)
Creates a new XML reference to the specified data.
Syntax
- (int)addDataReference:(NSString*)dataURI :(NSData*)data;
Remarks
Use this method to add a reference to the custom data. Pass the reference's URI via DataURI parameter.
Use HashAlgorithm property to specify the hash algorithm to use.
The method returns the index of the new reference entry in the References collection.
AddReference Method (SOAPQuickSigner Module)
Creates a new XML reference to the specified XML element.
Syntax
public func addReference(targetXmlElement: String, customId: String, autoGenerateId: Bool) throws -> Int32
- (int)addReference:(NSString*)targetXmlElement :(NSString*)customId :(BOOL)autoGenerateId;
Remarks
Use this method to add a reference to a particular XML element.
The reference's URI is set basing on the ID of the XML element. If the XML element doesn't have an ID then a CustomId value will be used. If CustomId is empty and AutoGenerateId is set, the ID will be generated automatically. An exception will be thrown otherwise.
Use CanonicalizationMethod and HashAlgorithm properties to specify the canonicalization method and hash algorithm to use.
The method returns the index of the new reference entry in the References collection.
Config Method (SOAPQuickSigner Module)
Sets or retrieves a configuration setting.
Syntax
- (NSString*)config:(NSString*)configurationString;
Remarks
Config is a generic method available in every class. It is used to set and retrieve configuration settings for the class.
These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, 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.
DoAction Method (SOAPQuickSigner Module)
Performs an additional action.
Syntax
- (NSString*)doAction:(NSString*)actionID :(NSString*)actionParams;
Remarks
DoAction is a generic method available in every class. It is used to perform an additional action introduced after the product major release. The list of actions is not fixed, and may be flexibly extended over time.
The unique identifier of the action is provided in ActionID parameter. ActionParams contains a list of parameters for the action in the form of PARAM1=VALUE1;PARAM2=VALUE2;....
ExtractAsyncData Method (SOAPQuickSigner Module)
Extracts user data from the DC signing service response.
Syntax
- (NSString*)extractAsyncData:(NSString*)asyncReply;
Remarks
Call this method before finalizing the asynchronous signing process to extract the data passed to the ExternalCrypto.Data property on the pre-signing stage.
The Data parameter can be used to pass some state or document identifier along with the signing request from the pre-signing to completion async stage.
GetInnerXML Method (SOAPQuickSigner Module)
Get the inner XML content of the selected XML element.
Syntax
Remarks
Call this method to get the inner XML content of the selected XML element.
GetOuterXML Method (SOAPQuickSigner Module)
Get the outer XML content of the selected XML element.
Syntax
Remarks
Call this method to get the outer XML content of the selected XML element.
GetTextContent Method (SOAPQuickSigner Module)
Get the text content of the selected XML element.
Syntax
- (NSString*)getTextContent:(NSString*)XPath;
Remarks
Call this method to get the text content of the selected XML element.
SetInnerXML Method (SOAPQuickSigner Module)
Set the inner XML content of the selected XML element.
Syntax
- (void)setInnerXML:(NSString*)XPath :(NSString*)value;
Remarks
Call this method to set the inner XML content of the selected XML element.
SetTextContent Method (SOAPQuickSigner Module)
Set the text content of the selected XML element.
Syntax
- (void)setTextContent:(NSString*)XPath :(NSString*)value;
Remarks
Call this method to set the text content of the selected XML element.
Sign Method (SOAPQuickSigner Module)
Signs the SOAP message.
Syntax
public func sign() throws -> Void
- (void)sign;
Remarks
Call this method to generate a signed SOAP message.
SignAsyncBegin Method (SOAPQuickSigner Module)
Initiates the asynchronous signing operation.
Syntax
public func signAsyncBegin() throws -> String
- (NSString*)signAsyncBegin;
Remarks
When using the DC framework, call this method to initiate the asynchronous signing process. Upon completion, a pre-signed copy of the document will be saved in OutputFile (or OutputStream). Keep the pre-signed copy somewhere local, and pass the returned string ('the request state') to the DC processor for handling.
Upon receiving the response state from the DC processor, assign the path to the pre-signed copy to InputFile (or InputStream), and call SignAsyncEnd to finalize the signing.
Note that depending on the signing method and DC configuration used, you may still need to provide the public part of the signing certificate via the SigningCertificate property.
Use the ExternalCrypto.AsyncDocumentID property to supply a unique document ID to include in the request. This is helpful when creating batches of multiple async requests, as it allows you to pass the whole response batch to SignAsyncEnd and expect it to recover the correct response from the batch automatically.
AsyncState is a message of the distributed cryptography (DC) protocol. DC protocol is based on exchange of async states between a DC client (an application that wants to sign a PDF, XML, or Office document) and a DC server (an application that controls access to the private key). An async state can carry one or more signing requests, comprised of document hashes, or one or more signatures produced over those hashes.
In a typical scenario you get a client-side async state from the SignAsyncBegin method. This state contains document hashes to be signed on the DC server side. You then send the async state to the DC server (often represented by the DCAuth control), which processes it and produces a matching signatures state. The async state produced by the server is then passed to the SignAsyncEnd method.
SignAsyncEnd Method (SOAPQuickSigner Module)
Completes the asynchronous signing operation.
Syntax
- (void)signAsyncEnd:(NSString*)asyncReply;
Remarks
When using the DC framework, call this method upon receiving the response state from the DC processor to complete the asynchronous signing process.
Before calling this method, assign the path to the pre-signed copy of the document obtained from prior SignAsyncBegin call to InputFile (or InputStream). The method will embed the signature into the pre-signed document, and save the complete signed document to OutputFile (or OutputStream).
Note that depending on the signing method and DC configuration used, you may still need to provide the public part of the signing certificate via the SigningCertificate property.
Use the ExternalCrypto.AsyncDocumentID parameter to pass a specific document ID if using batched AsyncReply. If used, it should match the value provided on the pre-signing (SignAsyncBegin) stage.
AsyncState is a message of the distributed cryptography (DC) protocol. DC protocol is based on exchange of async states between a DC client (an application that wants to sign a PDF, XML, or Office document) and a DC server (an application that controls access to the private key). An async state can carry one or more signing requests, comprised of document hashes, or one or more signatures produced over those hashes.
In a typical scenario you get a client-side async state from the SignAsyncBegin method. This state contains document hashes to be signed on the DC server side. You then send the async state to the DC server (often represented by the DCAuth control), which processes it and produces a matching signatures state. The async state produced by the server is then passed to the SignAsyncEnd method.
SignExternal Method (SOAPQuickSigner Module)
Signs the document using an external signing facility.
Syntax
public func signExternal() throws -> Void
- (void)signExternal;
Remarks
Call this method to delegate the low-level signing operation to an external, remote, or custom signing engine. This method is useful if the signature has to be made by a device accessible through a custom or non-standard signing interface.
When all preparations are done and hash is computed, the class fires ExternalSign event which allows to pass the hash value for signing.
Error Event (SOAPQuickSigner Module)
Information about errors during signing.
Syntax
- (void)onError:(int)errorCode :(NSString*)description;
Remarks
The event is fired in case of exceptional conditions during signing.
ErrorCode contains an error code and Description contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to SOAP.
ExternalSign Event (SOAPQuickSigner Module)
Handles remote or external signing initiated by the SignExternal method or other source.
Syntax
func onExternalSign(operationId: String, hashAlgorithm: String, pars: String, data: String, signedData: inout String)
- (void)onExternalSign:(NSString*)operationId :(NSString*)hashAlgorithm :(NSString*)pars :(NSString*)data :(NSString**)signedData;
Remarks
Assign a handler to this event if you need to delegate a low-level signing operation to an external, remote, or custom signing engine. Depending on the settings, the handler will receive a hashed or unhashed value to be signed.
The event handler must pass the value of Data to the signer, obtain the signature, and pass it back to the component via SignedData parameter.
OperationId provides a comment about the operation and its origin. It depends on the exact component being used, and may be empty. HashAlgorithm specifies the hash algorithm being used for the operation, and Pars contain algorithm-dependent parameters.
The component uses base16 (hex) encoding for Data, SignedData, and Pars parameters. If your signing engine uses a different input and output encoding, you may need to decode and/or encode the data before and/or after the signing.
A sample MD5 hash encoded in base16: a0dee2a0382afbb09120ffa7ccd8a152 - lower case base16 A0DEE2A0382AFBB09120FFA7CCD8A152 - upper case base16
A sample event handler that uses a .NET RSACryptoServiceProvider class may look like the following:
signer.OnExternalSign += (s, e) =>
{
var cert = new X509Certificate2("cert.pfx", "", X509KeyStorageFlags.Exportable);
var key = (RSACryptoServiceProvider)cert.PrivateKey;
var dataToSign = e.Data.FromBase16String();
var signedData = key.SignHash(dataToSign, "2.16.840.1.101.3.4.2.1");
e.SignedData = signedData.ToBase16String();
};
FormatElement Event (SOAPQuickSigner Module)
Reports the XML element that is currently being processed.
Syntax
func onFormatElement(startTagWhitespace: inout String, endTagWhitespace: inout String, level: Int32, path: String, hasChildElements: Bool)
- (void)onFormatElement:(NSString**)startTagWhitespace :(NSString**)endTagWhitespace :(int)level :(NSString*)path :(BOOL)hasChildElements;
Remarks
Path and Level specify the path to the XML element being processed and its nesting level, respectively.
HasChildElements specify if processed XML element has child elements.
Among other purposes, this event may be used to add whitespace formatting before or after a particular element in the signature.
FormatText Event (SOAPQuickSigner Module)
Reports XML text that is currently being processed.
Syntax
func onFormatText(text: inout String, textType: Int32, level: Int32, path: String)
- (void)onFormatText:(NSString**)text :(int)textType :(int)level :(NSString*)path;
Remarks
TextType parameter specifies the type of the XML text (normal or Base64-encoded) that is stored in the element; Path and Level specify the path to the XML element and its nesting level.
Among other purposes, this event may be used to add whitespace formatting before or after a particular element in the signature.
Notification Event (SOAPQuickSigner Module)
This event notifies the application about an underlying control flow event.
Syntax
- (void)onNotification:(NSString*)eventID :(NSString*)eventParam;
Remarks
The class fires this event to let the application know about some event, occurrence, or milestone in the component. For example, it may fire to report completion of the document processing. The list of events being reported is not fixed, and may be flexibly extended over time.
The unique identifier of the event is provided in EventID parameter. EventParam contains any parameters accompanying the occurrence. Depending on the type of the component, the exact action it is performing, or the document being processed, one or both may be omitted.
ResolveReference Event (SOAPQuickSigner Module)
Asks the application to resolve a reference.
Syntax
- (void)onResolveReference:(int)referenceIndex :(NSString*)URI;
Remarks
This event is fired when the control could not automatically resolve a reference and requires custom treatment.
URI contains a reference to the data.
ReferenceIndex specifies the index of the reference to process.
Based on the reference's URI the event handler should set either TargetXMLElement or TargetData property of the reference.
Certificate Type
Provides details of an individual X.509 certificate.
Remarks
This type provides access to X.509 certificate details.
Fields
bytes Data |
Returns raw certificate data in DER format. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ca Bool |
Indicates whether the certificate has a CA capability (a setting in BasicConstraints extension). |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
caKeyID Data |
A unique identifier (fingerprint) of the CA certificate's private key. Authority Key Identifier is a (non-critical) X.509 certificate extension which allows the identification of certificates produced by the same issuer, but with different public keys. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
crlDistributionPoints String |
Locations of the CRL (Certificate Revocation List) distribution points used to check this certificate's validity. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
curve String |
Specifies the elliptic curve of the EC public key.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fingerprint Data |
Contains the fingerprint (a hash imprint) of this certificate. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
friendlyName String |
Contains an associated alias (friendly name) of the certificate. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
handle Int64 |
Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise. When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object
after such operation.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hashAlgorithm String |
Specifies the hash algorithm to be used in the operations on the certificate (such as key signing)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
issuer String |
The common name of the certificate issuer (CA), typically a company name. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
issuerRDN String |
A collection of information, in the form of [OID, Value] pairs, uniquely identifying the certificate issuer. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
keyAlgorithm String |
Specifies the public key algorithm of this certificate.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
keyBits Int32 |
Returns the length of the public key. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
keyFingerprint Data |
Returns a fingerprint of the public key contained in the certificate. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
keyUsage Int32 |
Indicates the purposes of the key contained in the certificate, in the form of an OR'ed flag set. This value is a bit mask of the following values:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
keyValid Bool |
Returns True if the certificate's key is cryptographically valid, and False otherwise. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ocspLocations String |
Locations of OCSP (Online Certificate Status Protocol) services that can be used to check this certificate's validity, as recorded by the CA. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ocspNoCheck Bool |
Accessor to the value of the certificates ocsp-no-check extension. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
origin Int32 |
Returns the origin of this certificate. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
policyIDs String |
Contains identifiers (OIDs) of the applicable certificate policies. The Certificate Policies extension identifies a sequence of policies under which the certificate has been issued, and which regulate its usage. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
privateKeyBytes Data |
Contains the certificate's private key. It is normal for this property to be empty if the private key is non-exportable. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
privateKeyExists Bool |
Indicates whether the certificate has an associated private key. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
privateKeyExtractable Bool |
Indicates whether the private key is extractable |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
publicKeyBytes Data |
Contains the certificate's public key in DER format. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
qualifiedStatements QualifiedStatementsTypes |
Returns the qualified status of the certificate. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
selfSigned Bool |
Indicates whether the certificate is self-signed (root) or signed by an external CA. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
serialNumber Data |
Returns the certificate's serial number. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sigAlgorithm String |
Indicates the algorithm that was used by the CA to sign this certificate. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subject String |
The common name of the certificate holder, typically an individual's name, a URL, an e-mail address, or a company name. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subjectAlternativeName String |
Returns or sets the value of the Subject Alternative Name extension of the certificate. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subjectKeyID Data |
Contains a unique identifier (fingerprint) of the certificate's private key. Subject Key Identifier is a (non-critical) X.509 certificate extension which allows the identification of certificates containing a particular public key. In SecureBlackbox, the unique identifier is represented with a SHA1 hash of the bit string of the subject public key. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subjectRDN String |
A collection of information, in the form of [OID, Value] pairs, uniquely identifying the certificate holder (subject). |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
validFrom String |
The time point at which the certificate becomes valid, in UTC. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
validTo String |
The time point at which the certificate expires, in UTC. |
Constructors
public init(stream: )
Loads the X.509 certificate from a stream. Stream is a stream containing the certificate data.
public init()
Creates a new object with default field values.
ExternalCrypto Type
Specifies the parameters of external cryptographic calls.
Remarks
External cryptocalls are used in a Distributed Cryptography (DC) subsystem, which allows the delegation of security operations to the remote agent. For instance, it can be used to compute the signature value on the server, while retaining the client's private key locally.
Fields
asyncDocumentID String |
Specifies an optional document ID for SignAsyncBegin() and SignAsyncEnd() calls. Use this property when working with multi-signature DCAuth requests and responses to uniquely identify documents signed within a larger batch. On the completion stage, this value helps the signing component identify the correct signature in the returned batch of responses. If using batched requests, make sure to set this property to the same value on both pre-signing (SignAsyncBegin) and completion (SignAsyncEnd) stages. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
customParams String |
Custom parameters to be passed to the signing service (uninterpreted). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
data String |
Additional data to be included in the async state and mirrored back by the requestor |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
externalHashCalculation Bool |
Specifies whether the message hash is to be calculated at the external endpoint. Please note that this mode is not supported by all components. In particular, components operating with larger objects (PDFSigner, CAdESSigner, XAdESSigner) do not support it. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hashAlgorithm String |
Specifies the request's signature hash algorithm.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
keyID String |
The ID of the pre-shared key used for DC request authentication. Asynchronous DCAuth-driven communication requires that parties authenticate each other with a secret pre-shared cryptographic key. This provides extra protection layer for the protocol and diminishes the risk of private key becoming abused by foreign parties. Use this property to provide the pre-shared key identifier, and use to pass the key itself. The same KeyID/KeySecret pair should be used on the DCAuth side for the signing requests to be accepted. Note: The KeyID/KeySecret scheme is very similar to the AuthKey scheme used in various Cloud service providers to authenticate users. Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
keySecret String |
The pre-shared key used for DC request authentication. This key must be set and match the key used by the DCAuth counterpart for the scheme to work. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
method AsyncSignMethods |
Specifies the asynchronous signing method. This is typically defined by the DC server capabilities and setup. Available options:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mode ExternalCryptoModes |
Specifies the external cryptography mode. Available options:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
publicKeyAlgorithm String |
Provide public key algorithm here if the certificate is not available on the pre-signing stage.
|
Constructors
public init()
Creates a new ExternalCrypto object with default field values.
XMLNamespace Type
Represents an XML namespace map for XPath expressions.
Remarks
This class defines the correspondence between Prefixes and namespace URIs.
Fields
prefix String |
A user-defined prefix value of a namespace. |
uri String |
A user-defined URI value of a namespace. |
Constructors
public init()
Creates a new XML namespace object.
XMLReference Type
Represents an XML reference element.
Remarks
XMLReference specifies the digest algorithm and digest value, and, optionally: an identifier of the object being signed, the type of the object, and/or a list of transforms to be applied prior to digesting.
Fields
autoGenerateElementId Bool |
Specifies whether the identifier (ID) attribute for a referenced (target) element should be auto-generated during signing. Used when the referenced element doesn't have an ID and CustomElementId and URI properties are empty. |
||||||||||||||||||||||||||||||||||||
canonicalizationMethod XMLCanonicalizationMethods |
Use this property to specify the canonicalization method for the transform of the reference. Use cxcmNone value to not to include canonicalization transform in transform chain. See XML-Signature Syntax and Processing specification for details.
|
||||||||||||||||||||||||||||||||||||
customElementId String |
Specifies a custom identifier (ID) attribute for a referenced (target) element that will be set on signing. Used when the referenced element doesn't have an ID and URI property is empty. |
||||||||||||||||||||||||||||||||||||
digestValue Data |
Use this property to get or set the value of the digest calculated over the referenced data. This property is optional and should be set only if you don't provide the actual data via TargetData or URI. If the data is set, then you don't need to set DigestValue since it will be calculated automatically. |
||||||||||||||||||||||||||||||||||||
handle Int64 |
Allows to get or set a 'handle', a unique identifier of the underlying property object. Use this property to assign objects of the same type in a quicker manner, without copying them fieldwise. When you pass a handle of one object to another, the source object is copied to the destination rather than assigned. It is safe to get rid of the original object
after such operation.
|
||||||||||||||||||||||||||||||||||||
hashAlgorithm String |
Specifies the hash algorithm to be used. Supported values:
|
||||||||||||||||||||||||||||||||||||
hasURI Bool |
Specifies whether the URI is set (even when it is empty). |
||||||||||||||||||||||||||||||||||||
id String |
A user-defined identifier (ID) attribute of this Reference element. |
||||||||||||||||||||||||||||||||||||
inclusiveNamespacesPrefixList String |
Use this property to specify InclusiveNamespaces PrefixList for exclusive canonicalization transform of the reference. See XML-Signature Syntax and Processing specification for details. |
||||||||||||||||||||||||||||||||||||
referenceType String |
The Reference's type attribute as defined in XMLDSIG specification. |
||||||||||||||||||||||||||||||||||||
signatureIndex Int32 |
Returns the index of the owner signature, if applicable. Use this property to establish the index of the associated signature object in the signature collection. |
||||||||||||||||||||||||||||||||||||
targetData Data |
Contains the referenced external data when the digest value is not explicitly specified. This property is optional and should only be set if you reference the external data via URI, and you don't provide the digest value explicitly via DigestValue. |
||||||||||||||||||||||||||||||||||||
targetType XMLReferenceTargetTypes |
The reference's target type to use. Use this property to specify the reference's target type to use when forming the signature. |
||||||||||||||||||||||||||||||||||||
targetXMLElement String |
This property specifies the referenced XML element. Used when the URI property is not set. In this case, the URI value is generated based on the ID of the referenced (target) XML element. If the URI property is set, this property is ignored until the ResolveReference event. Supported values are:
|
||||||||||||||||||||||||||||||||||||
uri String |
Use this property to get or set the URL which references the data. If the data is external, the application must set either TargetData or DigestValue. If TargetData is set, the digest is calculated automatically unless it is explicitly set by the application via DigestValue. |
||||||||||||||||||||||||||||||||||||
useBase64Transform Bool |
Specifies whether Base64 transform is included in transform chain. |
||||||||||||||||||||||||||||||||||||
useEnvelopedSignatureTransform Bool |
Specifies whether enveloped signature transform is included in transform chain. |
||||||||||||||||||||||||||||||||||||
useXPathFilter2Transform Bool |
Specifies whether XPath Filter 2.0 transform is included in transform chain. |
||||||||||||||||||||||||||||||||||||
useXPathTransform Bool |
Specifies whether XPath transform is included in transform chain. |
||||||||||||||||||||||||||||||||||||
xPathExpression String |
Use this property to specify XPath expression for XPath transform of the reference. |
||||||||||||||||||||||||||||||||||||
xPathFilter2Expressions String |
Use this property to specify XPointer expression(s) for XPath Filter 2.0 transform of the reference.
|
||||||||||||||||||||||||||||||||||||
xPathFilter2Filters String |
Use this property to specify XPointer filter(s) for XPath Filter 2.0 transform of the reference. The prefix list is comma-separated. Supported values:
|
||||||||||||||||||||||||||||||||||||
xPathFilter2PrefixList String |
Use this property to specify a prefix list for XPath Filter 2.0 transform of the reference. The prefix list is space-separated. Namespace URIs that are used are taken from XPathNamespaces property. |
||||||||||||||||||||||||||||||||||||
xPathPrefixList String |
Use this property to specify a prefix list for XPath transform of the reference. The prefix list is space-separated. Namespace URIs that are used are taken from XPathNamespaces property. |
Constructors
public init()
Creates a new XML reference element.
public init(iD: )
Creates a new XML reference element from its ID .
public init(iD: , uRI: )
Creates a new XML reference element from its ID and URI reference to the external data.
Config Settings (SOAPQuickSigner Module)
The class 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 class, access to these internal properties is provided through the Config method.SOAPQuickSigner Config Settings | ||||||||||||||||||||||||||||||
BinarySecurityTokenID: Specifies the ID for BinarySecurityToken element.This property contains the identifier (ID) attribute of the wsse:BinarySecurityToken element. | ||||||||||||||||||||||||||||||
HMACKey: The key value for HMAC.Sets the HMAC key. The component uses base16 (hex) encoding for this configuration value. | ||||||||||||||||||||||||||||||
HMACOutputLength: Sets the length of the HMAC output.Use this property to configure the length of the HMAC output, in bytes. | ||||||||||||||||||||||||||||||
IncludeKey:
Specifies whether to include the signing key to the signature.Set this property to True to include the public part of the signing key to the signature.
This property is used when the SOAP signature type is set. |
||||||||||||||||||||||||||||||
IncludeKeyValue:
Specifies whether the key value must be included to the signature.Set this property to True if the key value (its public part) should be included to the signature.
This property is used when the SOAP signature type is set. |
||||||||||||||||||||||||||||||
InclusiveNamespacesPrefixList: Specifies the InclusiveNamespaces PrefixList.Use this property to specify InclusiveNamespaces PrefixList for exclusive canonicalization transform of SignedInfo element. See XML-Signature Syntax and Processing specification for details. | ||||||||||||||||||||||||||||||
KeyInfoCustomXML:
The custom XML content for KeyInfo element.Use this property to specify the custom XML content of the ds:KeyInfo element.
The empty elements in the custom XML content act as a placeholder for auto-generated elements. For example to change the order of ds:KeyValue and ds:X509Data auto-generated elements use the value: "<X509Data/><KeyValue/>" |
||||||||||||||||||||||||||||||
KeyInfoDetails:
Specifies the signing key info details to include to the signature.Contains a comma-separated list of values that specifies which signing key info details to include to the signature.
This property is used when the SOAP signature type is set. Supported values are:
|
||||||||||||||||||||||||||||||
KeyInfoID: Specifies the ID for KeyInfo element.This property contains the identifier (ID) attribute of the ds:KeyInfo element. | ||||||||||||||||||||||||||||||
KeyName: Contains information about the key used for signing.The KeyName element contains a string value (with significant whitespaces) which may be used by the signer to communicate a key identifier to the recipient. Typically, the KeyName element contains an identifier related to the key pair used to sign the message, but it may contain other protocol-related information that indirectly identifies a key pair. Common uses of the KeyName include simple string names for keys, a key index, a distinguished name (DN), an email address, etc. | ||||||||||||||||||||||||||||||
PrependCustomXML: The custom XML content that prepended before signature.Use this property to specify the custom XML content that should be prepended before ds:Signature element. | ||||||||||||||||||||||||||||||
SecurityHeaderIndex: Specifies the SecurityHeader index.Use this property to specify the index of SecurityHeader element where to put the signature. If the specified SecurityHeader element doesn't exist then a new SecurityHeader element will be created. The default value is "-1", in this case a new SecurityHeader element will be always created. | ||||||||||||||||||||||||||||||
SecurityTokenReferenceID: Specifies the ID for SecurityTokenReference element.This property contains the identifier (ID) attribute of the wsse:SecurityTokenReference element. | ||||||||||||||||||||||||||||||
SignatureID: Specifies the ID for Signature element.This property contains the identifier (ID) attribute of the ds:Signature element. | ||||||||||||||||||||||||||||||
SignaturePrefix:
Specifies the signature prefix.Specifies the prefix for the Signature elements.
Default value is "ds". In this case "ds:" prefix will be used. Special values:
|
||||||||||||||||||||||||||||||
SignatureValueID: Specifies the ID for SignatureValue element.This property contains the identifier (ID) attribute of the ds:SignatureValue element. | ||||||||||||||||||||||||||||||
SignedInfoID: Specifies the ID for SignedInfo element.This property contains the identifier (ID) attribute of the ds:SignedInfo element. | ||||||||||||||||||||||||||||||
TempPath: Location where the temporary files are stored.This setting specifies an absolute path to the location on disk where temporary files are stored. | ||||||||||||||||||||||||||||||
UseHMACSigning: Whether to use HMAC signing.Set this property to true to make the component perform signing using HMAC method, rather than asymmetric cryptography. | ||||||||||||||||||||||||||||||
UsePSS: Whether to use RSASSA-PSS algorithm.Although the RSASSA-PSS algorithm provides better security than a classic RSA scheme (PKCS#1-1.5), please take into account that RSASSA-PSS is a relatively new algorithm which may not be understood by older implementations. | ||||||||||||||||||||||||||||||
WriteBOM: Specifies whether byte-order mark should be written when saving the document.Set this property to False to disable writing byte-order mark (BOM) when saving the XML document in Unicode encoding. | ||||||||||||||||||||||||||||||
XMLFormatting:
Specifies the signature XML formatting.Use this property to specify how the signature should be formatted.
Supported values:
|
||||||||||||||||||||||||||||||
Base Config Settings | ||||||||||||||||||||||||||||||
CheckKeyIntegrityBeforeUse:
Enables or disable private key integrity check before use.This global property enables or disables private key material check before each signing operation. This slows down performance a bit,
but prevents a selection of attacks on RSA keys where keys with unknown origins are used.
You can switch this property off to improve performance if your project only uses known, good private keys. |
||||||||||||||||||||||||||||||
CookieCaching:
Specifies whether a cookie cache should be used for HTTP(S) transports.Set this property to enable or disable cookies caching for the class.
Supported values are:
|
||||||||||||||||||||||||||||||
Cookies: Gets or sets local cookies for the class (supported for HTTPClient, RESTClient and SOAPClient only).Use this property to get cookies from the internal cookie storage of the class and/or restore them back between application sessions. | ||||||||||||||||||||||||||||||
DefDeriveKeyIterations: Specifies the default key derivation algorithm iteration count.This global property sets the default number of iterations for all supported key derivation algorithms. Note that you can provide the required number of iterations by using properties of the relevant key generation component; this global setting is used in scenarios where specific iteration count is not or cannot be provided. | ||||||||||||||||||||||||||||||
EnableClientSideSSLFFDHE:
Enables or disables finite field DHE key exchange support in TLS clients.This global property enables or disables support for finite field DHE key exchange methods in TLS clients. FF DHE is a slower
algorithm if compared to EC DHE; enabling it may result in slower connections.
This setting only applies to sessions negotiated with TLS version 1.3. |
||||||||||||||||||||||||||||||
GlobalCookies: Gets or sets global cookies for all the HTTP transports.Use this property to get cookies from the GLOBAL cookie storage or restore them back between application sessions. These cookies will be used by all the classes that have its CookieCaching property set to "global". | ||||||||||||||||||||||||||||||
HttpUserAgent: Specifies the user agent name to be used by all HTTP clients.This global setting defines the User-Agent field of the HTTP request provides information about the software that initiates the request. This value will be used by all the HTTP clients including the ones used internally in other classes. | ||||||||||||||||||||||||||||||
LogDestination:
Specifies the debug log destination.Contains a comma-separated list of values that specifies where debug log should be dumped.
Supported values are:
|
||||||||||||||||||||||||||||||
LogDetails:
Specifies the debug log details to dump.Contains a comma-separated list of values that specifies which debug log details to dump.
Supported values are:
|
||||||||||||||||||||||||||||||
LogFile: Specifies the debug log filename.Use this property to provide a path to the log file. | ||||||||||||||||||||||||||||||
LogFilters:
Specifies the debug log filters.Contains a comma-separated list of value pairs ("name:value") that describe filters.
Supported filter names are:
|
||||||||||||||||||||||||||||||
LogFlushMode:
Specifies the log flush mode.Use this property to set the log flush mode. The following values are defined:
|
||||||||||||||||||||||||||||||
LogLevel:
Specifies the debug log level.Use this property to provide the desired debug log level.
Supported values are:
|
||||||||||||||||||||||||||||||
LogMaxEventCount:
Specifies the maximum number of events to cache before further action is taken.Use this property to specify the log event number threshold. This threshold may have different effects,
depending on the rotation setting and/or the flush mode.
The default value of this setting is 100. |
||||||||||||||||||||||||||||||
LogRotationMode:
Specifies the log rotation mode.Use this property to set the log rotation mode. The following values are defined:
|
||||||||||||||||||||||||||||||
MaxASN1BufferLength: Specifies the maximal allowed length for ASN.1 primitive tag data.This global property limits the maximal allowed length for ASN.1 tag data for non-content-carrying structures, such as certificates, CRLs, or timestamps. It does not affect structures that can carry content, such as CMS/CAdES messages. This is a security property aiming at preventing DoS attacks. | ||||||||||||||||||||||||||||||
MaxASN1TreeDepth: Specifies the maximal depth for processed ASN.1 trees.This global property limits the maximal depth of ASN.1 trees that the component can handle without throwing an error. This is a security property aiming at preventing DoS attacks. | ||||||||||||||||||||||||||||||
OCSPHashAlgorithm: Specifies the hash algorithm to be used to identify certificates in OCSP requests.This global setting defines the hash algorithm to use in OCSP requests during chain validation. Some OCSP responders can only use older algorithms, in which case setting this property to SHA1 may be helpful. | ||||||||||||||||||||||||||||||
StaticDNS:
Specifies whether static DNS rules should be used.Set this property to enable or disable static DNS rules for the class. Works only if UseOwnDNSResolver is set to true.
Supported values are:
|
||||||||||||||||||||||||||||||
StaticIPAddress[domain]: Gets or sets an IP address for the specified domain name.Use this property to get or set an IP address for the specified domain name in the internal (of the class) or global DNS rules storage depending on the StaticDNS value. The type of the IP address (IPv4 or IPv6) is determined automatically. If both addresses are available, they are devided by the | (pipe) character. | ||||||||||||||||||||||||||||||
StaticIPAddresses: Gets or sets all the static DNS rules.Use this property to get static DNS rules from the current rules storage or restore them back between application sessions. If StaticDNS of the class is set to "local", the property returns/restores the rules from/to the internal storage of the class. If StaticDNS of the class is set to "global", the property returns/restores the rules from/to the GLOBAL storage. The rules list is returned and accepted in JSON format. | ||||||||||||||||||||||||||||||
Tag: Allows to store any custom data.Use this config property to store any custom data. | ||||||||||||||||||||||||||||||
UseOwnDNSResolver: Specifies whether the client components should use own DNS resolver.Set this global property to false to force all the client components to use the DNS resolver provided by the target OS instead of using own one. | ||||||||||||||||||||||||||||||
UseSharedSystemStorages: Specifies whether the validation engine should use a global per-process copy of the system certificate stores.Set this global property to false to make each validation run use its own copy of system certificate stores. | ||||||||||||||||||||||||||||||
UseSystemOAEPAndPSS:
Enforces or disables the use of system-driven RSA OAEP and PSS computations.This global setting defines who is responsible for performing RSA-OAEP and RSA-PSS computations where the private key is stored in a Windows system store and is exportable.
If set to true, SBB will delegate the computations to Windows via a CryptoAPI call. Otherwise, it will export the key material and perform the computations
using its own OAEP/PSS implementation.
This setting only applies to certificates originating from a Windows system store. |
||||||||||||||||||||||||||||||
UseSystemRandom: Enables or disables the use of the OS PRNG.Use this global property to enable or disable the use of operating system-driven pseudorandom number generation. |
Trappable Errors (SOAPQuickSigner Module)
SOAPQuickSigner Errors
1048577 Invalid parameter value (SB_ERROR_INVALID_PARAMETER) | |
1048578 Class is configured incorrectly (SB_ERROR_INVALID_SETUP) | |
1048579 Operation cannot be executed in the current state (SB_ERROR_INVALID_STATE) | |
1048580 Attempt to set an invalid value to a property (SB_ERROR_INVALID_VALUE) | |
1048581 Certificate does not have its private key loaded (SB_ERROR_NO_PRIVATE_KEY) | |
1048581 Cancelled by the user (SB_ERROR_CANCELLED_BY_USER) | |
33554433 Input file does not exist (SB_ERROR_SOAP_INPUTFILE_NOT_EXISTS) | |
33554434 Invalid key type (SB_ERROR_SOAP_INVALID_KEY_TYPE) | |
33554435 Signature not found (SB_ERROR_SOAP_SIGNATURE_NOT_FOUND) | |
33554436 Unsupported signature type (SB_ERROR_SOAP_UNSUPPORTED_SIGNATURE_TYPE) |