compile with openssl1.1.0
compile under debian stretch with openssl1.1.0 fails in store.c and archive.c error: storage size of ‘ctx’ isn’t known EVP_CIPHER_CTX ctx
should now be: EVP_MD_CTX *ctx;
ctx = EVP_MD_CTX_new(); if (ctx == NULL) //check why and handle EVP_MD_CTX_free(ctx);
thank you for your software !
Comments (9)
-
repo owner -
reporter below is not tested and i'm not sure if it works. compiles with 1.1.0
diff src/archive.c ../piler-1.3.0/src/archive.c 138,141c138 < EVP_CIPHER_CTX *ctx; < ctx = EVP_CIPHER_CTX_new(); < < if(ctx == NULL) return 1; --- > EVP_CIPHER_CTX ctx; 162,163c159,160 < EVP_CIPHER_CTX_init(ctx); < EVP_DecryptInit_ex(ctx, EVP_bf_cbc(), NULL, cfg->key, cfg->iv); --- > EVP_CIPHER_CTX_init(&ctx); > EVP_DecryptInit_ex(&ctx, EVP_bf_cbc(), NULL, cfg->key, cfg->iv); 178c175 < if(!EVP_DecryptUpdate(ctx, s+tlen, &olen, inbuf, n)){ --- > if(!EVP_DecryptUpdate(&ctx, s+tlen, &olen, inbuf, n)){ 187c184 < if(EVP_DecryptFinal(ctx, s + tlen, &olen) != 1){ --- > if(EVP_DecryptFinal(&ctx, s + tlen, &olen) != 1){ 209c206 < if(cfg->encrypt_messages == 1) EVP_CIPHER_CTX_free(ctx); --- > if(cfg->encrypt_messages == 1) EVP_CIPHER_CTX_cleanup(&ctx); Nur in src: Makefile. diff src/store.c ../piler-1.3.0/src/store.c 49,51c49 < < EVP_CIPHER_CTX *ctx; < ctx = EVP_CIPHER_CTX_new(); --- > EVP_CIPHER_CTX ctx; 106,107c104,105 < EVP_CIPHER_CTX_init(ctx); < EVP_EncryptInit_ex(ctx, EVP_bf_cbc(), NULL, cfg->key, cfg->iv); --- > EVP_CIPHER_CTX_init(&ctx); > EVP_EncryptInit_ex(&ctx, EVP_bf_cbc(), NULL, cfg->key, cfg->iv); 112,113c110,111 < if(!EVP_EncryptUpdate(ctx, outbuf, &outlen, z, dstlen)) goto ENDE; < if(!EVP_EncryptFinal_ex(ctx, outbuf + outlen, &tmplen)) goto ENDE; --- > if(!EVP_EncryptUpdate(&ctx, outbuf, &outlen, z, dstlen)) goto ENDE; > if(!EVP_EncryptFinal_ex(&ctx, outbuf + outlen, &tmplen)) goto ENDE; 115c113 < EVP_CIPHER_CTX_free(ctx); --- > EVP_CIPHER_CTX_cleanup(&ctx);
-
repo owner Thanks, I'll keep you posted when the fix is ready.
-
repo owner OK, check out the epoll branch. It should compile against openssl 1.1.
-
repo owner - changed status to resolved
Updated the master branch as well to support openssl 1.1
-
Weill there be a release update or should we just build from the repo? This stops install on debian 9.1 in its tracks.
-
repo owner I'll release piler-1.3.1 on both master and epoll branches soon. Until then you are free to build from the repo.
-
WOW merlin81 ur fix works like a charm ..thnx bro..i compile piler 1.3.0 on debian 9.2 with openssl 1.1.0f n work ok....ill try with ur fix..meantime wait for new release
-
repo owner Check out the download area for 1.3.1, it supports both openssl 1.0.x and 1.1.x.
- Log in to comment
Yes, I'm aware of that openssl 1.1 has some api changes since 1.0. Soon I'll update piler to consider the openssl version while compiling.