• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Browser Encryption check

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic