From e70105db340ea475c1889c3ec0afbbf655dac1da Mon Sep 17 00:00:00 2001
From: Jack Magne <jmagne@dhcp-16-213.sjc.redhat.com>
Date: Tue, 10 Sep 2013 14:24:08 -0700
Subject: [PATCH] Patch to get rid of introduced warnings.

---
 .classpath                                                        | 2 +-
 .../src/com/netscape/cms/profile/constraint/KeyConstraint.java    | 4 ++--
 base/common/src/com/netscape/cms/profile/def/UserKeyDefault.java  | 2 +-
 base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java         | 8 ++++----
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/.classpath b/.classpath
index bee1aac..be9988d 100644
--- a/.classpath
+++ b/.classpath
@@ -41,7 +41,7 @@
 	<classpathentry kind="lib" path="/usr/share/java/xerces-j2.jar"/>
 	<classpathentry kind="lib" path="/usr/share/java/xml-commons-apis.jar"/>
 	<classpathentry kind="lib" path="/usr/share/java/istack-commons-runtime.jar"/>
-	<classpathentry kind="lib" path="/usr/share/java/jss/jss4.jar"/>
+	<classpathentry kind="lib" path="/usr/lib64/jss/jss4.jar"/>
 	<classpathentry kind="lib" path="/usr/share/java/apache-commons-lang.jar"/>
 	<classpathentry kind="lib" path="/usr/share/java/resteasy/resteasy-atom-provider.jar"/>
 	<classpathentry kind="lib" path="/usr/share/java/tomcat/catalina.jar"/>
diff --git a/base/common/src/com/netscape/cms/profile/constraint/KeyConstraint.java b/base/common/src/com/netscape/cms/profile/constraint/KeyConstraint.java
index 3e07ca3..3a7d09d 100644
--- a/base/common/src/com/netscape/cms/profile/constraint/KeyConstraint.java
+++ b/base/common/src/com/netscape/cms/profile/constraint/KeyConstraint.java
@@ -49,7 +49,7 @@ import com.netscape.cmsutil.crypto.CryptoUtil;
  *
  * @version $Revision$, $Date$
  */
-@SuppressWarnings("serial")
+
 public class KeyConstraint extends EnrollConstraint {
 
     public static final String CONFIG_KEY_TYPE = "keyType"; // (EC, RSA)
@@ -148,7 +148,7 @@ public class KeyConstraint extends EnrollConstraint {
                                     value));
                 }
 
-                Vector vect = CryptoUtil.getECKeyCurve(key);
+                Vector<?> vect = CryptoUtil.getECKeyCurve(key);
 
                 boolean curveFound = false;
 
diff --git a/base/common/src/com/netscape/cms/profile/def/UserKeyDefault.java b/base/common/src/com/netscape/cms/profile/def/UserKeyDefault.java
index 62b8e64..4531e0f 100644
--- a/base/common/src/com/netscape/cms/profile/def/UserKeyDefault.java
+++ b/base/common/src/com/netscape/cms/profile/def/UserKeyDefault.java
@@ -147,7 +147,7 @@ public class UserKeyDefault extends EnrollDefault {
                 if (k.getAlgorithm().equals("RSA")) {
                     return Integer.toString(getRSAKeyLen(k));
                 } else if (k.getAlgorithm().equals("EC")) {
-                    Vector vect = CryptoUtil.getECKeyCurve(k);
+                    Vector<String> vect = CryptoUtil.getECKeyCurve(k);
                     if (vect != null)
                         return vect.toString();
                     else
diff --git a/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java b/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
index 25d89b0..5957f04 100644
--- a/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
+++ b/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
@@ -117,7 +117,7 @@ import org.mozilla.jss.util.Password;
 
 import com.netscape.cmsutil.util.Cert;
 import com.netscape.cmsutil.util.Utils;
-
+@SuppressWarnings("serial")
 public class CryptoUtil {
 
     public static final String CERTREQ_BEGIN_HEADING = "-----BEGIN CERTIFICATE REQUEST-----";
@@ -1643,12 +1643,12 @@ public class CryptoUtil {
         return ecCurves;
     }
 
-    public static Vector getECKeyCurve(X509Key key) throws Exception {
+    public static Vector<String> getECKeyCurve(X509Key key) throws Exception {
         AlgorithmId algid = key.getAlgorithmId();
         //System.out.println("CryptoUtil: getECKeyCurve: algid ="+ algid);
 
         /*
-         * Get raw string representation of alg parameters, will give 
+         * Get raw string representation of alg parameters, will give
          * us the curve OID.
          */
         String params =  null;
@@ -1661,7 +1661,7 @@ public class CryptoUtil {
         }
 
         //System.out.println("CryptoUtil: getECKeyCurve: EC key OID ="+ params);
-        Vector vect = ecOIDs.get(params);
+        Vector<String> vect = ecOIDs.get(params);
 
         return vect;
     }
-- 
1.8.3.1

