@Override protected void doSetUp() throws Exception { super.doSetUp(); securityProvider = new PGPSecurityProvider(); securityProvider.setKeyManager(keyManager); securityProvider.initialise(); URL url = Thread.currentThread().getContextClassLoader().getResource("./signed.asc"); FileInputStream in = new FileInputStream(url.getFile()); message = MessageFactory.getMessage(IOUtils.toByteArray(in)); }
@Test public void testAuthenticate() throws Exception { Authentication auth = new PGPAuthentication("Mule client <*****@*****.**>", message); auth = securityProvider.authenticate(auth); assertTrue(auth.isAuthenticated()); }