| Enrique Rodriguez 2005-07-23, 5:45 pm |
| Alex,
The message you are logging here when the krb5key is not JNDI-configured
to return as bytes appears to be cut short. How about :
String msg = "JNDI property java.naming.ldap.attributes.binary must
include the krb5key attribute."
Enrique
akarasulu-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org wrote:
> Author: akarasulu
> Date: Fri Jul 22 16:16:26 2005
> New Revision: 224418
>
> URL: http://svn.apache.org/viewcvs?rev=224418&view=rev
> Log:
> complaining when a krb5Key is returned as a string rather than converting it into bytes
>
> Modified:
> directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/store/operations/GetPrincipal.java
>
> Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/store/operations/GetPrincipal.java
> URL: http://svn.apache.org/viewcvs/direc...24418&view=diff
> ========================================
======================================
> --- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/store/operations/GetPrincipal.java (original)
> +++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/store/operations/GetPrincipal.java Fri Jul 22 16:16:26 2005
> @@ -32,6 +32,8 @@
> import org.apache.kerberos.store.KerberosAttribute;
> import org.apache.kerberos.store.PrincipalStoreEntry;
> import org.apache.kerberos.store.PrincipalStoreEntryModifier;
> +import org.apache.commons.logging.LogFactory;
> +import org.apache.commons.logging.Log;
>
> /**
> * Encapsulates the action of looking up a principal in an embedded ApacheDS DIT.
> @@ -41,6 +43,7 @@
> */
> public class GetPrincipal implements ContextOperation
> {
> + private final static Log log = LogFactory.getLog( GetPrincipal.class );
> /** The name of the principal to get. */
> private final KerberosPrincipal principal;
>
> @@ -143,7 +146,9 @@
> byte[] keyBytes = null;
> if ( key instanceof String )
> {
> - keyBytes = ( ( String ) key ).getBytes();
> + String msg = "JNDI should not return a string for the kerberos key: check the ";
> + log.error( msg );
> + throw new NamingException( msg );
> }
> else
> {
>
>
>
|