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

Jean-Noël Rouvignac
25.17.2016 33047cc2802d7174ad06bc62e972bc9a876abe99
opendj-server-legacy/src/main/java/org/opends/server/backends/TrustStoreBackend.java
@@ -190,7 +190,7 @@
    // Construct the trust store base entry.
    LinkedHashMap<ObjectClass,String> objectClasses = new LinkedHashMap<>(2);
    objectClasses.put(CoreSchema.getTopObjectClass(), OC_TOP);
    objectClasses.put(DirectoryServer.getSchema().getObjectClass("ds-cfg-branch"), "ds-cfg-branch");
    objectClasses.put(DirectoryServer.getInstance().getServerContext().getSchema().getObjectClass("ds-cfg-branch"), "ds-cfg-branch");
    LinkedHashMap<AttributeType,List<Attribute>> userAttrs = new LinkedHashMap<>(1);
    for (AVA ava : getBaseDN().rdn())
@@ -396,7 +396,7 @@
         throws DirectoryException
  {
    // Make sure that the DN specifies a certificate alias.
    AttributeType t = DirectoryServer.getSchema().getAttributeType(ATTR_CRYPTO_KEY_ID);
    AttributeType t = DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_CRYPTO_KEY_ID);
    ByteString v = entryDN.rdn().getAttributeValue(t);
    if (v == null)
    {
@@ -428,14 +428,14 @@
    // Construct the certificate entry to return.
    LinkedHashMap<ObjectClass,String> ocMap = new LinkedHashMap<>(2);
    ocMap.put(CoreSchema.getTopObjectClass(), OC_TOP);
    ocMap.put(DirectoryServer.getSchema().getObjectClass(OC_CRYPTO_INSTANCE_KEY), OC_CRYPTO_INSTANCE_KEY);
    ocMap.put(DirectoryServer.getInstance().getServerContext().getSchema().getObjectClass(OC_CRYPTO_INSTANCE_KEY), OC_CRYPTO_INSTANCE_KEY);
    LinkedHashMap<AttributeType,List<Attribute>> opAttrs = new LinkedHashMap<>(0);
    LinkedHashMap<AttributeType,List<Attribute>> userAttrs = new LinkedHashMap<>(3);
    userAttrs.put(t, Attributes.createAsList(t, v));
    t = DirectoryServer.getSchema().getAttributeType(ATTR_CRYPTO_PUBLIC_KEY_CERTIFICATE);
    t = DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_CRYPTO_PUBLIC_KEY_CERTIFICATE);
    AttributeBuilder builder = new AttributeBuilder(t);
    builder.setOption("binary");
    builder.add(certValue);
@@ -551,7 +551,7 @@
      if (scope != SearchScope.BASE_OBJECT && aliases.length != 0)
      {
        AttributeType certAliasType = DirectoryServer.getSchema().getAttributeType(ATTR_CRYPTO_KEY_ID);
        AttributeType certAliasType = DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_CRYPTO_KEY_ID);
        for (String alias : aliases)
        {
          DN certDN = makeChildDN(getBaseDN(), certAliasType, alias);
@@ -908,7 +908,7 @@
    DN entryDN = entry.getName();
    // Make sure that the DN specifies a certificate alias.
    AttributeType t = DirectoryServer.getSchema().getAttributeType(ATTR_CRYPTO_KEY_ID);
    AttributeType t = DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_CRYPTO_KEY_ID);
    ByteString v = entryDN.rdn().getAttributeValue(t);
    if (v == null)
    {
@@ -925,7 +925,7 @@
        throw new DirectoryException(ResultCode.ENTRY_ALREADY_EXISTS, message);
      }
      if (entry.hasObjectClass(DirectoryServer.getSchema().getObjectClass(OC_SELF_SIGNED_CERT_REQUEST)))
      if (entry.hasObjectClass(DirectoryServer.getInstance().getServerContext().getSchema().getObjectClass(OC_SELF_SIGNED_CERT_REQUEST)))
      {
        try
        {
@@ -1024,7 +1024,7 @@
       throws DirectoryException
  {
    // Make sure that the DN specifies a certificate alias.
    AttributeType t = DirectoryServer.getSchema().getAttributeType(ATTR_CRYPTO_KEY_ID);
    AttributeType t = DirectoryServer.getInstance().getServerContext().getSchema().getAttributeType(ATTR_CRYPTO_KEY_ID);
    ByteString v = entryDN.rdn().getAttributeValue(t);
    if (v == null)
    {