Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
2583-crypto-dh.c-change-len-type-to-ErlNifUInt6...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2583-crypto-dh.c-change-len-type-to-ErlNifUInt64.patch of Package erlang
From ea0acb49c00d7b322dfd3c25900c66cead740e42 Mon Sep 17 00:00:00 2001 From: Jakub Witczak <kuba@erlang.org> Date: Fri, 14 Apr 2023 17:55:35 +0200 Subject: [PATCH] crypto: dh.c change len type to ErlNifUInt64 - fix for "Can't do fromdata" observed on Windows builds - and ssh tests --- lib/crypto/c_src/dh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/crypto/c_src/dh.c b/lib/crypto/c_src/dh.c index 4bcab0ec6e..92a339ab5f 100644 --- a/lib/crypto/c_src/dh.c +++ b/lib/crypto/c_src/dh.c @@ -41,7 +41,7 @@ ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg /* Has 3_0 */ ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (PrivKey|undefined, DHParams=[P,G], 0, Len|0) */ - unsigned long len = 0; + ErlNifUInt64 len = 0; int i = 0; OSSL_PARAM params[8]; EVP_PKEY *pkey = NULL, *pkey_gen = NULL; @@ -84,7 +84,7 @@ ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar */ /* argv[3] is the length of the private key that is to be generated */ - if (!enif_get_ulong(env, argv[3], &len) || + if (!enif_get_uint64(env, argv[3], &len) || (len > LONG_MAX) ) { ret = EXCP_BADARG_N(env, 3, "Bad value of length element"); goto done; -- 2.43.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor