[Mono-list] WCF mono application can't find x509 certificates in stores
ebrown65
ebrown at computer-systems.com
Wed Apr 20 21:13:14 UTC 2016
Hi,
I'm working on a WCF application that must make calls to a web-service. The
program works fine when testing with http. When https is used, I'm getting
the exception "Specified X509 certificate with find type ... was not found
in X509 store ....". The program works fine with https when run on Windows
and .Net, but throws the exception when run in a Linux/Mono setup. I have
added the certificates on the Linux system using the certmgr.exe utility,
and can list them using that same utility, so they seem to be saved in the
stores ok. The application gets its configuration info from its app.config
file. I've attempted to find the certificate using various different
x509FindTypes and findValues (FindBySubjectName, FindBySerialNumber,
FindByThumbprint), and tried adding the certificate to both the machine and
personal stores, but keep getting the same exception, referencing whichever
find type, location, and store I setup. The relevant part of the app.config
is below:
<system.serviceModel>
<client>
<endpoint address="https://webserviceaddress"
binding="basicHttpBinding"
bindingConfiguration="secureBasicHttpBinding"
behaviorConfiguration="secureClientBehavior"
contract="IWebServiceContract">
</endpoint>
</client>
<behaviors>
<endpointBehaviors>
<behavior name="secureClientBehavior" >
<clientCredentials>
<clientCertificate storeLocation="CurrentUser" storeName="My"
x509FindType="FindBySerialNumber"
findValue="AFCB6CC0417B2D459BB1F859CE070661" />
<serviceCertificate>
<authentication revocationMode="NoCheck" />
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="secureBasicHttpBinding"
receiveTimeout="00:10:00" sendTimeout="00:10:00"
maxReceivedMessageSize="2147483647"
maxBufferSize="2147483647">
<security mode="TransportWithMessageCredential">
<message clientCredentialType="Certificate" />
</security>
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
If anyone can offer any help on getting the certificates to be found in the
stores, it would be much appreciated.
Thanks in advance for any replies.
--
View this message in context: http://mono.1490590.n4.nabble.com/WCF-mono-application-can-t-find-x509-certificates-in-stores-tp4667730.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list