| | |
| | | String QOP = getQOP(configuration); |
| | | saslProps = new HashMap<String,String>(); |
| | | saslProps.put(Sasl.QOP, QOP); |
| | | if(QOP.equalsIgnoreCase(SASL_MECHANISM_CONFIDENTIALITY)) { |
| | | saslProps.put(Sasl.STRENGTH, getStrength(configuration)); |
| | | } |
| | | String realm=getRealm(configuration); |
| | | if(realm != null) { |
| | | msg = INFO_DIGEST_MD5_REALM.get(realm); |
| | |
| | | String QOP = getQOP(configuration); |
| | | saslProps = new HashMap<String,String>(); |
| | | saslProps.put(Sasl.QOP, QOP); |
| | | if(QOP.equalsIgnoreCase(SASL_MECHANISM_CONFIDENTIALITY)) { |
| | | saslProps.put(Sasl.STRENGTH, getStrength(configuration)); |
| | | } |
| | | String realm=getRealm(configuration); |
| | | if(realm != null) { |
| | | msg = INFO_DIGEST_MD5_REALM.get(realm); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the cipher strength string to use if confidentiality is enforce. |
| | | * This determination is the lowest value that the server can use. |
| | | * |
| | | * @param configuration The configuration to examine. |
| | | * @return The cipher strength string. |
| | | */ |
| | | private String |
| | | getStrength(DigestMD5SASLMechanismHandlerCfg configuration) { |
| | | CipherStrength strength = configuration.getCipherStrength(); |
| | | if(strength.equals(CipherStrength.HIGH)) { |
| | | return "high"; |
| | | } else if(strength.equals(CipherStrength.MEDIUM)) { |
| | | return "high,medium"; |
| | | } else { |
| | | return "high,medium,low"; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Retrieves the QOP (quality-of-protection) from the specified |
| | | * configuration. |
| | | * |