public Map < X500Principal , SigningPolicy > parse ( String fileName ) throws FileNotFoundException , SigningPolicyException { if ( ( fileName == null ) || ( fileName . trim ( ) . isEmpty ( ) ) ) { throw new IllegalArgumentException ( ) ; } logger . debug ( "Signing policy file name " + fileName ) ; FileReader fileReader = null ; try { fileReader = new FileReader ( fileName ) ; return parse ( fileReader ) ; } catch ( Exception e ) { throw new SigningPolicyException ( e ) ; } finally { if ( fileReader != null ) { try { fileReader . close ( ) ; } catch ( Exception exp ) { logger . debug ( "Error closing file reader" , exp ) ; } } } }
Parses the file to extract signing policy defined for CA with the specified DN . If the policy file does not exist a SigningPolicy object with only CA DN is created . If policy path exists but no relevant policy exisit SigningPolicy object with CA DN and file path is created .