/** * This method gets the distinguished name from toOwnerString and massages it * for persistence: canonical form and convert to lower case. * * @param subject * @return persistable distinguished name or null if there is no * X500Principal in the subject */ public Object toOwner(Subject subject) { String dn = toOwnerString(subject); if (dn != null) return AuthenticationUtil.canonizeDistinguishedName(dn); return dn; }