Skip to content

Commit

Permalink
Fix checking ovirt-provider-ovn certificate validity
Browse files Browse the repository at this point in the history
There was added an ovirt-provider-ovn certificate validity check as
a part of #576 but
unfortunately the path to certificate file was wrong and as this
certificate is optional (it doesn't exists on setup with OVN integration
disable), the certificate validity checker didn't raise any error even
for setups with OVN integration enabled and ovirt-provider-ovn
certificate going to expire soon.

Bug-Url: https://bugzilla.redhat.com/2097560
Signed-off-by: Martin Perina <mperina@redhat.com>
  • Loading branch information
mwperina committed Aug 19, 2022
1 parent 7054ce2 commit 7814cc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ private boolean checkOptionalCertificate(File certFile,
AuditLogType alertExpirationEventType,
AuditLogType alertAboutToExpireEventType,
AuditLogType warnAboutToExpireEventType) {
log.debug("Checking optional certificate '{}'.", certFile.getAbsolutePath());
if (certFile == null || !certFile.exists()) {
// certificate file doesn't exist, which may be OK, as the service using the certificate is optional
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public File getPKIEngineCert() {
}

public File getPKIOvirtProviderOVNCert() {
return Paths.get(getProperty("ENGINE_PKI"), "ovirt-provider-ovn.cer").toFile();
return Paths.get(getProperty("ENGINE_PKI"), "certs", "ovirt-provider-ovn.cer").toFile();
}

public String getPKITrustStoreType() {
Expand Down

0 comments on commit 7814cc9

Please sign in to comment.