Use rsa.setPrivateKey() instead of delete.