Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Servlets
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Servlets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 2nd, 2004, 07:18 PM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default java to C# translation

Does anyone know the .net equivalent of this java code:

public void init(ServletConfig config) thows ServletException {
     super.init(config);

   //Set up SSL properties to find the keystore correctly
  System.setProperty("javax.net.debug","all");
System.setProperty("javax.net.ssl.keystore", "/var/tomcat4keys/keystore");
System.setProperty("javax.net.ssl.keyStorePassword ", "SDKTest");
System.setProperty("java.protocol.handler.pkgs","c om.sun.net.ssl.internal.www.protocol");

//Make sure java is configured to handle https by adding the
//appropriate SSL provider to the security manager.
java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

}

this piece of code specifies the use of SSL, keystore, and keystore password and a certificate for all communications between 2 servers

does anyone have any idea? thanks in advance

vin


 
Old September 22nd, 2004, 06:39 PM
Registered User
 
Join Date: Sep 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

vin,

did you get any answer yet?

thanks

john


Quote:
quote:Originally posted by vinny4545
 Does anyone know the .net equivalent of this java code:

public void init(ServletConfig config) thows ServletException {
     super.init(config);

//Set up SSL properties to find the keystore correctly
System.setProperty("javax.net.debug","all");
System.setProperty("javax.net.ssl.keystore", "/var/tomcat4keys/keystore");
System.setProperty("javax.net.ssl.keyStorePassword ", "SDKTest");
System.setProperty("java.protocol.handler.pkgs","c om.sun.net.ssl.internal.www.protocol");

//Make sure java is configured to handle https by adding the
//appropriate SSL provider to the security manager.
java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

}

this piece of code specifies the use of SSL, keystore, and keystore password and a certificate for all communications between 2 servers

does anyone have any idea? thanks in advance

vin


 
Old June 24th, 2008, 04:38 AM
Registered User
 
Join Date: Jun 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Vin/Johnnz,
  Have you found the way to do this? i am also having certificates in the form of keystores. I wanted to use them in c# as just like in Java. Could you please let me know if you have got any idea about to resolve this?

 
Old September 4th, 2015, 12:37 PM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Try this

http://blog.ejbca.org/2008/02/conver...n-jks-and.html




Similar Threads
Thread Thread Starter Forum Replies Last Post
Code translation from ASP to C# motemape ASP.NET 2.0 Basics 0 May 27th, 2007 12:01 PM
i18n Translation jagadeesh BOOK: Expert One-on-One J2EE Design and Development 0 June 13th, 2006 08:18 AM
Universal Translation in BizTalk2004 karjagis Biztalk 0 April 21st, 2006 10:00 AM
java to C# translation vinny4545 ASP.NET 1.0 and 1.1 Professional 0 July 2nd, 2004 07:19 PM
Code translation gbaker BOOK: Beginning Java 2 3 December 3rd, 2003 11:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.