Closed pandaninjas closed 1 year ago
Hiya,
Sorry, I don't have a windows dev environment, but a question - the error above seems to be:
crypto\hpke.c(521): error C2057: expected constant expression
crypto\hpke.c(521): error C2466: cannot allocate an array of constant size 0
crypto\hpke.c(521): error C2133: 'tag': unknown size
When I look at line 521 of crypto/hpke/hpke.c that's just a call to OPENSSL_free()
and the source file names differ so are you perhaps some old branch or something?
The latest branch for this fork is "ECH-draft-13c" If you're just interested in HPKE, that's been merged so is in the master branch at https://github.com/openssl/openssl
S
Hiya,
Sorry, I don't have a windows dev environment, but a question - the error above seems to be:
crypto\hpke.c(521): error C2057: expected constant expression crypto\hpke.c(521): error C2466: cannot allocate an array of constant size 0 crypto\hpke.c(521): error C2133: 'tag': unknown size
When I look at line 521 of crypto/hpke/hpke.c that's just a call to
OPENSSL_free()
and the source file names differ so are you perhaps some old branch or something?The latest branch for this fork is "ECH-draft-13c" If you're just interested in HPKE, that's been merged so is in the master branch at https://github.com/openssl/openssl
S
I think the problem is that hpke.c is a merged file with different things. Opening crypto/hpke.c which has been generated by some process, the problematic lines are
static int hpke_aead_enc(
hpke_suite_t suite,
unsigned char *key, size_t keylen,
unsigned char *iv, size_t ivlen,
unsigned char *aad, size_t aadlen,
unsigned char *plain, size_t plainlen,
unsigned char *cipher, size_t *cipherlen)
{
int erv=1;
EVP_CIPHER_CTX *ctx=NULL;
int len;
size_t ciphertextlen;
unsigned char *ciphertext=NULL;
size_t taglen=hpke_aead_tab[suite.aead_id].taglen;
unsigned char tag[taglen]; // this one is line 521
if ((taglen+plainlen)>*cipherlen) {
erv=__LINE__; goto err;
}
It seems that my compiler has somehow mangled the code that was originally here https://github.com/sftcd/openssl/blob/f06ef1657a3d4322153b26231a7afa3d55724e52/crypto/hpke/hpke.c#L220
Is it possible to start from a clean build and see what happens?
It seems like the error happens from a clean build (with a redone configure)
Also I am on the ECH-without-ESNI
branch
ah, that last is your issue, the right branch to use is ECH-draft-13c
(sorry for the opaque/silly naming;-)
It seems to work, but I needed to specify the proper architecture through configure. Closing this issue
configuration data:
Error parts of log: