- if (keyform == FORMAT_ENGINE) {
- if (!e) {
- BIO_printf(bio_err,"no engine specified\n");
- goto err;
- }
- key = ENGINE_load_private_key(e, keyfile, passin);
- } else {
- if(!(key = load_key(bio_err,keyfile, FORMAT_PEM, passin, NULL))) {
- BIO_printf(bio_err, "Can't read recipient certificate file %s\n", keyfile);
- ERR_print_errors(bio_err);
- goto end;
- }
+ key = load_key(bio_err, keyfile, keyform, passin, e,
+ "signing key file");
+ if (!key) {
+ goto end;