Part 4 of my attempt to run the [Niko Home Control programming software](https://appdb.winehq.org/objectManager.php?sClass=application&iId=21635) under Wine. It can be either PROV_RSA_FULL or the newer PROV_RSA_AES or PROV_RSA_SCHANNEL but the current code was just always returning the legacy PROV_RSA_FULL without checking the personality. I added a test, without the change, the tests fail with ``` $ WINEDEBUG=fixme-all,err-all ./loader/wine dlls/rsaenh/tests/x86_64-windows/rsaenh_test.exe rsaenh rsaenh.c:4058: Test marked todo: 4: got 9, expected 11 rsaenh.c:4058: Test marked todo: 9: got 9, expected 0 rsaenh.c:4295: Testing 'Microsoft Enhanced Cryptographic Provider v1.0' rsaenh.c:4295: Testing 'Microsoft Base Cryptographic Provider v1.0' rsaenh.c:4295: Testing 'Microsoft Strong Cryptographic Provider' rsaenh.c:3121: Test marked todo: Expected a param length of 70, got 9 rsaenh.c:3122: Test marked todo: Wrong container name : winetest rsaenh.c:4331: Testing AES provider. rsaenh.c:1103: Test marked todo: Expected OK, got last error -2146893821 rsaenh.c:1103: Test marked todo: Expected OK, got last error -2146893821 rsaenh.c:1103: Test marked todo: Expected OK, got last error -2146893821 rsaenh.c:4278: Test failed: Microsoft Enhanced RSA and AES Cryptographic Provider: PP_PROVTYPE = 1, expected 24 rsaenh.c:4278: Test failed: Microsoft RSA SChannel Cryptographic Provider: PP_PROVTYPE = 1, expected 12 0020:rsaenh: 4070 tests executed (7 marked as todo, 0 as flaky, 2 failures), 0 skipped. ``` And after the fix, the tests pass ``` $ WINEDEBUG=fixme-all,err-all ./loader/wine dlls/rsaenh/tests/x86_64-windows/rsaenh_test.exe rsaenh libEGL warning: pci id for fd 37: 10de:2db8, driver (null) pci id for fd 38: 10de:2db8, driver (null) pci id for fd 39: 10de:2db8, driver (null) libEGL warning: egl: failed to create dri2 screen libEGL warning: pci id for fd 37: 10de:2db8, driver (null) pci id for fd 38: 10de:2db8, driver (null) pci id for fd 39: 10de:2db8, driver (null) libEGL warning: egl: failed to create dri2 screen libEGL warning: pci id for fd 37: 10de:2db8, driver (null) rsaenh.c:4058: Test marked todo: 4: got 9, expected 11 rsaenh.c:4058: Test marked todo: 9: got 9, expected 0 rsaenh.c:4295: Testing 'Microsoft Enhanced Cryptographic Provider v1.0' rsaenh.c:4295: Testing 'Microsoft Base Cryptographic Provider v1.0' rsaenh.c:4295: Testing 'Microsoft Strong Cryptographic Provider' rsaenh.c:3121: Test marked todo: Expected a param length of 70, got 9 rsaenh.c:3122: Test marked todo: Wrong container name : winetest rsaenh.c:4331: Testing AES provider. rsaenh.c:1103: Test marked todo: Expected OK, got last error -2146893821 rsaenh.c:1103: Test marked todo: Expected OK, got last error -2146893821 rsaenh.c:1103: Test marked todo: Expected OK, got last error -2146893821 0020:rsaenh: 4070 tests executed (7 marked as todo, 0 as flaky, 0 failures), 0 skipped. ``` -- v3: Fix reporting of "Cryptographic Service Provider" https://gitlab.winehq.org/wine/wine/-/merge_requests/11213