SecureBlackbox 2020 PHP Edition

Questions / Feedback?

ASiCSigner Class

Properties   Methods   Events   Configuration Settings   Errors  

The ASiCSigner class creates signature containers.

Class Name

SecureBlackbox_ASiCSigner

Procedural Interface

 secureblackbox_asicsigner_open();
 secureblackbox_asicsigner_close($res);
 secureblackbox_asicsigner_register_callback($res, $id, $function);
 secureblackbox_asicsigner_get_last_error($res);
 secureblackbox_asicsigner_get_last_error_code($res);
 secureblackbox_asicsigner_set($res, $id, $index, $value);
 secureblackbox_asicsigner_get($res, $id, $index);
 secureblackbox_asicsigner_do_config($res, $configurationstring);
 secureblackbox_asicsigner_do_extractasyncdata($res, $asyncreply);
 secureblackbox_asicsigner_do_sign($res);
 secureblackbox_asicsigner_do_signasyncbegin($res);
 secureblackbox_asicsigner_do_signasyncend($res, $asyncreply);
 secureblackbox_asicsigner_do_signexternal($res);
 secureblackbox_asicsigner_do_timestamp($res, $timestamptype);
 secureblackbox_asicsigner_do_upgrade($res, $tolevel);

Remarks

ASiCSigner provides functionality for creating Associated Signature Containers. ASiC containers are used to bind together signed objects and electronic signatures or timestamps.

ASiCSigner supports both ASiC-S (simple) and ASiC-E (extended) signature profiles, as well as the three types of signatures (CAdES, XAdES, and timestamps).

Property List


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

BlockedCertCountThe number of records in the BlockedCert arrays.
BlockedCertBytesReturns raw certificate data in DER format.
BlockedCertHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
ChainValidationDetailsThe details of a certificate chain validation outcome.
ChainValidationResultThe general outcome of a certificate chain validation routine. Use ChainValidationDetails to get information about the reasons that contributed to the validation result.
ClaimedSigningTimeThe signing time from the signer's computer.
ExtendedSpecifies the type of ASiC signature.
ExternalCryptoCustomParamsCustom parameters to be passed to the signing service (uninterpreted).
ExternalCryptoDataAdditional data to be included in the async state and mirrored back by the requestor.
ExternalCryptoExternalHashCalculationSpecifies whether the message hash is to be calculated at the external endpoint.
ExternalCryptoHashAlgorithmSpecifies the request's signature hash algorithm.
ExternalCryptoKeyIDThe ID of the pre-shared key used for DC request authentication.
ExternalCryptoKeySecretThe pre-shared key used for DC request authentication.
ExternalCryptoMethodSpecifies the asynchronous signing method.
ExternalCryptoModeSpecifies the external cryptography mode.
ExternalCryptoPublicKeyAlgorithmProvide public key algorithm here if the certificate is not available on the pre-signing stage.
HashAlgorithmThe hash algorithm to be used in signature computation.
IgnoreChainValidationErrorsMakes the class tolerant to chain validation errors.
InputBytesUse this property to pass the input to class in the byte array form.
InputFileA path to the ASiC container to process.
KnownCertCountThe number of records in the KnownCert arrays.
KnownCertBytesReturns raw certificate data in DER format.
KnownCertHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
KnownCRLCountThe number of records in the KnownCRL arrays.
KnownCRLBytesReturns raw CRL data in DER format.
KnownCRLHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
KnownOCSPCountThe number of records in the KnownOCSP arrays.
KnownOCSPBytesBuffer containing raw OCSP response data.
KnownOCSPHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
LevelSpecifies the level according to which the inner AdES signature is to be composed.
OfflineModeSwitches the class to the offline mode.
OutputBytesUse this property to read the output the class object has produced.
OutputFileThe file where the signed data will be saved.
PolicyHashThe signature policy hash value.
PolicyHashAlgorithmThe algorithm that was used to calculate the signature policy hash.
PolicyIDThe policy ID to be included into the signature.
PolicyURIThe signature policy URI to be included in the signature.
ProfileSpecifies a pre-defined profile to apply when creating the signature.
ProxyAddressThe IP address of the proxy server.
ProxyAuthenticationThe authentication type used by the proxy server.
ProxyPasswordThe password to authenticate to the proxy server.
ProxyPortThe port on the proxy server to connect to.
ProxyProxyTypeThe type of the proxy server.
ProxyRequestHeadersContains HTTP request headers for WebTunnel and HTTP proxy.
ProxyResponseBodyContains the HTTP or HTTPS (WebTunnel) proxy response body.
ProxyResponseHeadersContains response headers received from an HTTP or HTTPS (WebTunnel) proxy server.
ProxyUseIPv6Specifies whether IPv6 should be used when connecting through the proxy.
ProxyUseProxyEnables or disables proxy-driven connection.
ProxyUsernameSpecifies the username credential for proxy authentication.
RevocationCheckSpecifies the kind(s) of revocation check to perform.
SignatureIndexThe index of the signature to update.
SignatureTypeSpecifies the kind of signature to be created.
SigningCertBytesReturns raw certificate data in DER format.
SigningCertHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
SigningChainCountThe number of records in the SigningChain arrays.
SigningChainBytesReturns raw certificate data in DER format.
SigningChainHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
SocketDNSModeSelects the DNS resolver to use: the class's (secure) built-in one, or the one provided by the system.
SocketDNSPortSpecifies the port number to be used for sending queries to the DNS server.
SocketDNSQueryTimeoutThe timeout (in milliseconds) for each DNS query.
SocketDNSServersThe addresses of DNS servers to use for address resolution, separated by commas or semicolons.
SocketDNSTotalTimeoutThe timeout (in milliseconds) for the whole resolution process.
SocketIncomingSpeedLimitThe maximum number of bytes to read from the socket, per second.
SocketLocalAddressThe local network interface to bind the socket to.
SocketLocalPortThe local port number to bind the socket to.
SocketOutgoingSpeedLimitThe maximum number of bytes to write to the socket, per second.
SocketTimeoutThe maximum period of waiting, in milliseconds, after which the socket operation is considered unsuccessful.
SocketUseIPv6Enables or disables IP protocol version 6.
SourceBytesUse this property to pass the content to sign in the byte array form.
SourceFilesThe files to be packed into the container.
SourceNameUse this property to specify the name of the file being signed if passing it via the SourceBytes property.
TimestampServerThe address of the timestamping server.
TLSClientCertCountThe number of records in the TLSClientCert arrays.
TLSClientCertBytesReturns raw certificate data in DER format.
TLSClientCertHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
TLSServerCertCountThe number of records in the TLSServerCert arrays.
TLSServerCertBytesReturns raw certificate data in DER format.
TLSServerCertHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
TLSAutoValidateCertificatesSpecifies whether server-side TLS certificates should be validated automatically using internal validation rules.
TLSBaseConfigurationSelects the base configuration for the TLS settings.
TLSCiphersuitesA list of ciphersuites separated with commas or semicolons.
TLSECCurvesDefines the elliptic curves to enable.
TLSForceResumeIfDestinationChangesWhether to force TLS session resumption when the destination address changes.
TLSPreSharedIdentityDefines the identity used when the PSK (Pre-Shared Key) key-exchange mechanism is negotiated.
TLSPreSharedKeyContains the pre-shared for the PSK (Pre-Shared Key) key-exchange mechanism, encoded with base16.
TLSPreSharedKeyCiphersuiteDefines the ciphersuite used for PSK (Pre-Shared Key) negotiation.
TLSRenegotiationAttackPreventionModeSelects renegotiation attack prevention mechanism.
TLSRevocationCheckSpecifies the kind(s) of revocation check to perform.
TLSSSLOptionsVarious SSL (TLS) protocol options, set of cssloExpectShutdownMessage 0x001 Wait for the close-notify message when shutting down the connection cssloOpenSSLDTLSWorkaround 0x002 (DEPRECATED) Use a DTLS version workaround when talking to very old OpenSSL versions cssloDisableKexLengthAlignment 0x004 Do not align the client-side PMS by the RSA modulus size.
TLSTLSModeSpecifies the TLS mode to use.
TLSUseExtendedMasterSecretEnables Extended Master Secret Extension, as defined in RFC 7627.
TLSUseSessionResumptionEnables or disables TLS session resumption capability.
TLSVersionsTh SSL/TLS versions to enable by default.
TrustedCertCountThe number of records in the TrustedCert arrays.
TrustedCertBytesReturns raw certificate data in DER format.
TrustedCertHandleAllows to get or set a 'handle', a unique identifier of the underlying property object.
ValidationLogContains the complete log of the certificate validation routine.

Method List


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

ConfigSets or retrieves a configuration setting.
ExtractAsyncDataExtracts user data from the DC signing service response.
SignSigns the chosen files and packs them into an ASiC archive.
SignAsyncBeginInitiates the asynchronous signing operation.
SignAsyncEndCompletes the asynchronous signing operation.
SignExternalSigns the document using an external signing facility.
TimestampUse this method to add timestamp.
UpgradeUpgrades existing CAdES or XAdES signature to a new level.

Event List


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

ErrorInformation about any errors that occur during signing or archiving.
ExternalSignHandles remote or external signing initiated by the SignExternal method or other source.
NotificationThis event notifies the application about an underlying control flow event.
StoreCertificateThis event is fired when a certificate should be stored along with a signature.
StoreCRLThis event is fired when a CRL should be stored along with a signature.
StoreOCSPResponseThis event is fired when a OCSP Response should be stored along with a signature.
TLSCertValidateThis event is fired upon receipt of the TLS server's certificate, allowing the user to control its acceptance.

Configuration Settings


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

ASiCOptionsSpecifies the ASiC options.
AsyncDocumentIDSpecifies the document ID for SignAsyncEnd() call.
CmsOptAnnexKArchiveTimestampV2ModeToggles use of Annex K method of calculating validation timestamp hashes.
CmsOptCheckATSHashIndexElementsEnables extra checks when processing ATSHashIndex attribute.
CmsOptCompareRDNAsStringsEnforces comparison of RDN elements as text strings, rather than their byte encodings.
CmsOptDigitPADSSCompatibilityEnables Digit PADSS compatibility mode.
CmsOptForceSigningCertificateV2UsageEnforces use of signing-certificate-v2 attribute.
CmsOptIgnoreDERReqInArchiveTimestampsSwitches off DER encoding requirement for archival timestamps.
CmsOptImzagerMIMCompatibilityEnables Imzager MIM compatibility mode.
CmsOptIncludeCertToAttributesRegulates whether to include the signing certificate to the signature as the signing-certificate attribute.
CmsOptIncludeCertToMessageRegulates whether to include the signing certificate and its chain to the CMS.
CmsOptInsertContentTypeRegulates whether the content-type time attribute should be included in the signature structure.
CmsOptInsertMessageDigestsRegulates whether the message-digest signed attribute should be included in the signature structure.
CmsOptInsertSigningTimeRegulates whether the signing-time attribute should be included in the signature structure.
CmsOptSkipEnvContentInfoOnSigArchivalExcludes hashing of enveloped content when calculating an archival timestamp.
CmsOptUseATSHashIndexV1Enables use of ATSHashIndexV1 attribute.
CmsOptUseGeneralizedTimeFormatEnables or disables encoding of the signing-time attribute using ASN.1 GENERALIZEDTIME type.
CmsOptUseGenericSigAlgorithmOIDsEnables use of generic signature algorithm OIDs in the signature.
CmsOptUsePlainContentForTimestampHashesMakes CAdESSigner ignore ASN.1 content formatting when calculating timestamp hashes.
ContentTypeSpecifies the content-type of the container.
ForceCompleteChainValidationWhether to check the CA certificates when the signing certificate is invalid.
ForceCompleteChainValidationForTrustedWhether to continue with the full validation up to the root CA certificate for mid-level trust anchors.
GenerateMetaInfEntrySpecifies whether the directory META-INF entry should be generated.
GracePeriodSpecifies a grace period to apply during revocation information checks.
IgnoreChainValidationErrorsWhether to ignore any certificate chain validation issues.
IgnoreOCSPNoCheckExtensionWhether OCSP NoCheck extension should be ignored.
IgnoreSystemTrustWhether trusted Windows Certificate Stores should be treated as trusted.
ImplicitlyTrustSelfSignedCertificatesWhether to trust self-signed certificates.
PolicyExplicitTextThe explicit text of the user notice.
PolicyUNNumbersThe noticeNumbers part of the NoticeReference CAdES or XAdES attribute.
PolicyUNOrganizationThe organization part of the NoticeReference qualifier.
ProductionPlaceThe value to store in the ProductionPlace XAdES attribute.
PromoteLongOCSPResponsesWhether long OCSP responses are requested.
RefHashAlgorithmSpecifies the hash algorithm for references.
RefMimeTypeSpecifies the MIME type to apply to the processed file.
TempPathPath for storing temporary files.
TimestampResponseA base16-encoded timestamp response received from a TSA.
TLSChainValidationDetailsContains the advanced details of the TLS server certificate validation.
TLSChainValidationResultContains the result of the TLS server certificate validation.
TLSClientAuthRequestedIndicates whether the TLS server requests client authentication.
TLSValidationLogContains the log of the TLS server certificate validation.
TolerateMinorChainIssuesWhether to tolerate minor chain issues.
UseMicrosoftCTLEnables or disables automatic use of Microsoft online certificate trust list.
UseSystemCertificatesEnables or disables the use of the system certificates.
UseUTF8FilenamesSpecifies whether to use UTF-8 filenames.
CheckKeyIntegrityBeforeUseEnables or disable private key integrity check before use.
CookieCachingSpecifies whether a cookie cache should be used for HTTP(S) transports.
CookiesGets or sets local cookies for the class (supported for HTTPClient, RESTClient and SOAPClient only).
DefDeriveKeyIterationsSpecifies the default key derivation algorithm iteration count.
EnableClientSideSSLFFDHEEnables or disables finite field DHE key exchange support in TLS clients.
GlobalCookiesGets or sets global cookies for all the HTTP transports.
HttpUserAgentSpecifies the user agent name to be used by all HTTP clients.
LogDestinationSpecifies the debug log destination.
LogDetailsSpecifies the debug log details to dump.
LogFileSpecifies the debug log filename.
LogFiltersSpecifies the debug log filters.
LogFlushModeSpecifies the log flush mode.
LogLevelSpecifies the debug log level.
LogMaxEventCountSpecifies the maximum number of events to cache before further action is taken.
LogRotationModeSpecifies the log rotation mode.
MaxASN1BufferLengthSpecifies the maximal allowed length for ASN.1 primitive tag data.
MaxASN1TreeDepthSpecifies the maximal depth for processed ASN.1 trees.
OCSPHashAlgorithmSpecifies the hash algorithm to be used to identify certificates in OCSP requests.
UseOwnDNSResolverSpecifies whether the client classes should use own DNS resolver.
UseSharedSystemStoragesSpecifies whether the validation engine should use a global per-process copy of the system certificate stores.
UseSystemOAEPAndPSSEnforces or disables the use of system-driven RSA OAEP and PSS computations.
UseSystemRandomEnables or disables the use of the OS PRNG.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox 2020 PHP Edition - Version 20.0 [Build 8154]