feat: Implement verification of trust chains in OpenSSLCertificateCreator
This commit is contained in:
parent
2b6473929a
commit
e888ea57c1
3 changed files with 64 additions and 5 deletions
|
|
@ -7,6 +7,7 @@ import java.nio.file.Path;
|
|||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.SystemUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
|
@ -16,6 +17,8 @@ import org.springframework.stereotype.Service;
|
|||
@Slf4j
|
||||
public class ExecutableResolver {
|
||||
|
||||
private static final AtomicBoolean loggedPath = new AtomicBoolean(false);
|
||||
|
||||
@Value("${openssl.path:#{null}}")
|
||||
private String opensslPath;
|
||||
|
||||
|
|
@ -39,6 +42,13 @@ public class ExecutableResolver {
|
|||
Objects.requireNonNull(envPath, "Environment variable 'PATH' is not set?!");
|
||||
String[] pathEntries = envPath.split(File.pathSeparator);
|
||||
|
||||
if (!loggedPath.get()) {
|
||||
loggedPath.set(true);
|
||||
for (String pathEntry : pathEntries) {
|
||||
log.atError().log("Path entry: {}", pathEntry);
|
||||
}
|
||||
}
|
||||
|
||||
for (String pathEntry : pathEntries) {
|
||||
for (String fileExtension : getAllowedExtensions()) {
|
||||
Path executablePath = Path.of(pathEntry, executableName + fileExtension);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue