This commit is contained in:
Zhi Guan
2017-01-13 23:15:20 +08:00
parent ab0cf9dd9f
commit e29932099b
3 changed files with 3 additions and 3 deletions

View File

@@ -690,7 +690,7 @@ jbyteArray JNICALL Java_GmSSL_publicKeyDecrypt(JNIEnv *env, jobject this,
goto end;
}
if (!EVP_PKEY_encrypt_init(pkctx)) {
if (!EVP_PKEY_decrypt_init(pkctx)) {
PRINT_ERROR();
goto end;
}
@@ -702,7 +702,7 @@ jbyteArray JNICALL Java_GmSSL_publicKeyDecrypt(JNIEnv *env, jobject this,
}
}
if (!EVP_PKEY_encrypt(pkctx, outbuf, &outlen, inbuf, inlen)) {
if (!EVP_PKEY_decrypt(pkctx, outbuf, &outlen, inbuf, inlen)) {
PRINT_ERROR();
goto end;
}