@@ -4,7 +4,7 @@ use crate::crd::{
44 DB_PASSWORD_ENV , DB_PASSWORD_PLACEHOLDER , DB_USERNAME_ENV , DB_USERNAME_PLACEHOLDER ,
55 HIVE_METASTORE_LOG4J2_PROPERTIES , HIVE_SITE_XML , STACKABLE_CONFIG_DIR ,
66 STACKABLE_CONFIG_MOUNT_DIR , STACKABLE_LOG_CONFIG_MOUNT_DIR , STACKABLE_TRUST_STORE ,
7- STACKABLE_TRUST_STORE_PASSWORD , SYSTEM_TRUST_STORE , SYSTEM_TRUST_STORE_PASSWORD , v1alpha1,
7+ STACKABLE_TRUST_STORE_PASSWORD , v1alpha1,
88} ;
99
1010pub fn build_container_command_args (
@@ -32,7 +32,7 @@ pub fn build_container_command_args(
3232 ) ,
3333 // Copy system truststore to stackable truststore
3434 format!(
35- "keytool -importkeystore -srckeystore {SYSTEM_TRUST_STORE} -srcstoretype jks -srcstorepass {SYSTEM_TRUST_STORE_PASSWORD} -destkeystore {STACKABLE_TRUST_STORE} -deststoretype pkcs12 -deststorepass {STACKABLE_TRUST_STORE_PASSWORD} -noprompt "
35+ "cert-tools generate-pkcs12-truststore --pem /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem --out {STACKABLE_TRUST_STORE} --out-password {STACKABLE_TRUST_STORE_PASSWORD}"
3636 ) ,
3737 ] ;
3838
@@ -44,9 +44,10 @@ pub fn build_container_command_args(
4444 }
4545
4646 if let Some ( s3) = s3_connection_spec {
47- if let Some ( ca_cert) = s3. tls . tls_ca_cert_mount_path ( ) {
48- // The alias can not clash, as we only support a single S3Connection
49- args. push ( format ! ( "keytool -importcert -file {ca_cert} -alias stackable-s3-ca-cert -keystore {STACKABLE_TRUST_STORE} -storepass {STACKABLE_TRUST_STORE_PASSWORD} -noprompt" ) ) ;
47+ if let Some ( ca_cert_file) = s3. tls . tls_ca_cert_mount_path ( ) {
48+ args. push ( format ! (
49+ "cert-tools generate-pkcs12-truststore --pkcs12 {STACKABLE_TRUST_STORE}:{STACKABLE_TRUST_STORE_PASSWORD} --pem {ca_cert_file} --out {STACKABLE_TRUST_STORE} --out-password {STACKABLE_TRUST_STORE_PASSWORD}"
50+ ) ) ;
5051 }
5152 }
5253
0 commit comments