Home > Net >  Two-way authentication using HTTPS truststore and keystore
Two-way authentication using HTTPS truststore and keystore

Time:09-22

Need to use the HTTPS two-way authentication to customer website through providing a JKS KEYSTORE and a truststore
The customer for the DEMO is a JAVA
C # online search nothing information
The HTTPREQUEST
JAVA CODE
String keyStorePath="XXXXX \ \ XXX. Keystore";//container path
String keyStorePasswd="123456";//password
String trustStorePath="XXXXX \ \ XXX. Truststore";
String trustStorePasswd="123456";

InputStream keyInstream=null;
InputStream trustInstream=null;
Try {

KeyStore KeyStore=KeyStore. GetInstance (KeyStore. GetDefaultType ());
KeyStore trustStore=KeyStore. GetInstance (KeyStore. GetDefaultType ());

InputStream isPriv=new FileInputStream (new File (keyStorePath));
InputStream isTrust=new FileInputStream (new File (trustStorePath));

KeyStore. Load (isPriv keyStorePasswd. ToCharArray ());
TrustStore. Load (isTrust, trustStorePasswd. ToCharArray ());

Could you tell me how to call c # need?
  •  Tags:  
  • C#
  • Related