mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 23:30:55 +03:00
Log security provider registration failures (#374)
This commit is contained in:
committed by
Jeroen van Erp
parent
f046a41750
commit
823f1e5759
@@ -69,15 +69,15 @@ public class SecurityUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (securityProvider == null) {
|
if (securityProvider == null) {
|
||||||
MessageDigest.getInstance("MD5", provider.getName());
|
MessageDigest.getInstance("MD5", provider);
|
||||||
KeyAgreement.getInstance("DH", provider.getName());
|
KeyAgreement.getInstance("DH", provider);
|
||||||
setSecurityProvider(provider.getName());
|
setSecurityProvider(provider.getName());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (NoSuchAlgorithmException e) {
|
} catch (NoSuchAlgorithmException e) {
|
||||||
LOG.info(format("Security Provider '%s' does not support necessary algorithm", providerClassName), e);
|
LOG.info(format("Security Provider '%s' does not support necessary algorithm", providerClassName), e);
|
||||||
} catch (NoSuchProviderException e) {
|
} catch (Exception e) {
|
||||||
LOG.info("Registration of Security Provider '{}' unexpectedly failed", providerClassName);
|
LOG.info(format("Registration of Security Provider '%s' unexpectedly failed", providerClassName), e);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user