Index: MessageDigest.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/security/MessageDigest.java,v retrieving revision 1.13 diff -u -r1.13 MessageDigest.java --- MessageDigest.java 2 Jul 2005 20:32:40 -0000 1.13 +++ MessageDigest.java 27 Dec 2005 00:15:36 -0000 @@ -167,9 +167,10 @@ public static MessageDigest getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { - if (provider == null || provider.length() == 0) + if (provider == null || provider.trim().length() == 0) throw new IllegalArgumentException("Illegal provider"); + provider = provider.trim(); Provider p = Security.getProvider(provider); if (p == null) throw new NoSuchProviderException(provider); Index: Engine.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/security/Engine.java,v retrieving revision 1.2 diff -u -r1.2 Engine.java --- Engine.java 2 Jul 2005 20:32:14 -0000 1.2 +++ Engine.java 27 Dec 2005 00:16:19 -0000 @@ -130,10 +130,15 @@ Provider provider, Object[] initArgs) throws InvocationTargetException, NoSuchAlgorithmException { - if (service == null || algorithm == null + if (service == null || service.trim().length() == 0 + || algorithm == null || algorithm.trim().length() == 0 || provider == null || initArgs == null) - throw new IllegalArgumentException(); + { + throw new IllegalArgumentException(); + } + service = service.trim(); + algorithm = algorithm.trim(); // If there is no property "service.algorithm" if (provider.getProperty(service + "." + algorithm) == null) { Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.5898 diff -u -r1.5898 ChangeLog --- ChangeLog 25 Dec 2005 11:06:38 -0000 1.5898 +++ ChangeLog 27 Dec 2005 00:23:40 -0000 @@ -1,3 +1,15 @@ +2005-12-27 raif + + * java/security/MessageDigest.java (getInstance(String,String)): + use trimmed copy of provider name. + * gnu/java/security/Engine.java (getInstance(String,String,Provider,Object[])): + use trimmed copy of service and algorithm names. + +2005-12-27 raif + + * java/net/InetAddress.java (getAllByName): use LOCALHOST if localhost is + null or is an empty string. + 2005-12-25 Jeroen Frijters * java/util/Collections.java