wood burning stoves 2.0*
The moose likes Servlets and the fly likes Browser Encryption check Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Browser Encryption check" Watch "Browser Encryption check" New topic
Author

Browser Encryption check

Nilesh Bhise
Greenhorn

Joined: May 17, 2005
Posts: 2
Hey Guy,

I am trying to find encryption strength for browser using servelt. Requirement is to allow only 128-bit encryption supported browsers. Please help.

I tried following code but does not work (returns null)
---------->
1. Integer size = (Integer) request.getAttribute("javax.servlet.request.key_size");

2. System.out.println("------------------- 128-bit size: " + size);

3. if (size == null || size.intValue() < 128) {
System.out.println("******************* Browser DOES NOT support 128-bit encryption **********************");
}
else {
System.out.println("******************* Browser SUPPORT 128-bit encryption **********************");
}
-------->

-NB
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by Nilesh Bhise:
request.getAttribute("javax.servlet.request.key_size");


Try this

Nilesh Bhise
Greenhorn

Joined: May 17, 2005
Posts: 2
Hello,

Here is the new development.

I tried your suggestion on my local machine (weblogic 8.1 sp3)

and output was as follows:

------------------- 128-bit size: 56
------------------- Cipher : TLS_RSA_WITH_DES_CBC_SHA

My browser supports 128 encryption and I wonder why it is returning 56 as value.

The code snippet is as follows:


1. Integer size = (Integer) request.getAttribute("javax.servlet.request.key_size");
2 String abc = (String) request.getAttribute("javax.servlet.request.cipher_suite");
System.out.println("------------------- 128-bit size: " + size);
System.out.println("------------------- Cipher : " + abc);

if (size == null || size.intValue() < 128) {
System.out.println("******************* Browser DOES NOT support 128-bit encryption **********************");
}
else {
System.out.println("******************* Browser SUPPORT 128-bit encryption **********************");
}
---NB
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Browser Encryption check
 
Similar Threads
File Upload using JSP
Stored procedure which returns array
Select turning invisible randomly
Playing with String
setrequestheader() - User-Agent - no good?