@@ -161,19 +161,22 @@ function configureAdvancedWalletManagaerMode(): AdvancedWalletManagerConfig {
161161 const env = advancedWalletManagerEnvConfig ( ) ;
162162 let config = mergeAkmConfigs ( env ) ;
163163
164+ // Certificate Loading Section
165+ logger . info ( '=== Certificate Loading ===' ) ;
166+
164167 // Only load certificates if TLS is enabled
165168 if ( config . tlsMode !== TlsMode . DISABLED ) {
166169 // Handle file loading for TLS certificates
167170 if ( ! config . serverTlsKey && config . serverTlsKeyPath ) {
168171 try {
169172 config = { ...config , serverTlsKey : fs . readFileSync ( config . serverTlsKeyPath , 'utf-8' ) } ;
170- logger . info ( `Successfully loaded TLS private key from file: ${ config . serverTlsKeyPath } ` ) ;
173+ logger . info ( `✓ TLS private key loaded from file: ${ config . serverTlsKeyPath } ` ) ;
171174 } catch ( e ) {
172175 const err = e instanceof Error ? e : new Error ( String ( e ) ) ;
173176 throw new Error ( `Failed to read TLS key from serverTlsKeyPath: ${ err . message } ` ) ;
174177 }
175178 } else if ( config . serverTlsKey ) {
176- logger . info ( 'Using TLS private key from environment variable' ) ;
179+ logger . info ( '✓ TLS private key loaded from environment variable' ) ;
177180 }
178181
179182 if ( ! config . serverTlsCert && config . serverTlsCertPath ) {
@@ -182,13 +185,13 @@ function configureAdvancedWalletManagaerMode(): AdvancedWalletManagerConfig {
182185 ...config ,
183186 serverTlsCert : fs . readFileSync ( config . serverTlsCertPath , 'utf-8' ) ,
184187 } ;
185- logger . info ( `Successfully loaded TLS certificate from file: ${ config . serverTlsCertPath } ` ) ;
188+ logger . info ( `✓ TLS certificate loaded from file: ${ config . serverTlsCertPath } ` ) ;
186189 } catch ( e ) {
187190 const err = e instanceof Error ? e : new Error ( String ( e ) ) ;
188191 throw new Error ( `Failed to read TLS certificate from serverTlsCertPath: ${ err . message } ` ) ;
189192 }
190193 } else if ( config . serverTlsCert ) {
191- logger . info ( 'Using TLS certificate from environment variable' ) ;
194+ logger . info ( '✓ TLS certificate loaded from environment variable' ) ;
192195 }
193196
194197 if ( ! config . kmsServerCaCertPath ) {
@@ -197,9 +200,7 @@ function configureAdvancedWalletManagaerMode(): AdvancedWalletManagerConfig {
197200 if ( config . kmsServerCaCertPath ) {
198201 try {
199202 config . kmsServerCaCert = fs . readFileSync ( config . kmsServerCaCertPath , 'utf-8' ) ;
200- logger . info (
201- `Successfully loaded KMS TLS certificate from file: ${ config . kmsServerCaCertPath } ` ,
202- ) ;
203+ logger . info ( `✓ KMS server CA certificate loaded from file: ${ config . kmsServerCaCertPath } ` ) ;
203204 } catch ( e ) {
204205 const err = e instanceof Error ? e : new Error ( String ( e ) ) ;
205206 throw new Error ( `Failed to read KMS TLS certificate from kmsTlsCert: ${ err . message } ` ) ;
@@ -209,7 +210,7 @@ function configureAdvancedWalletManagaerMode(): AdvancedWalletManagerConfig {
209210 if ( config . kmsClientTlsKeyPath ) {
210211 try {
211212 config . kmsClientTlsKey = fs . readFileSync ( config . kmsClientTlsKeyPath , 'utf-8' ) ;
212- logger . info ( `Successfully loaded KMS client key from file: ${ config . kmsClientTlsKeyPath } ` ) ;
213+ logger . info ( `✓ KMS client key loaded from file: ${ config . kmsClientTlsKeyPath } ` ) ;
213214 } catch ( e ) {
214215 const err = e instanceof Error ? e : new Error ( String ( e ) ) ;
215216 throw new Error ( `Failed to read KMS client key from kmsClientTlsKeyPath: ${ err . message } ` ) ;
@@ -219,9 +220,7 @@ function configureAdvancedWalletManagaerMode(): AdvancedWalletManagerConfig {
219220 if ( config . kmsClientTlsCertPath ) {
220221 try {
221222 config . kmsClientTlsCert = fs . readFileSync ( config . kmsClientTlsCertPath , 'utf-8' ) ;
222- logger . info (
223- `Successfully loaded KMS client cert from file: ${ config . kmsClientTlsCertPath } ` ,
224- ) ;
223+ logger . info ( `✓ KMS client certificate loaded from file: ${ config . kmsClientTlsCertPath } ` ) ;
225224 } catch ( e ) {
226225 const err = e instanceof Error ? e : new Error ( String ( e ) ) ;
227226 throw new Error ( `Failed to read KMS client cert from kmsClientTlsCertPath: ${ err . message } ` ) ;
@@ -240,6 +239,8 @@ function configureAdvancedWalletManagaerMode(): AdvancedWalletManagerConfig {
240239 validateTlsCertificates ( config ) ;
241240 }
242241
242+ logger . info ( '==========================' ) ;
243+
243244 return config ;
244245}
245246
@@ -385,19 +386,22 @@ export function configureMasterExpressMode(): MasterExpressConfig {
385386 }
386387 config = { ...config , ...updates } ;
387388
389+ // Certificate Loading Section
390+ logger . info ( '=== Certificate Loading ===' ) ;
391+
388392 // Only load certificates if TLS is enabled
389393 if ( config . tlsMode !== TlsMode . DISABLED ) {
390394 // Handle file loading for TLS certificates
391395 if ( ! config . serverTlsKey && config . serverTlsKeyPath ) {
392396 try {
393397 config = { ...config , serverTlsKey : fs . readFileSync ( config . serverTlsKeyPath , 'utf-8' ) } ;
394- logger . info ( `Successfully loaded TLS private key from file: ${ config . serverTlsKeyPath } ` ) ;
398+ logger . info ( `✓ TLS private key loaded from file: ${ config . serverTlsKeyPath } ` ) ;
395399 } catch ( e ) {
396400 const err = e instanceof Error ? e : new Error ( String ( e ) ) ;
397401 throw new Error ( `Failed to read TLS key from serverTlsKeyPath: ${ err . message } ` ) ;
398402 }
399403 } else if ( config . serverTlsKey ) {
400- logger . info ( 'Using TLS private key from environment variable' ) ;
404+ logger . info ( '✓ TLS private key loaded from environment variable' ) ;
401405 }
402406
403407 if ( ! config . serverTlsCert && config . serverTlsCertPath ) {
@@ -406,13 +410,13 @@ export function configureMasterExpressMode(): MasterExpressConfig {
406410 ...config ,
407411 serverTlsCert : fs . readFileSync ( config . serverTlsCertPath , 'utf-8' ) ,
408412 } ;
409- logger . info ( `Successfully loaded TLS certificate from file: ${ config . serverTlsCertPath } ` ) ;
413+ logger . info ( `✓ TLS certificate loaded from file: ${ config . serverTlsCertPath } ` ) ;
410414 } catch ( e ) {
411415 const err = e instanceof Error ? e : new Error ( String ( e ) ) ;
412416 throw new Error ( `Failed to read TLS certificate from serverTlsCertPath: ${ err . message } ` ) ;
413417 }
414418 } else if ( config . serverTlsCert ) {
415- logger . info ( 'Using TLS certificate from environment variable' ) ;
419+ logger . info ( '✓ TLS certificate loaded from environment variable' ) ;
416420 }
417421
418422 // Validate that certificates are properly loaded when TLS is enabled
@@ -428,7 +432,7 @@ export function configureMasterExpressMode(): MasterExpressConfig {
428432 awmServerCaCert : fs . readFileSync ( config . awmServerCaCertPath , 'utf-8' ) ,
429433 } ;
430434 logger . info (
431- `Successfully loaded Advanced Wallet Manager certificate from file: ${ config . awmServerCaCertPath ?. substring (
435+ `✓ AWM server CA certificate loaded from file: ${ config . awmServerCaCertPath ?. substring (
432436 0 ,
433437 50 ,
434438 ) } ...`,
@@ -445,7 +449,7 @@ export function configureMasterExpressMode(): MasterExpressConfig {
445449 if ( config . awmClientTlsKeyPath ) {
446450 try {
447451 config . awmClientTlsKey = fs . readFileSync ( config . awmClientTlsKeyPath , 'utf-8' ) ;
448- logger . info ( `Successfully loaded AWM client key from file: ${ config . awmClientTlsKeyPath } ` ) ;
452+ logger . info ( `✓ AWM client key loaded from file: ${ config . awmClientTlsKeyPath } ` ) ;
449453 } catch ( e ) {
450454 const err = e instanceof Error ? e : new Error ( String ( e ) ) ;
451455 throw new Error ( `Failed to read AWM client key from awmClientTlsKeyPath: ${ err . message } ` ) ;
@@ -455,13 +459,15 @@ export function configureMasterExpressMode(): MasterExpressConfig {
455459 if ( config . awmClientTlsCertPath ) {
456460 try {
457461 config . awmClientTlsCert = fs . readFileSync ( config . awmClientTlsCertPath , 'utf-8' ) ;
458- logger . info ( `Successfully loaded AWM client cert from file: ${ config . awmClientTlsCertPath } ` ) ;
462+ logger . info ( `✓ AWM client certificate loaded from file: ${ config . awmClientTlsCertPath } ` ) ;
459463 } catch ( e ) {
460464 const err = e instanceof Error ? e : new Error ( String ( e ) ) ;
461465 throw new Error ( `Failed to read AWM client cert from awmClientTlsCertPath: ${ err . message } ` ) ;
462466 }
463467 }
464468
469+ logger . info ( '==========================' ) ;
470+
465471 // Fallback to server certs if client certs are not provided
466472 if ( ! config . awmClientTlsKey ) {
467473 config . awmClientTlsKey = config . serverTlsKey ;
0 commit comments