private static String parseDERString(byte[] alterNameValue) throws Throwable {
  try {
    ASN1StreamParser p=new ASN1StreamParser(alterNameValue);
    ASN1Encodable d=p.readObject();
    ASN1Primitive der=d.toASN1Primitive();
    return getStringFromObject(der);
  }
 catch (  Throwable e) {
    logger.error("Unable to extract User Principal Name: " + e.getMessage());
    throw e;
  }
}

private static String parseDERString ( byte [ ] alterNameValue ) throws Throwable { try { ASN1StreamParser p = new ASN1StreamParser ( alterNameValue ) ; ASN1Encodable d = p . readObject ( ) ; ASN1Primitive der = d . toASN1Primitive ( ) ; return getStringFromObject ( der ) ; } catch ( Throwable e ) { logger . error ( "Unable to extract User Principal Name: " + e . getMessage ( ) ) ; throw e ; } }
parse der - encoded bytes to locate a string object
