Upgrade to Capicom 2.1.0.2 makes the Verify method to fail



Hello.
We have a client-server application where the client signs the message
before passing it to the server. The server verifies the messages before
processing the request.
The application is written in .net 1.1 C#. Both methods (sign and verify)
worked fine with the Capicom 2.0.0.3 version. After the installation of the
KB931906 on the server, which upgraded Capicom to version 2.1.0.2, the Verify
method returns Certificate Invalid. (though the upgrade has been available
for some time, it is only recently that we upgraded.)
I have tried upgrading the client pc as well but it did not make any
difference.
The code is as follows:

public static bool Verify(string contents, string base64SignedStr)
{
ICertificate certificate = null;

try
{
CAPICOM.ISignedData signedData = new
CAPICOM.SignedDataClass();
signedData.Content = contents;

signedData.Verify(base64SignedStr, true,
CAPICOM.CAPICOM_SIGNED_DATA_VERIFY_FLAG.CAPICOM_VERIFY_SIGNATURE_AND_CERTIFICATE);

//Indexer doesn't work, so use Enumerator instead...
foreach (object signer in signedData.Signers)
{
CAPICOM.ISigner2 sig = (CAPICOM.ISigner2)signer;

certificate = sig.Certificate;
break;
}
}
catch (Exception ex)
{
System.Diagnostics.EventLog.WriteEntry("CertVerify",
"Exception: " + ex.ToString(), System.Diagnostics.EventLogEntryType.Error);
}


CAPICOM.ICertificateStatus status = certificate.IsValid();
bool bResult = status.Result;

return bResult;
}

We are relying on the (CAPICOM.ICertificateStatus) status.Result to indicate
whether the verification was successful or not. With the 2.0.0.3 version of
Capicom, it returns "true". With 2.1.0.2 "false" is returned.
I have tested with the same code and with the same content and signature,
and the two Capicom versions are returning different results.
Another note is that in order to compile and run with the 2.1.0.2 version of
Capicom.dll I had to use .Net 2. However, the code itself is exactly the same
as in .Net 1.1.

Any help would be higly appreciated.
Please let me know if any other details are required.
Elena
.



Relevant Pages

  • Re: upgrade w2k to w2003 running Exchange 2003
    ... The client wants to upgrade to Windows 2003 Server on the box ... > while keeping Exchange Server and Active Directory intact. ... Any advise on the upgrade is welcome.. ...
    (microsoft.public.windows.server.setup)
  • Re: domain upgrade path... need comments please
    ... I've told many a client the same ... > server to a 2003 DC. ... > servers will need to get rebooted at least once after the upgrade to ... Do AD first, let things stabilize, then do the Exchange ...
    (microsoft.public.exchange.admin)
  • Re: domain upgrade path... need comments please
    ... I've told many a client the same ... > server to a 2003 DC. ... > servers will need to get rebooted at least once after the upgrade to ... Do AD first, let things stabilize, then do the Exchange ...
    (microsoft.public.windows.server.networking)
  • Re: File in use when opening VB app
    ... I had previously created a Personal Macro Workbook and every time I have a ... On the server, right-click on My Computer, then select Manage, expand ... but a client of ours gets a message ... This started occurring after they did an upgrade to ...
    (microsoft.public.excel.programming)
  • Re: What doesnt lend itself to OO?
    ... >> proxy and instructs the server to constuct the real object. ... rather than client code. ... If 'clock' is instantiated in the server, ... > for the server interface at the OOA level. ...
    (comp.object)

Loading