View | Details | Raw Unified | Return to bug 2913 | Differences between
and this patch

Collapse All | Expand All

(-)a/sshkey.c (-3 / +8 lines)
Lines 3914-3919 convert_libcrypto_error(void) Link Here
3914
	return translate_libcrypto_error(ERR_peek_last_error());
3914
	return translate_libcrypto_error(ERR_peek_last_error());
3915
}
3915
}
3916
3916
3917
static int
3918
sshkey_no_passphrase_callback(char *buf, int size, int rwflag, void *u)
3919
{
3920
	return -1;
3921
}
3922
3917
static int
3923
static int
3918
sshkey_parse_private_pem_fileblob(struct sshbuf *blob, int type,
3924
sshkey_parse_private_pem_fileblob(struct sshbuf *blob, int type,
3919
    const char *passphrase, struct sshkey **keyp)
3925
    const char *passphrase, struct sshkey **keyp)
Lines 3935-3942 sshkey_parse_private_pem_fileblob(struct sshbuf *blob, int type, Link Here
3935
	}
3941
	}
3936
3942
3937
	clear_libcrypto_errors();
3943
	clear_libcrypto_errors();
3938
	if ((pk = PEM_read_bio_PrivateKey(bio, NULL, NULL,
3944
	if ((pk = PEM_read_bio_PrivateKey(bio, NULL,
3939
	    (char *)passphrase)) == NULL) {
3945
	    sshkey_no_passphrase_callback, (char *)passphrase)) == NULL) {
3940
		r = convert_libcrypto_error();
3946
		r = convert_libcrypto_error();
3941
		goto out;
3947
		goto out;
3942
	}
3948
	}
3943
- 

Return to bug 2913