You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
This came out when trying to use pkg.installed with a winrepo pkg for which installer was on an https:// location with a self-signed certificate.
[WARNING ] SSL Error on 1580 ('172.22.99.3', 443): [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1131)
[ERROR ] Failed to cache https://redacted/artifactory/local/NessusAgent-10.3.2-x64.msi
verify_ssl is set to True by default in cp.cache_file and the argument is not honored by pkg.installed by passing it to the function.
We did some minor changes to the existing minion code (Windows minion version 3005.1)
# Add verify_ssl option to win_pkg.py (state and execution module) so it's honored by cp.cache_file
On modules/win_pkg.py:
# 1673:
if not cached_pkg:
# It's not cached. Cache it, mate.
try:
cached_pkg = __salt__["cp.cache_file"](installer, saltenv, verify_ssl=kwargs.get("verify_ssl"))
# Pass all kwargs to cp.cache_file
On states/pkg.py:
# 756:
# Metadata parser is available, cache the file and derive the
# package's name and version
err = "Unable to cache {0}: {1}"
try:
cached_path = __salt__["cp.cache_file"](
version_string, saltenv=kwargs["saltenv"], **kwargs
)
These changes allow pkg.installed to pass verify_ssl to cp.cache_file
install:
pkg.installed:
- name: putty
- verify_ssl: False
Setup
3005.1 and lower
winrepo set to retrive installer from https:// using a self-signed certificate
Steps to Reproduce the behavior
Setup a winrepo package with a installer located in https:// with self-signed certificate
Use pkg.installed on windows minion to install the package
Expected behavior
pkg.installed should honor verify_ssl for cp.cache_file
The text was updated successfully, but these errors were encountered:
Description
This came out when trying to use pkg.installed with a winrepo pkg for which installer was on an https:// location with a self-signed certificate.
verify_ssl is set to True by default in cp.cache_file and the argument is not honored by pkg.installed by passing it to the function.
We did some minor changes to the existing minion code (Windows minion version 3005.1)
These changes allow pkg.installed to pass verify_ssl to cp.cache_file
install:
pkg.installed:
- name: putty
- verify_ssl: False
Setup
3005.1 and lower
winrepo set to retrive installer from https:// using a self-signed certificate
Steps to Reproduce the behavior
Setup a winrepo package with a installer located in https:// with self-signed certificate
Use pkg.installed on windows minion to install the package
Expected behavior
pkg.installed should honor verify_ssl for cp.cache_file
The text was updated successfully, but these errors were encountered: