if (privateKey==null) {
String pemfile = (String) this.properties.get("pemfile");
if (pemfile == null || pemfile.equals("")) {
throw new IllegalStateException("must specify pemfile or private-key when algorithm is RS*");
}
<BUG>pemfile = resolvePropertyValue(pemfile, msgCtxt);
</BUG>
if (pemfile == null || pemfile.equals("")) {
throw new IllegalStateException("pemfile resolves to nothing; invalid when algorithm is RS*");
}

if (privateKey==null) {
String pemfile = (String) this.properties.get("pemfile");
if (pemfile == null || pemfile.equals("")) {
throw new IllegalStateException("must specify pemfile or private-key when algorithm is RS*");
}
pemfile = (String) resolvePropertyValue(pemfile, msgCtxt);
if (pemfile == null || pemfile.equals("")) {
throw new IllegalStateException("pemfile resolves to nothing; invalid when algorithm is RS*");
}
