code: public static ChallengeSet readAssignedChallengeSet(
              final ChaiProvider provider,
              final ChaiPasswordPolicy passwordPolicy,
              final Locale locale
      )
              throws ChaiUnavailableException, ChaiOperationException, ChaiValidationException
      {
          final String challengeSetDN;
  
          try
          {
              challengeSetDN = ( ( NspmPasswordPolicy ) passwordPolicy ).getChallengeSetDN();
          }
          catch ( ClassCastException e )
          {
              LOGGER.trace( "password policy is not an nmas password policy, unable to read challenge set policy" );
              return null;
          }
  
          if ( challengeSetDN == null )
          {
              LOGGER.trace( "password policy does not have a challengeSetDN, return null for readAssignedChallengeSet()" );
              return null;
          }
  
          final String identifier = ( ( NspmPasswordPolicy ) passwordPolicy ).readStringAttribute( "nsimChallengeSetGUID" );
          return readNmasAssignedChallengeSetPolicy( provider, challengeSetDN, locale, identifier );
      }
docs: <p>Read the theUser's configured ChallengeSet from the directory.  Operations are performed according
  to the ChaiConfiguration found by looking at the ChaiProvider underlying the ChaiEntry.  For example,
  the setting {@link com.novell.ldapchai.provider.ChaiSetting#EDIRECTORY_ENABLE_NMAS} determines if NMAS calls
  are used to discover a universal password c/r policy.</p>
  
  <p>This method is preferred over {@link #readAssignedChallengeSet(com.novell.ldapchai.ChaiUser)}, as it does not
  require a (possibly unnecessary) call to read the user's assigned password policy.</p>
  
  @param provider       provider used for ldap communication
  @param passwordPolicy the policy to examine to find a challenge set.
  @param locale         desired retreival locale.  If the stored ChallengeSet is internationalized,
  the appropriate localized strings will be returned.
  @return A valid ChallengeSet if found, otherwise null.
  @throws ChaiOperationException   If there is an error during the operation
  @throws ChaiUnavailableException If the directory server(s) are unavailable
  @throws ChaiValidationException  when there is a logical problem with the challenge set data, such as more randoms required then exist