Content:
|
The December issue of The Delphi Magazine will contain an article about my experiences with extending SOAP and Web Services with security options like authentication and encryption. In the article, I'm using both SOAP Headers, RSA Encryption and X509 certificates, using mainly ASP.NET but also showing Win32 examples.
As usual, the article is based on real-world experiences, and one of the little issues I've encountered with Delphi 2005 is the use of Web Service Enhancements version 2.0 for ASP.NET Web Services. Specifically, the WSE 2.0 X509CertificateStore constants for MyStore, OtherPeople (aka AddressBook), etc.
I'm not going to mention the fact that Windows 2003 doesn't always offer an OtherPeople store for certificates - read the fine magazine for tips on that issue.
What I can't allow to go unnoticed - and have reported to Quality Central as #20484 - is the following: When using WSE 2.0 with Delphi for .NET, you can use the X509CertificateStore class to open a x509 certificate store. There are a number of predefined store names, which can be access through constants, namely:
X509CertificateStore.MyStore // My X509CertificateStore.CAStore // CA X509CertificateStore.RootStore // Root X509CertificateStore.TrustStore // Trust X509CertificateStore.OtherPeople // AddressBook X509CertificateStore.UnTrustedStore
However, the value of these constants are cut in half using Delphi 2005. Instead of string values like "My" and "CA", I get only "M", "C", "Ro", "Tr", "Addre", and "Disal". The cut is exactly in half, so it may be a Wide/Ansi/Unicode string issue?
Anyway, when my code didn't work (the X509CertificateStore.MyStore certificate store refused to be opened), it took me a little while to figure out that all other source lines were correct (and so were the deployed certificates with the public key imported in the CurrentUser's Personal as well as OtherPeople store, and the public/private key combination imported in the Server's LocalMachine Personal store).
Since this took me a little while to figure out, it may save you some time if you're in the same situation. Of course, there's a good chance it will be fixed in DeXter ;-)
|