Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Browser Encryption check

 
Nilesh Bhise
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nilesh Bhise:
request.getAttribute("javax.servlet.request.key_size");


Try this

 
Nilesh Bhise
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic