Blame SOURCES/jss-Fixed-build-failures.patch

f2c538
From 22092d1bde94dc8a1f6e8198fa2fcc597c36c32f Mon Sep 17 00:00:00 2001
f2c538
From: "Endi S. Dewata" <edewata@redhat.com>
f2c538
Date: Wed, 9 Dec 2015 00:30:50 +0100
f2c538
Subject: [PATCH] Fixed build failures.
f2c538
f2c538
The Javadoc on various classes have been modified to fix build
f2c538
failures on F23 and Rawhide due to stringent requirements on
f2c538
those platforms.
f2c538
f2c538
The Debug_debug.jnot has been renamed to Debug.java to fix build
f2c538
failure in Eclipse.
f2c538
f2c538
https://bugzilla.redhat.com/show_bug.cgi?id=1289799
f2c538
---
f2c538
 .classpath                                              |  7 +++++++
f2c538
 .project                                                | 17 +++++++++++++++++
f2c538
 mozilla/security/jss/build_java.pl                      |  2 +-
f2c538
 mozilla/security/jss/org/mozilla/jss/CryptoManager.java | 14 +++++++-------
f2c538
 .../security/jss/org/mozilla/jss/asn1/ASN1Header.java   |  2 +-
f2c538
 .../security/jss/org/mozilla/jss/pkcs11/PK11Token.java  |  2 +-
f2c538
 .../security/jss/org/mozilla/jss/pkcs12/CertBag.java    |  1 +
f2c538
 .../security/jss/org/mozilla/jss/pkcs7/ContentInfo.java |  1 -
f2c538
 .../security/jss/org/mozilla/jss/pkcs7/SignerInfo.java  | 17 ++++++++++-------
f2c538
 .../jss/org/mozilla/jss/pkix/cms/ContentInfo.java       |  1 -
f2c538
 .../jss/org/mozilla/jss/pkix/cms/SignerInfo.java        | 17 ++++++++++-------
f2c538
 .../jss/org/mozilla/jss/pkix/crmf/CertReqMsg.java       |  2 +-
f2c538
 .../jss/org/mozilla/jss/ssl/SSLServerSocket.java        |  3 ---
f2c538
 .../mozilla/jss/util/{Debug_debug.jnot => Debug.java}   |  0
f2c538
 14 files changed, 56 insertions(+), 30 deletions(-)
f2c538
 create mode 100644 .classpath
f2c538
 create mode 100644 .project
f2c538
 rename mozilla/security/jss/org/mozilla/jss/util/{Debug_debug.jnot => Debug.java} (100%)
f2c538
f2c538
diff --git a/.classpath b/.classpath
f2c538
new file mode 100644
f2c538
index 0000000000000000000000000000000000000000..df092d3f7d8df936b753bea75c11bf4003e1a77f
f2c538
--- /dev/null
f2c538
+++ b/.classpath
f2c538
@@ -0,0 +1,7 @@
f2c538
+
f2c538
+<classpath>
f2c538
+	<classpathentry excluding="samples/" kind="src" path="mozilla/security/jss"/>
f2c538
+	<classpathentry kind="src" path="mozilla/security/jss/samples"/>
f2c538
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
f2c538
+	<classpathentry kind="output" path="bin"/>
f2c538
+</classpath>
f2c538
diff --git a/.project b/.project
f2c538
new file mode 100644
f2c538
index 0000000000000000000000000000000000000000..c0b616e95c7512076c9976374bda14e11d7cdd8c
f2c538
--- /dev/null
f2c538
+++ b/.project
f2c538
@@ -0,0 +1,17 @@
f2c538
+
f2c538
+<projectDescription>
f2c538
+	<name>jss-4.2</name>
f2c538
+	<comment></comment>
f2c538
+	<projects>
f2c538
+	</projects>
f2c538
+	<buildSpec>
f2c538
+		<buildCommand>
f2c538
+			<name>org.eclipse.jdt.core.javabuilder</name>
f2c538
+			<arguments>
f2c538
+			</arguments>
f2c538
+		</buildCommand>
f2c538
+	</buildSpec>
f2c538
+	<natures>
f2c538
+		<nature>org.eclipse.jdt.core.javanature</nature>
f2c538
+	</natures>
f2c538
+</projectDescription>
f2c538
diff --git a/mozilla/security/jss/build_java.pl b/mozilla/security/jss/build_java.pl
f2c538
index c34473e0eec883323b6b100e671018a9edafe442..379a5e05dbc0599c95d2228bd14f659d3e493d0b 100644
f2c538
--- a/mozilla/security/jss/build_java.pl
f2c538
+++ b/mozilla/security/jss/build_java.pl
f2c538
@@ -137,7 +137,7 @@ sub setup_vars {
f2c538
         $class_jar = "$dist_dir/$cmdline_vars{XPCLASS_DBG_JAR}";
f2c538
         $class_release_dir .= "/$cmdline_vars{SOURCE_RELEASE_CLASSES_DBG_DIR}";
f2c538
         $javac_opt_flag = "-g";
f2c538
-        $debug_source_file = "org/mozilla/jss/util/Debug_debug.jnot";
f2c538
+        $debug_source_file = "org/mozilla/jss/util/Debug.java";
f2c538
     }
f2c538
     $jni_header_dir = "$dist_dir/private/jss/_jni";
f2c538
 
f2c538
diff --git a/mozilla/security/jss/org/mozilla/jss/CryptoManager.java b/mozilla/security/jss/org/mozilla/jss/CryptoManager.java
f2c538
index 08aad8fe3c3a62ae8e233fc1035723690adf4581..6ef0256a3b777db48461f19da0fa64ec7857ed6b 100644
f2c538
--- a/mozilla/security/jss/org/mozilla/jss/CryptoManager.java
f2c538
+++ b/mozilla/security/jss/org/mozilla/jss/CryptoManager.java
f2c538
@@ -600,7 +600,7 @@ public final class CryptoManager implements TokenSupplier
f2c538
      * loaded cryptographic modules for the token.
f2c538
      *
f2c538
      * @param name The name of the token.
f2c538
-     * @exception org.mozilla.jss.crypto.NoSuchTokenException If no token
f2c538
+     * @exception NoSuchTokenException If no token
f2c538
      *  is found with the given name.
f2c538
      */
f2c538
     public synchronized CryptoToken getTokenByName(String name)
f2c538
@@ -855,9 +855,9 @@ public final class CryptoManager implements TokenSupplier
f2c538
      * initialize().
f2c538
      *
f2c538
      * @param configDir The directory containing the security databases.
f2c538
-     * @exception org.mozilla.jss.util.KeyDatabaseException Unable to open
f2c538
+     * @exception KeyDatabaseException Unable to open
f2c538
      *  the key database, or it was currupted.
f2c538
-     * @exception org.mozilla.jss.util.CertDatabaseException Unable
f2c538
+     * @exception CertDatabaseException Unable
f2c538
      *  to open the certificate database, or it was currupted.
f2c538
      **/
f2c538
     public static synchronized void initialize( String configDir )
f2c538
@@ -878,9 +878,9 @@ public final class CryptoManager implements TokenSupplier
f2c538
      * initialize().
f2c538
      *
f2c538
      * @param values The options with which to initialize CryptoManager.
f2c538
-     * @exception org.mozilla.jss.util.KeyDatabaseException Unable to open
f2c538
+     * @exception KeyDatabaseException Unable to open
f2c538
      *  the key database, or it was currupted.
f2c538
-     * @exception org.mozilla.jss.util.CertDatabaseException Unable
f2c538
+     * @exception CertDatabaseException Unable
f2c538
      *  to open the certificate database, or it was currupted.
f2c538
      **/
f2c538
     public static synchronized void initialize( InitializationValues values )
f2c538
@@ -1021,7 +1021,7 @@ public final class CryptoManager implements TokenSupplier
f2c538
      * @return The leaf certificate from the chain.
f2c538
      * @exception CertificateEncodingException If the package encoding
f2c538
      *      was not recognized.
f2c538
-     * @exception CertificateNicknameConflictException If the leaf certificate
f2c538
+     * @exception NicknameConflictException If the leaf certificate
f2c538
      *      is a user certificate, and another certificate already has the
f2c538
      *      given nickname.
f2c538
      * @exception UserCertConflictException If the leaf certificate
f2c538
@@ -1059,7 +1059,7 @@ public final class CryptoManager implements TokenSupplier
f2c538
      * @return The leaf certificate from the chain.
f2c538
      * @exception CertificateEncodingException If the package encoding
f2c538
      *      was not recognized.
f2c538
-     * @exception CertificateNicknameConflictException If the leaf certificate
f2c538
+     * @exception NicknameConflictException If the leaf certificate
f2c538
      *      another certificate already has the given nickname.
f2c538
      * @exception UserCertConflictException If the leaf certificate
f2c538
      *      has already been imported.
f2c538
diff --git a/mozilla/security/jss/org/mozilla/jss/asn1/ASN1Header.java b/mozilla/security/jss/org/mozilla/jss/asn1/ASN1Header.java
f2c538
index bfa37c9f5eba1c5df9bb275cad16c1bf57c9c65d..d15be4922b52d16a25e3212b2b25809cd7ddf3b6 100644
f2c538
--- a/mozilla/security/jss/org/mozilla/jss/asn1/ASN1Header.java
f2c538
+++ b/mozilla/security/jss/org/mozilla/jss/asn1/ASN1Header.java
f2c538
@@ -259,7 +259,7 @@ public class ASN1Header {
f2c538
     /**
f2c538
      * This constructor is to be called when we are constructing an ASN1Value
f2c538
      * rather than decoding it.
f2c538
-     * @param contentLength Must be >=0. Although indefinite length
f2c538
+     * @param contentLength Must be >=0. Although indefinite length
f2c538
      *      decoding is supported, indefinite length encoding
f2c538
      *      is not.
f2c538
      */
f2c538
diff --git a/mozilla/security/jss/org/mozilla/jss/pkcs11/PK11Token.java b/mozilla/security/jss/org/mozilla/jss/pkcs11/PK11Token.java
f2c538
index e521b6108b90daeb7035413bba50a41e9b20ec49..98e93f0e858b09402364b4dc89c36a63e7ef0f7b 100644
f2c538
--- a/mozilla/security/jss/org/mozilla/jss/pkcs11/PK11Token.java
f2c538
+++ b/mozilla/security/jss/org/mozilla/jss/pkcs11/PK11Token.java
f2c538
@@ -236,7 +236,7 @@ public final class PK11Token implements CryptoToken {
f2c538
      *
f2c538
      * @param ssopwcb The security officer's current password callback.
f2c538
      * @param userpwcb The user's new password callback.
f2c538
-     * @exception IncorrectPinException If the security officer PIN is
f2c538
+     * @exception IncorrectPasswordException If the security officer PIN is
f2c538
      *  incorrect.
f2c538
      * @exception TokenException If the PIN was already initialized,
f2c538
      *  or there was an unspecified error in the token.
f2c538
diff --git a/mozilla/security/jss/org/mozilla/jss/pkcs12/CertBag.java b/mozilla/security/jss/org/mozilla/jss/pkcs12/CertBag.java
f2c538
index a1b08d2e9ee9dfcb4ee809e101f3074611664384..61ad979d65d5ecc6659281218c58e8ec9a48211c 100644
f2c538
--- a/mozilla/security/jss/org/mozilla/jss/pkcs12/CertBag.java
f2c538
+++ b/mozilla/security/jss/org/mozilla/jss/pkcs12/CertBag.java
f2c538
@@ -91,6 +91,7 @@ public class CertBag implements ASN1Value {
f2c538
      * 
  • If the type is SDSI_CERT_TYPE, returns
  • f2c538
          *      an IA5String.
    f2c538
          * 
  • For all other types, returns an ANY.
  • f2c538
    +     * 
    f2c538
          *
    f2c538
          * @exception InvalidBERException If the cert is not encoded correctly.
    f2c538
          */
    f2c538
    diff --git a/mozilla/security/jss/org/mozilla/jss/pkcs7/ContentInfo.java b/mozilla/security/jss/org/mozilla/jss/pkcs7/ContentInfo.java
    f2c538
    index 4db7a42c75cc21d71841e20dcb9a4c1494ff08c2..4578e9bcd8abdb4e7b6717b07aee932dd887d675 100644
    f2c538
    --- a/mozilla/security/jss/org/mozilla/jss/pkcs7/ContentInfo.java
    f2c538
    +++ b/mozilla/security/jss/org/mozilla/jss/pkcs7/ContentInfo.java
    f2c538
    @@ -169,7 +169,6 @@ public class ContentInfo implements ASN1Value {
    f2c538
          *  an OCTET_STRING will be returned.
    f2c538
          * 

    If the contentType is not one of the six standard types,

    f2c538
          *      the returned object will be an ANY.
    f2c538
    -     * 
    f2c538
          */
    f2c538
         public ASN1Value getInterpretedContent() throws InvalidBERException {
    f2c538
             if(contentType.equals(DATA)) {
    f2c538
    diff --git a/mozilla/security/jss/org/mozilla/jss/pkcs7/SignerInfo.java b/mozilla/security/jss/org/mozilla/jss/pkcs7/SignerInfo.java
    f2c538
    index 300e993cffd9dcadaf996609abeebf8627eafde8..c49107c80543ec94fbb3117a1a9a1088f851a6b3 100644
    f2c538
    --- a/mozilla/security/jss/org/mozilla/jss/pkcs7/SignerInfo.java
    f2c538
    +++ b/mozilla/security/jss/org/mozilla/jss/pkcs7/SignerInfo.java
    f2c538
    @@ -129,7 +129,7 @@ public class SignerInfo implements ASN1Value {
    f2c538
         /**
    f2c538
          * Retrieves the DigestAlgorithm used in this SignerInfo.
    f2c538
          *
    f2c538
    -     * @exception NoSuchAlgorithm If the algorithm is not recognized by JSS.
    f2c538
    +     * @exception NoSuchAlgorithmException If the algorithm is not recognized by JSS.
    f2c538
          */
    f2c538
         public DigestAlgorithm getDigestAlgorithm()
    f2c538
             throws NoSuchAlgorithmException
    f2c538
    @@ -402,10 +402,12 @@ public class SignerInfo implements ASN1Value {
    f2c538
         /**
    f2c538
          * Verifies that this SignerInfo contains a valid signature of the
    f2c538
          * given message digest.  If any authenticated attributes are present,
    f2c538
    -     * they are also validated. The verification algorithm is as follows:
      f2c538
      -     * 

      Note that this does not verify the validity of the

      f2c538
      -     *  the certificate itself, only the signature.
      f2c538
      +     * they are also validated. The verification algorithm is as follows:
      f2c538
            *
      f2c538
      +     * Note that this does not verify the validity of the
      f2c538
      +     * the certificate itself, only the signature.
      f2c538
      +     *
      f2c538
      +     * 
        f2c538
              * 
      • If no authenticated attributes are present, the content type is
      • f2c538
              *  verified to be data. Then it is verified that the message
        f2c538
              *  digest passed
        f2c538
        @@ -413,24 +415,25 @@ public class SignerInfo implements ASN1Value {
        f2c538
              *  digest in the SignerInfo.
        f2c538
              *
        f2c538
              * 
      • If authenticated attributes are present,
      • f2c538
        -     *  two particular attributes must be present: 
          f2c538
          +     *  two particular attributes must be present:
          f2c538
          +     * 
            f2c538
                  *  
          • PKCS #9 Content-Type, the type of content that is being signed.
          • f2c538
                  *      This must match the contentType parameter.
            f2c538
                  *  
          • PKCS #9 Message-Digest, the digest of the content that is being
          • f2c538
                  *      signed. This must match the messageDigest parameter.
            f2c538
                  * 
            f2c538
            +     *
            f2c538
                  * After these two attributes are verified to be both present and correct,
            f2c538
                  * the encryptedDigest field of the SignerInfo is verified to be the
            f2c538
                  * signature of the contents octets of the DER encoding of the
            f2c538
                  * authenticatedAttributes field.
            f2c538
            -     *
            f2c538
                  * 
            f2c538
                  *
            f2c538
                  * @param messageDigest The hash of the content that is signed by this
            f2c538
                  *  SignerInfo.
            f2c538
                  * @param contentType The type of the content that is signed by this
            f2c538
                  *  SignerInfo.
            f2c538
            -     * @exception NoSuchObjectException If no certificate matching the
            f2c538
            +     * @exception ObjectNotFoundException If no certificate matching the
            f2c538
                  *      the issuer name and serial number can be found.
            f2c538
                  */
            f2c538
                 public void verify(byte[] messageDigest, OBJECT_IDENTIFIER contentType)
            f2c538
            diff --git a/mozilla/security/jss/org/mozilla/jss/pkix/cms/ContentInfo.java b/mozilla/security/jss/org/mozilla/jss/pkix/cms/ContentInfo.java
            f2c538
            index 91ae770c94b3a8817c13e4cb86609c432ef682b8..9f61e605b416dffc38525ccec4dcce9f380c7dcc 100644
            f2c538
            --- a/mozilla/security/jss/org/mozilla/jss/pkix/cms/ContentInfo.java
            f2c538
            +++ b/mozilla/security/jss/org/mozilla/jss/pkix/cms/ContentInfo.java
            f2c538
            @@ -168,7 +168,6 @@ public class ContentInfo implements ASN1Value {
            f2c538
                  *  an OCTET_STRING will be returned.
            f2c538
                  * 

            If the contentType is not one of the six standard types,

            f2c538
                  *      the returned object will be an ANY.
            f2c538
            -     * 
            f2c538
                  */
            f2c538
                 public ASN1Value getInterpretedContent() throws InvalidBERException {
            f2c538
                     if(contentType.equals(DATA)) {
            f2c538
            diff --git a/mozilla/security/jss/org/mozilla/jss/pkix/cms/SignerInfo.java b/mozilla/security/jss/org/mozilla/jss/pkix/cms/SignerInfo.java
            f2c538
            index ff34a554e4d5f43b6ce18acfac01899858d62117..e7feb934dc0a78fbc40a6ff7d8db87f0af9177fe 100644
            f2c538
            --- a/mozilla/security/jss/org/mozilla/jss/pkix/cms/SignerInfo.java
            f2c538
            +++ b/mozilla/security/jss/org/mozilla/jss/pkix/cms/SignerInfo.java
            f2c538
            @@ -130,7 +130,7 @@ public class SignerInfo implements ASN1Value {
            f2c538
                 /**
            f2c538
                  * Retrieves the DigestAlgorithm used in this SignerInfo.
            f2c538
                  *
            f2c538
            -     * @exception NoSuchAlgorithm If the algorithm is not recognized by JSS.
            f2c538
            +     * @exception NoSuchAlgorithmException If the algorithm is not recognized by JSS.
            f2c538
                  */
            f2c538
                 public DigestAlgorithm getDigestAlgorithm()
            f2c538
                     throws NoSuchAlgorithmException
            f2c538
            @@ -403,10 +403,12 @@ public class SignerInfo implements ASN1Value {
            f2c538
                 /**
            f2c538
                  * Verifies that this SignerInfo contains a valid signature of the
            f2c538
                  * given message digest.  If any signed attributes are present,
            f2c538
            -     * they are also validated. The verification algorithm is as follows:
              f2c538
              -     * 

              Note that this does not verify the validity of the

              f2c538
              -     *  the certificate itself, only the signature.
              f2c538
              +     * they are also validated. The verification algorithm is as follows:
              f2c538
                    *
              f2c538
              +     * Note that this does not verify the validity of the
              f2c538
              +     * the certificate itself, only the signature.
              f2c538
              +     *
              f2c538
              +     * 
                f2c538
                      * 
              • If no signed attributes are present, the content type is
              • f2c538
                      *  verified to be data. Then it is verified that the message
                f2c538
                      *  digest passed
                f2c538
                @@ -414,24 +416,25 @@ public class SignerInfo implements ASN1Value {
                f2c538
                      *  digest in the SignerInfo.
                f2c538
                      *
                f2c538
                      * 
              • If signed attributes are present,
              • f2c538
                -     *  two particular attributes must be present: 
                  f2c538
                  +     *  two particular attributes must be present:
                  f2c538
                  +     * 
                    f2c538
                          *  
                  • PKCS #9 Content-Type, the type of content that is being signed.
                  • f2c538
                          *      This must match the contentType parameter.
                    f2c538
                          *  
                  • PKCS #9 Message-Digest, the digest of the content that is being
                  • f2c538
                          *      signed. This must match the messageDigest parameter.
                    f2c538
                          * 
                    f2c538
                    +     *
                    f2c538
                          * After these two attributes are verified to be both present and correct,
                    f2c538
                          * the encryptedDigest field of the SignerInfo is verified to be the
                    f2c538
                          * signature of the contents octets of the DER encoding of the
                    f2c538
                          * signedAttributes field.
                    f2c538
                    -     *
                    f2c538
                          * 
                    f2c538
                          *
                    f2c538
                          * @param messageDigest The hash of the content that is signed by this
                    f2c538
                          *  SignerInfo.
                    f2c538
                          * @param contentType The type of the content that is signed by this
                    f2c538
                          *  SignerInfo.
                    f2c538
                    -     * @exception NoSuchObjectException If no certificate matching the
                    f2c538
                    +     * @exception ObjectNotFoundException If no certificate matching the
                    f2c538
                          *      the issuer name and serial number can be found.
                    f2c538
                          */
                    f2c538
                         public void verify(byte[] messageDigest, OBJECT_IDENTIFIER contentType)
                    f2c538
                    diff --git a/mozilla/security/jss/org/mozilla/jss/pkix/crmf/CertReqMsg.java b/mozilla/security/jss/org/mozilla/jss/pkix/crmf/CertReqMsg.java
                    f2c538
                    index 53d162b69673caeed3e998dc9c2e221b95dfc6db..c6637039c87043f36dd1a1e449a819edbcc816e3 100644
                    f2c538
                    --- a/mozilla/security/jss/org/mozilla/jss/pkix/crmf/CertReqMsg.java
                    f2c538
                    +++ b/mozilla/security/jss/org/mozilla/jss/pkix/crmf/CertReqMsg.java
                    f2c538
                    @@ -112,7 +112,7 @@ public class CertReqMsg implements ASN1Value {
                    f2c538
                     
                    f2c538
                         /**
                    f2c538
                          * Constructs a CertReqmsg from a CertRequest and, optionally,
                    f2c538
                    -     * a pop>/i> and a regInfo.
                    f2c538
                    +     * a pop and a regInfo.
                    f2c538
                          * @param pop May be NULL.
                    f2c538
                          * @param regInfo May be NULL.
                    f2c538
                          */
                    f2c538
                    diff --git a/mozilla/security/jss/org/mozilla/jss/ssl/SSLServerSocket.java b/mozilla/security/jss/org/mozilla/jss/ssl/SSLServerSocket.java
                    f2c538
                    index 2043a598cf3e8d023287c0f7142045c1e4f68e4d..58d14496e5ad92aa91a966e119e14f470da4fd4a 100644
                    f2c538
                    --- a/mozilla/security/jss/org/mozilla/jss/ssl/SSLServerSocket.java
                    f2c538
                    +++ b/mozilla/security/jss/org/mozilla/jss/ssl/SSLServerSocket.java
                    f2c538
                    @@ -174,9 +174,6 @@ public class SSLServerSocket extends java.net.ServerSocket {
                    f2c538
                          * @return java.net.Socket Local socket for client communication
                    f2c538
                          *
                    f2c538
                          * @throws IOException  If an input or output exception occurred
                    f2c538
                    -     * @throws SocketTimeoutException  If the socket timesout trying to connect
                    f2c538
                    -     * @throws InterruptedIOException  If an input or output is interrupted
                    f2c538
                    -     * @throws SSLSocketException  JSS subclass of java.net.SocketException
                    f2c538
                          */
                    f2c538
                         public Socket accept() throws IOException {
                    f2c538
                             synchronized (acceptLock) {
                    f2c538
                    diff --git a/mozilla/security/jss/org/mozilla/jss/util/Debug_debug.jnot b/mozilla/security/jss/org/mozilla/jss/util/Debug.java
                    f2c538
                    similarity index 100%
                    f2c538
                    rename from mozilla/security/jss/org/mozilla/jss/util/Debug_debug.jnot
                    f2c538
                    rename to mozilla/security/jss/org/mozilla/jss/util/Debug.java
                    f2c538
                    -- 
                    f2c538
                    2.4.3
                    f2c538