@Before public void setUp() { key = new RSAPrivateKey() { /** */ private static final long serialVersionUID = 1L; public BigInteger getModulus() { return new BigInteger("123456789"); } public String getFormat() { return "PKCS#1"; } public byte[] getEncoded() { return null; } public String getAlgorithm() { return "RSA"; } public BigInteger getPrivateExponent() { return new BigInteger("987654321"); } }; String privKey = Activator.getResourcesPath() + PRIVATE_PEM_KEY; try { fromPriv = PEMParser.parsePrivateKey(privKey); } catch (IOException e) { e.printStackTrace(); } }
@Test public void testDirAsInputFile() { try { setUp(); } catch (Exception e) { fail(e.getMessage()); } try { settings.setSignerSetting( ISignerSettings.KEY_INPUT_FILE, Activator.getResourcesPath() + DIRECTORY_FILE_FILENAME); GenericSignedFlashArchive archive = new GenericSignedFlashArchive(settings); archive.getClass(); fail("should not get here"); } catch (SignerException e) { e.getMessage(); } }
/** @throws Exception TBD */ public void setUp() throws Exception { settings = new U5500SignerSettings( Activator.getResourcesPath() + UNSIGNED_FLASH_ARCHIVE_FILENAME, SIGNED_FLASH_ARCHIVE_FILENAME); }