ValveSoftware / wine

Wine with a bit of extra spice
Other
1.3k stars 244 forks source link

bcrypt issue #130

Closed liberodark closed 3 years ago

liberodark commented 3 years ago

Hi,

On last build have this issue :

bison -p asmshader_ -o dlls/d3dcompiler_36/asmshader.tab.c -d dlls/d3dcompiler_43/asmshader.y
dlls/bcrypt/bcrypt_main.c:116:8: error: ‘BCRYPT_ECDH_P384_ALGORITHM’ undeclared here (not in a function); did you mean ‘BCRYPT_ECDSA_P384_ALGORITHM’?
  116 |     {  BCRYPT_ECDH_P384_ALGORITHM,  BCRYPT_SECRET_AGREEMENT_INTERFACE,      0,      0,    0 },
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |        BCRYPT_ECDSA_P384_ALGORITHM

Do you have any idea how to fix this and where it came from?

Best Regards

ivyl commented 3 years ago

It comes from 4ea0003dacd6132901fcf3da4fa2c457923fd5fd. The commit also defines BCRYPT_ECDH_P384_ALGORITHM in include/bcrypt.h.

Current experimental builds just fine in the provided container / VM.

Not sure why you are hitting this issue. Can you make sure that your local clones are all updated and in a good state?

liberodark commented 3 years ago

@ivyl Have try to build : experimental-wine-6.3-20211109 i have too libgcrypt-1.9.4 (last version)

ivyl commented 3 years ago

Looks like you are trying to compile directly on your system and you don't have mingw installed. Building this Wine downstream outside of Proton is unsupported and untested.

Try with:

diff --git a/include/bcrypt.h b/include/bcrypt.h
index fb7d809bc40..f84ab934ec6 100644
--- a/include/bcrypt.h
+++ b/include/bcrypt.h
@@ -165,6 +165,7 @@ static const WCHAR BCRYPT_DES_ALGORITHM[] = {'D','E','S',0};
 static const WCHAR BCRYPT_DH_ALGORITHM[] = {'D','H',0};
 static const WCHAR BCRYPT_DSA_ALGORITHM[] = {'D','S','A',0};
 static const WCHAR BCRYPT_ECDH_P256_ALGORITHM[] = {'E','C','D','H','_','P','2','5','6',0};
+static const WCHAR BCRYPT_ECDH_P384_ALGORITHM[] =  {'E','C','D','H','_','P','3','8','4',0};
 static const WCHAR BCRYPT_ECDSA_P256_ALGORITHM[] = {'E','C','D','S','A','_','P','2','5','6',0};
 static const WCHAR BCRYPT_ECDSA_P384_ALGORITHM[] = {'E','C','D','S','A','_','P','3','8','4',0};
 static const WCHAR BCRYPT_ECDSA_P521_ALGORITHM[] = {'E','C','D','S','A','_','P','5','2','1',0};
liberodark commented 3 years ago

Thank you so much issue is fixed with your patch :D