@@ -266,27 +266,12 @@ private SslContext initSMSslContext(ConfigOption configOption) throws NetworkExc
266266 try {
267267 // Get file, file existence is already checked when check config file.
268268 // Init SslContext
269- logger .info (" build SM ssl context with configured certificates " );
270- if (configOption .getCryptoMaterialConfig ().getCryptoProvider () != null
271- && configOption
272- .getCryptoMaterialConfig ()
273- .getCryptoProvider ()
274- .equalsIgnoreCase (HSM )) {
275- return SMSslClientContextFactory .build (
276- configOption .getCryptoMaterialConfig ().getCaInputStream (),
277- configOption .getCryptoMaterialConfig ().getEnSSLCertInputStream (),
278- "sm2_" + configOption .getCryptoMaterialConfig ().getEnSslKeyIndex (),
279- configOption .getCryptoMaterialConfig ().getSdkCertInputStream (),
280- "sm2_" + configOption .getCryptoMaterialConfig ().getSslKeyIndex ());
281- } else {
282- return SMSslClientContextFactory .build (
283- configOption .getCryptoMaterialConfig ().getCaInputStream (),
284- configOption .getCryptoMaterialConfig ().getEnSSLCertInputStream (),
285- configOption .getCryptoMaterialConfig ().getEnSSLPrivateKeyInputStream (),
286- configOption .getCryptoMaterialConfig ().getSdkCertInputStream (),
287- configOption .getCryptoMaterialConfig ().getSdkPrivateKeyInputStream ());
288- }
289-
269+ return SMSslClientContextFactory .build (
270+ configOption .getCryptoMaterialConfig ().getCaInputStream (),
271+ configOption .getCryptoMaterialConfig ().getEnSSLCertInputStream (),
272+ configOption .getCryptoMaterialConfig ().getEnSSLPrivateKeyInputStream (),
273+ configOption .getCryptoMaterialConfig ().getSdkCertInputStream (),
274+ configOption .getCryptoMaterialConfig ().getSdkPrivateKeyInputStream ());
290275 } catch (Exception e ) {
291276 if (configOption .getCryptoMaterialConfig ().getCryptoProvider ().equalsIgnoreCase (HSM )) {
292277 logger .error (
0 commit comments