1 16 package org.mortbay.jetty.servlet; 17 18 19 28 public class ServletSSL 29 { 30 31 57 public static final int deduceKeyLength(String cipherSuite) 58 { 59 if (cipherSuite == null) 61 return 0; 62 else if (cipherSuite.indexOf("WITH_RC4_128_") >= 0) 63 return 128; 64 else if (cipherSuite.indexOf("WITH_AES_128_") >= 0) 65 return 128; 66 else if (cipherSuite.indexOf("WITH_RC4_40_") >= 0) 67 return 40; 68 else if (cipherSuite.indexOf("WITH_3DES_EDE_CBC_") >= 0) 69 return 168; 70 else if (cipherSuite.indexOf("WITH_IDEA_CBC_") >= 0) 71 return 128; 72 else if (cipherSuite.indexOf("WITH_RC2_CBC_40_") >= 0) 73 return 40; 74 else if (cipherSuite.indexOf("WITH_DES40_CBC_") >= 0) 75 return 40; 76 else if (cipherSuite.indexOf("WITH_DES_CBC_") >= 0) 77 return 56; 78 else 79 return 0; 80 } 81 } 82 | Popular Tags |