agave-common/common-legacy-api/src/main/java/org/iplantc/service/common/auth/ProxyUserGuard.java
/**
     * Loads a public key from a PEM encoded certificate file.
     * 
     * @param file the name of the certificate file.
     * @return the public key.
     * @throws IOException if the file can't be read or does not contain an X.509 certificate.
     */
Loads a public key from a PEM encoded certificate file.

@param file the name of the certificate file.
@return the public key.
@throws IOException if the file can't be read or does not contain an X.509 certificate.
Loads a public key from a PEM encoded certificate file . @param file the name of the certificate file . @return the public key . @throws IOException if the file can ' t be read or does not contain an X . 509 certificate .
private PublicKey loadPublicKeyFromCertificateFile(String file) throws IOException {
    	PemReader pemReader = null;
    	try {
    		pemReader = new PemReader(new InputStreamReader(getCertFileAsStream(file)));
	    	Object extractedObject = pemReader.readPemObject();
	        if (!(extractedObject instanceof X509Certificate)) {
	            throw new IOException(file + " does not contain an X.509 certificate");
	        }
	        return ((X509Certificate) extractedObject).getPublicKey();
    	}
    	finally {
    		try { pemReader.close(); } catch (Exception e) {}
    	}
    }
private PublicKey loadPublicKeyFromCertificateFile ( String file ) throws IOException { PemReader pemReader = null ; try { pemReader = new PemReader ( new InputStreamReader ( getCertFileAsStream ( file ) ) ) ; Object extractedObject = pemReader . readPemObject ( ) ; if ( ! ( extractedObject instanceof X509Certificate ) ) { throw new IOException ( file + " does not contain an X.509 certificate" ) ; } return ( ( X509Certificate ) extractedObject ) . getPublicKey ( ) ; } finally { try { pemReader . close ( ) ; } catch ( Exception e ) { } } }
Loads a public key from a PEM encoded certificate file.
Loads a public key from a PEM encoded certificate file .