mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Yannick Lecaillez
12.24.2015 fb7b5a2fb01e4f54cc60c1597fd496ddca73dd39
opendj-server-legacy/src/main/java/org/opends/server/util/Platform.java
@@ -101,7 +101,7 @@
    RSA("rsa", 2048, "SHA1WithRSA"),
    /** Elliptic Curve key algorithm with 233 bits size and SHA1withECDSA signing algorithm. */
    EC("ec", 233, "SHA1withECDSA");
    EC("ec", 256, "SHA1withECDSA");
    /** Default key type used when none can be determined. */
    public final static KeyType DEFAULT = RSA;
@@ -251,14 +251,14 @@
          throw new KeyStoreException(msg.toString());
        }
        ks.deleteEntry(alias);
        FileOutputStream fs = new FileOutputStream(ksPath);
        ks.store(fs, pwd);
        fs.close();
        try (final FileOutputStream fs = new FileOutputStream(ksPath))
        {
          ks.store(fs, pwd);
        }
      }
      catch (Exception e)
      {
        LocalizableMessage msg = ERR_CERTMGR_DELETE_ALIAS.get(alias, e.getMessage());
        throw new KeyStoreException(msg.toString());
        throw new KeyStoreException(ERR_CERTMGR_DELETE_ALIAS.get(alias, e.getMessage()).toString(), e);
      }
    }
@@ -300,8 +300,7 @@
      }
      catch (Exception e)
      {
        LocalizableMessage msg = ERR_CERTMGR_ADD_CERT.get(alias, e.getMessage());
        throw new KeyStoreException(msg.toString());
        throw new KeyStoreException(ERR_CERTMGR_ADD_CERT.get(alias, e.getMessage()).toString(), e);
      }
    }
@@ -346,9 +345,7 @@
      }
      catch (Exception e)
      {
        LocalizableMessage msg = ERR_CERTMGR_GEN_SELF_SIGNED_CERT.get(alias, e
            .getMessage());
        throw new KeyStoreException(msg.toString());
        throw new KeyStoreException(ERR_CERTMGR_GEN_SELF_SIGNED_CERT.get(alias, e.getMessage()).toString(), e);
      }
      return ks;
    }
@@ -378,8 +375,7 @@
      }
      catch (Exception e)
      {
        LocalizableMessage msg = ERR_CERTMGR_TRUSTED_CERT.get(alias, e.getMessage());
        throw new KeyStoreException(msg.toString());
        throw new KeyStoreException(ERR_CERTMGR_TRUSTED_CERT.get(alias, e.getMessage()).toString(), e);
      }
    }