ansible-collections / ansible.windows

Windows core collection for Ansible
https://galaxy.ansible.com/ansible/windows
GNU General Public License v3.0
245 stars 166 forks source link

Use older encryption scheme for pfx tests on Server 2016 #582

Closed jborean93 closed 7 months ago

jborean93 commented 8 months ago
SUMMARY

The current tests fail on Server 2016 with.

The full traceback is:
Exception calling "Import" with "3" argument(s): "The specified network password is not correct."
At line:216 char:9
    +         $certs.Import($path, $password, $store_flags)
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : CryptographicException

Looks like the version of openssl has been updated which means openssl is generating a pfx encrypted with AES256. Windows only started supporting AES256 encryption for pfx in Server 2019 so we need to generate the pfx with some extra flags on older hosts like Server 2016.

ISSUE TYPE
COMPONENT NAME

win_certificate_store