Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix payg cert import #7668

Merged
merged 2 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ private void processCloudRmtHost(PaygSshData instance, PaygInstanceInfo paygData

instance.setRmtHosts(rmtHost);
PaygSshDataFactory.savePaygSshData(instance);
if (LOG.isDebugEnabled()) {
LOG.debug("CloudRmtHost Hostname: {}", rmtHost.getHost());
LOG.debug("CloudRmtHost IP: {}", rmtHost.getIp());
LOG.debug("CloudRmtHost SSL Cert: {}", rmtHost.getSslCert());
}
}

private Credentials processAndGetCredentials(PaygSshData instance, PaygInstanceInfo paygData)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ def _extract_rmt_server_info(netloc):
system_exit(4, ["unable to get ip for repository server (error {}):".format(e)])

server_ip = host_ip_output.split(" ")[0].strip()
ca_cert_path = "/usr/share/pki/trust/anchors/registration_server_%s.pem" % server_ip.replace('.','_')
ca_cert_path = "/etc/pki/trust/anchors/registration_server_%s.pem" % server_ip.replace('.','_')
if not Path(ca_cert_path).exists():
ca_cert_path = "/etc/pki/trust/anchors/registration_server_%s.pem" % server_ip.replace('.','_')
ca_cert_path = "/usr/share/pki/trust/anchors/registration_server_%s.pem" % server_ip.replace('.','_')
if not Path(ca_cert_path).exists():
system_exit(6, ["CA file for server {} not found (location '/etc/pki/trust/anchors/' or '/usr/share/pki/trust/anchors/')".format( server_ip)])
with open(ca_cert_path) as f:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- look for the PAYG CA certificate location in different order to
find and import the correct one (bsc#1214759)