I’m trying to use client certificate for SSL connection, like this:
[...]
X509Certificate2Collection collection = new X509Certificate2Collection ();
collection.Add (new X509Certificate2 (pfxCertFile.bytes, "password"));
stream.AuthenticateAsClient ("server", collection, SslProtocols.Ssl3, false);
[...]
It works on Andoird platform but on WebPlayer a get this error:
The type System.Security.Cryptography.X509Certificates.X509Certificate2' does not contain a constructor that takes
2’ arguments
In WebPlayer platform I have access to these contructors:
X509Certificate2:
X509Certificate2 (Byte[])
X509Certificate2 (String)
X509Certificate2 (X509Certificate)
X509Certificate:
X509Certificate (Byte[])
X509Certificate (X509Certificate)
X509Certificate ()
X509Certificate (SerializationInfo, StreamingContext)
I’m using a PFX file that contains the certificat and private key (self signed). To access the file I need to specify password.
My quiestion is:
How can I pass the PFX file and password to the X509Certificate object on WebPlayer platform?
Is there another way to get the ‘AuthenticateAsClient ()’ with client cert working on WebPlayer platform?