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

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