JMXMBeanDUnitTest.java 文件源码

java
阅读 26 收藏 0 点赞 0 评论 0

项目:monarch 作者:
private Properties configureJMXSSLProperties(final Properties properties, final boolean isLegacy,
    final boolean useMultiKey) {
  if (isLegacy) {
    properties.setProperty(JMX_MANAGER_SSL_CIPHERS, "any");
    properties.setProperty(JMX_MANAGER_SSL_PROTOCOLS, "any");
    properties.setProperty(JMX_MANAGER_SSL_ENABLED, "true");
    properties.setProperty(JMX_MANAGER_SSL_KEYSTORE, getSimpleSingleKeyKeystore());
    properties.setProperty(JMX_MANAGER_SSL_KEYSTORE_PASSWORD, "password");
    properties.setProperty(JMX_MANAGER_SSL_TRUSTSTORE, getSimpleSingleKeyKeystore());
    properties.setProperty(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD, "password");
  } else {
    {
      properties.setProperty(SSL_CIPHERS, "any");
      properties.setProperty(SSL_PROTOCOLS, "any");
      properties.setProperty(SSL_KEYSTORE_PASSWORD, "password");
      properties.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
      properties.setProperty(SSL_KEYSTORE, getSimpleSingleKeyKeystore());
      properties.setProperty(SSL_TRUSTSTORE, getSimpleSingleKeyKeystore());
      properties.setProperty(SSL_ENABLED_COMPONENTS,
          SecurableCommunicationChannel.JMX.getConstant());

      if (useMultiKey) {
        properties.setProperty(SSL_KEYSTORE, getMultiKeyKeystore());
        properties.setProperty(SSL_TRUSTSTORE, getMultiKeyTruststore());
        properties.setProperty(SSL_JMX_ALIAS, "jmxkey");
      }
    }
  }
  return properties;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号