Skip to content

Commit

Permalink
Fixed function declarations with dynamic arrays as arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
dokutoku committed Jul 11, 2021
1 parent 39aaf3b commit 1cf1c3a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
20 changes: 10 additions & 10 deletions source/libressl_d/openssl/bn.d
Original file line number Diff line number Diff line change
Expand Up @@ -768,46 +768,46 @@ int BN_GF2m_mod_solve_quad(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libress
* t^p[0] + t^p[1] + ... + t^p[k]
* where m = p[0] > p[1] > ... > p[k] = 0.
*/
int BN_GF2m_mod_arr(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* a, const int[] p);
int BN_GF2m_mod_arr(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* a, const int* p);
/* r = a mod p */

/**
* r = (a * b) mod p
*/
int BN_GF2m_mod_mul_arr(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* a, const (libressl_d.openssl.ossl_typ.BIGNUM)* b, const int[] p, libressl_d.openssl.ossl_typ.BN_CTX* ctx);
int BN_GF2m_mod_mul_arr(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* a, const (libressl_d.openssl.ossl_typ.BIGNUM)* b, const int* p, libressl_d.openssl.ossl_typ.BN_CTX* ctx);

/**
* r = (a * a) mod p
*/
int BN_GF2m_mod_sqr_arr(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* a, const int[] p, libressl_d.openssl.ossl_typ.BN_CTX* ctx);
int BN_GF2m_mod_sqr_arr(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* a, const int* p, libressl_d.openssl.ossl_typ.BN_CTX* ctx);

/**
* r = (1 / b) mod p
*/
int BN_GF2m_mod_inv_arr(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* b, const int[] p, libressl_d.openssl.ossl_typ.BN_CTX* ctx);
int BN_GF2m_mod_inv_arr(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* b, const int* p, libressl_d.openssl.ossl_typ.BN_CTX* ctx);

/**
* r = (a / b) mod p
*/
int BN_GF2m_mod_div_arr(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* a, const (libressl_d.openssl.ossl_typ.BIGNUM)* b, const int[] p, libressl_d.openssl.ossl_typ.BN_CTX* ctx);
int BN_GF2m_mod_div_arr(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* a, const (libressl_d.openssl.ossl_typ.BIGNUM)* b, const int* p, libressl_d.openssl.ossl_typ.BN_CTX* ctx);

/**
* r = (a ^ b) mod p
*/
int BN_GF2m_mod_exp_arr(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* a, const (libressl_d.openssl.ossl_typ.BIGNUM)* b, const int[] p, libressl_d.openssl.ossl_typ.BN_CTX* ctx);
int BN_GF2m_mod_exp_arr(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* a, const (libressl_d.openssl.ossl_typ.BIGNUM)* b, const int* p, libressl_d.openssl.ossl_typ.BN_CTX* ctx);

/**
* r = sqrt(a) mod p
*/
int BN_GF2m_mod_sqrt_arr(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* a, const int[] p, libressl_d.openssl.ossl_typ.BN_CTX* ctx);
int BN_GF2m_mod_sqrt_arr(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* a, const int* p, libressl_d.openssl.ossl_typ.BN_CTX* ctx);

/**
* r^2 + r = a mod p
*/
int BN_GF2m_mod_solve_quad_arr(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* a, const int[] p, libressl_d.openssl.ossl_typ.BN_CTX* ctx);
int BN_GF2m_mod_solve_quad_arr(libressl_d.openssl.ossl_typ.BIGNUM* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* a, const int* p, libressl_d.openssl.ossl_typ.BN_CTX* ctx);

int BN_GF2m_poly2arr(const (libressl_d.openssl.ossl_typ.BIGNUM)* a, int[] p, int max);
int BN_GF2m_arr2poly(const int[] p, libressl_d.openssl.ossl_typ.BIGNUM* a);
int BN_GF2m_poly2arr(const (libressl_d.openssl.ossl_typ.BIGNUM)* a, int* p, int max);
int BN_GF2m_arr2poly(const int* p, libressl_d.openssl.ossl_typ.BIGNUM* a);
//#endif

/*
Expand Down
2 changes: 1 addition & 1 deletion source/libressl_d/openssl/des.d
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ char* DES_fcrypt(const (char)* buf, const (char)* salt, char* ret);
char* DES_crypt(const (char)* buf, const (char)* salt);
void DES_ofb_encrypt(const (ubyte)* in_, ubyte* out_, int numbits, core.stdc.config.c_long length_, .DES_key_schedule* schedule, .DES_cblock* ivec);
void DES_pcbc_encrypt(const (ubyte)* input, ubyte* output, core.stdc.config.c_long length_, .DES_key_schedule* schedule, .DES_cblock* ivec, int enc);
libressl_d.openssl.opensslconf.DES_LONG DES_quad_cksum(const (ubyte)* input, .DES_cblock[] output, core.stdc.config.c_long length_, int out_count, .DES_cblock* seed);
libressl_d.openssl.opensslconf.DES_LONG DES_quad_cksum(const (ubyte)* input, .DES_cblock* output, core.stdc.config.c_long length_, int out_count, .DES_cblock* seed);
int DES_random_key(.DES_cblock* ret);
void DES_set_odd_parity(.DES_cblock* key);
int DES_check_key_parity(.const_DES_cblock* key);
Expand Down
4 changes: 2 additions & 2 deletions source/libressl_d/openssl/ec.d
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ int EC_POINT_is_on_curve(const (.EC_GROUP)* group, const (.EC_POINT)* point, lib
int EC_POINT_cmp(const (.EC_GROUP)* group, const (.EC_POINT)* a, const (.EC_POINT)* b, libressl_d.openssl.ossl_typ.BN_CTX* ctx);

int EC_POINT_make_affine(const (.EC_GROUP)* group, .EC_POINT* point, libressl_d.openssl.ossl_typ.BN_CTX* ctx);
int EC_POINTs_make_affine(const (.EC_GROUP)* group, size_t num, .EC_POINT*[] points, libressl_d.openssl.ossl_typ.BN_CTX* ctx);
int EC_POINTs_make_affine(const (.EC_GROUP)* group, size_t num, .EC_POINT** points, libressl_d.openssl.ossl_typ.BN_CTX* ctx);

/**
* Computes r = generator * n sum_{i=0}^num p[i] * m[i]
Expand All @@ -703,7 +703,7 @@ int EC_POINTs_make_affine(const (.EC_GROUP)* group, size_t num, .EC_POINT*[] poi
* \param ctx BN_CTX object (optional)
* \return 1 on success and 0 if an error occured
*/
int EC_POINTs_mul(const (.EC_GROUP)* group, .EC_POINT* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* n, size_t num, const (.EC_POINT)*[] p, const (libressl_d.openssl.ossl_typ.BIGNUM)*[] m, libressl_d.openssl.ossl_typ.BN_CTX* ctx);
int EC_POINTs_mul(const (.EC_GROUP)* group, .EC_POINT* r, const (libressl_d.openssl.ossl_typ.BIGNUM)* n, size_t num, const (.EC_POINT)** p, const (libressl_d.openssl.ossl_typ.BIGNUM)** m, libressl_d.openssl.ossl_typ.BN_CTX* ctx);

/**
* Computes r = generator * n + q * m
Expand Down
4 changes: 2 additions & 2 deletions source/libressl_d/openssl/err.d
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ void ERR_add_error_data(int num, ...);
void ERR_add_error_vdata(int num, core.stdc.stdarg.va_list args);
//#endif

void ERR_load_strings(int lib, .ERR_STRING_DATA[] str);
void ERR_unload_strings(int lib, .ERR_STRING_DATA[] str);
void ERR_load_strings(int lib, .ERR_STRING_DATA* str);
void ERR_unload_strings(int lib, .ERR_STRING_DATA* str);
void ERR_load_ERR_strings();
void ERR_load_crypto_strings();
void ERR_free_strings();
Expand Down

0 comments on commit 1cf1c3a

Please sign in to comment.