mirror of https://github.com/omar-polo/gmid.git
work around different signature for ecdsae_compute_key
This commit is contained in:
parent
86693a33ab
commit
ec96a0ad3b
14
crypto.c
14
crypto.c
|
@ -562,6 +562,7 @@ ecdsae_keygen(EC_KEY *eckey)
|
|||
return (keygen(eckey));
|
||||
}
|
||||
|
||||
#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER <= 0x3080100fL
|
||||
static int
|
||||
ecdsae_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
|
||||
EC_KEY *ecdh, void *(*kdf)(const void *, size_t, void *, size_t *))
|
||||
|
@ -573,6 +574,19 @@ ecdsae_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
|
|||
EC_KEY_METHOD_get_compute_key(ecdsa_default, &ckey);
|
||||
return (ckey(out, outlen, pub_key, ecdh, kdf));
|
||||
}
|
||||
#else
|
||||
static int
|
||||
ecdsae_compute_key(unsigned char **psec, size_t *pseclen,
|
||||
const EC_POINT *pub_key, const EC_KEY *ecdh)
|
||||
{
|
||||
int (*ckey)(unsigned char **, size_t *, const EC_POINT *,
|
||||
const EC_KEY *);
|
||||
|
||||
log_debug("debug: %s", __func__);
|
||||
EC_KEY_METHOD_get_compute_key(ecdsa_default, &ckey);
|
||||
return (ckey(psec, pseclen, pub_key, ecdh));
|
||||
}
|
||||
#endif
|
||||
|
||||
static int
|
||||
ecdsae_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig,
|
||||
|
|
Loading…
Reference in New Issue