[Pki-devel] [PATCH] 0024..0025 More cleanups

Fraser Tweedale ftweedal at redhat.com
Fri Feb 27 06:43:12 UTC 2015


A couple more preliminary patches.  The big ones are coming.

Cheers,
Fraser
-------------- next part --------------
>From 6e3e44f9b8dbd4419c7586f9fef29f76ee91b4ca Mon Sep 17 00:00:00 2001
From: Fraser Tweedale <frase at frase.id.au>
Date: Mon, 23 Feb 2015 23:31:32 -0500
Subject: [PATCH 24/25] Fix incorrect class name in debug message

---
 .../com/netscape/cms/profile/def/AuthorityKeyIdentifierExtDefault.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/base/server/cms/src/com/netscape/cms/profile/def/AuthorityKeyIdentifierExtDefault.java b/base/server/cms/src/com/netscape/cms/profile/def/AuthorityKeyIdentifierExtDefault.java
index 77fd0a5fdaea2de826ee848fd88883910d4c3f3b..095f8bb5ffa2f950b58c868a6daee99991a80daa 100644
--- a/base/server/cms/src/com/netscape/cms/profile/def/AuthorityKeyIdentifierExtDefault.java
+++ b/base/server/cms/src/com/netscape/cms/profile/def/AuthorityKeyIdentifierExtDefault.java
@@ -106,7 +106,7 @@ public class AuthorityKeyIdentifierExtDefault extends CAEnrollDefault {
                 populate(null, info);
 
             } catch (EProfileException e) {
-                CMS.debug("BasicConstraintsExtDefault: getValue " + e.toString());
+                CMS.debug("AuthorityKeyIdentifierExtDefault: getValue " + e.toString());
                 throw new EPropertyException(CMS.getUserMessage(
                         locale, "CMS_INVALID_PROPERTY", name));
             }
-- 
2.1.0

-------------- next part --------------
>From b7b55d71aa7f6099c21cc12473f73e18b7b95a32 Mon Sep 17 00:00:00 2001
From: Fraser Tweedale <frase at frase.id.au>
Date: Thu, 26 Feb 2015 22:36:23 -0500
Subject: [PATCH 25/25] Remove unneeded class EnrollProfileContext

---
 .../netscape/cms/profile/common/EnrollProfile.java |  6 ++---
 .../cms/profile/common/EnrollProfileContext.java   | 31 ----------------------
 2 files changed, 2 insertions(+), 35 deletions(-)
 delete mode 100644 base/server/cms/src/com/netscape/cms/profile/common/EnrollProfileContext.java

diff --git a/base/server/cms/src/com/netscape/cms/profile/common/EnrollProfile.java b/base/server/cms/src/com/netscape/cms/profile/common/EnrollProfile.java
index 6f803ee948dbae4763db5b10e13f48bbd8b96d5f..fe3b424a4b8e13215d4029d328d4a1e280be63ff 100644
--- a/base/server/cms/src/com/netscape/cms/profile/common/EnrollProfile.java
+++ b/base/server/cms/src/com/netscape/cms/profile/common/EnrollProfile.java
@@ -127,16 +127,14 @@ public abstract class EnrollProfile extends BasicProfile
     }
 
     public IProfileContext createContext() {
-        return new EnrollProfileContext();
+        return new ProfileContext();
     }
 
     /**
      * Creates request.
      */
-    public IRequest[] createRequests(IProfileContext context, Locale locale)
+    public IRequest[] createRequests(IProfileContext ctx, Locale locale)
             throws EProfileException {
-        EnrollProfileContext ctx = (EnrollProfileContext) context;
-
         // determine how many requests should be created
         String cert_request_type = ctx.get(CTX_CERT_REQUEST_TYPE);
         String cert_request = ctx.get(CTX_CERT_REQUEST);
diff --git a/base/server/cms/src/com/netscape/cms/profile/common/EnrollProfileContext.java b/base/server/cms/src/com/netscape/cms/profile/common/EnrollProfileContext.java
deleted file mode 100644
index 444024b94322ea42fc8a9227ca398844e89bfa94..0000000000000000000000000000000000000000
--- a/base/server/cms/src/com/netscape/cms/profile/common/EnrollProfileContext.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.profile.common;
-
-import com.netscape.certsrv.profile.IProfileContext;
-
-/**
- * This class implements an enrollment profile context
- * that carries information for request creation.
- *
- * @version $Revision$, $Date$
- */
-public class EnrollProfileContext extends ProfileContext
-        implements IProfileContext {
-
-}
-- 
2.1.0



More information about the Pki-devel mailing list