moresandeep commented on code in PR #1209:
URL: https://github.com/apache/knox/pull/1209#discussion_r3130010517


##########
gateway-docker/src/main/resources/docker/gateway-entrypoint.sh:
##########
@@ -53,15 +54,26 @@ importMultipleCerts() {
   # step 2), increment counter when last line of cert is found
   for N in $(/usr/bin/seq 0 $((CERTS - 1))); do
     ALIAS="${FILE%.*}-$N"
-    /bin/cat "$FILE" |
+    # Make import idempotent across restarts when truststore is persisted.
+    keytool -delete \

Review Comment:
   `-trustcacerts` only matters when keytool is doing something that depends on 
who is already trusted, while building or checking a chain against the JDK’s 
cacerts while importing a cert.
   
   `-delete` doesn’t validate chains or decide trust. It only drops the entry 
with that alias from `truststore.jks`. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to