Chilkat 24-Dec-2021 — CMS Sign Hash

What’s going on in Chilkat support today…

1. A customer needs a way to create a CMS detached signature from a pre-computed hash.  Oddly, Chilkat did not yet have a function for doing it.  The CMS signature functions in Crypt2 accept data and do the hashing internally.  Chilkat is adding a Crypt2.SignHashENC method, as shown here in this example:   https://www.example-code.com/csharp/cms_sign_hash.asp  Obviously, the same example exists in the other programming languages.  Just change the programming language part of the URL.  For example:  https://www.example-code.com/java/cms_sign_hash.asp

2. Someone asked about getting the full name and username from Active Directory (LDAP).  Not Azure AD, but the old AD.   Chilkat does not have this functionality, but one idea might be this:   Find out how it can be done from C#, and then write your own middleware DLL (written in C#) that is called from Delphi.

A) For example, this describes a mechanism to call C# from Delphi:
https://stackoverflow.com/questions/6174584/call-c-sharp-dll-from-delphi

B) And perhaps this has the recipes for doing what is needed in C#:   https://stackoverflow.com/questions/6174584/call-c-sharp-dll-from-delphi

In summary, you might create a C# project that calls the needed functionality in (B) and exports your wrapper functions, which are then called from Delphi.  There may be better solutions, I haven’t looked extensively…

3. An error was encountered on a Windows Server 2012 R2 Datacenter machine when trying to install the Chilkat ActiveX via the .msi (Advanced Installer).  The error was “HRESULT: 0x80070422”.   (Don’t you love the useless HRESULT + hex number error codes?)  Chilkat has never heard of this error previously, so the best course of action is to Google the error.  Type “HRESULT 0x80070422” into Google to find out if others have already solved the problem.  In this case, many of the answers seem to center around “my Windows Modules Installer service was disabled. Go to Control Panel, Administrative Services, Local …”.

Google the error message.

4. Question about how to sign SOAP XML for a tax invoice to be sent to the government of Croatia.  (XML Digital Signature)  This is for XML beginning like this:

<tns:RacunZahtjev xmlns:tns="http://www.apis-it.hr/fin/2012/types/f73" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.apis-it.hr/fin/2012/types/f73.../schema/FiskalizacijaSchema.xsd">
  <tns:Zaglavlje>
    ...

The best way to solve this kind of problem is to take an already signed XML SOAP message that is known to be valid, and then paste it into Chilkat’s online tool at https://tools.chilkat.io/xmlDsigGen.cshtml    The tool will generate the necessary code to produce the signed XML that was input.

Chilkat 21-Dec-2021 — PHP Versions to Internal PHP API Versions

Chilkat 29-Dec-2021 – IMAP Server Response: BAD Command received in Invalid state

 

Tags :