protected static PrivateKey toPrivateKey(File keyFile, String keyPassword) throws NoSuchAlgorithmException,
                                                                NoSuchPaddingException, InvalidKeySpecException,
                                                                InvalidAlgorithmParameterException,
                                                                KeyException, IOException {
        return toPrivateKey(keyFile, keyPassword, true);
    }
@Test
    public void testPkcs1Des3EncryptedRsaNoPassword() throws Exception {
        assertThrows(InvalidKeySpecException.class, new Executable() {
            @Override
            public void execute() throws Throwable {
                SslContext.toPrivateKey(new File(getClass().getResource("rsa_pkcs1_des3_encrypted.key")
                        .getFile()), null);
            }
        });
    }