From f1b211bd5b07d769a267bd2a1ef76d7bc8a77c11 Mon Sep 17 00:00:00 2001 From: Elio Maldonado Date: Mon, 30 Jul 2018 15:43:47 -0700 Subject: [PATCH 1/3] Address most deprecation warnings Mostly the ones that needed @Deprecation added as it had @deprecation already --- coreconf/Linux.mk | 2 +- org/mozilla/jss/CryptoManager.java | 1 + org/mozilla/jss/crypto/Algorithm.java | 1 + .../jss/crypto/BadPaddingException.java | 1 + .../jss/crypto/EncryptionAlgorithm.java | 2 ++ org/mozilla/jss/crypto/PrivateKey.java | 1 + org/mozilla/jss/crypto/TokenCertificate.java | 1 + .../netscape/security/acl/AclEntryImpl.java | 5 ++- .../jss/netscape/security/acl/AclImpl.java | 35 ++++++++++++++++++- .../jss/netscape/security/acl/GroupImpl.java | 12 +++++-- .../jss/netscape/security/acl/OwnerImpl.java | 11 ++++-- .../jss/netscape/security/provider/DSA.java | 3 +- .../netscape/security/x509/AlgorithmId.java | 1 + .../netscape/security/x509/CertAndKeyGen.java | 2 ++ .../jss/netscape/security/x509/X509Cert.java | 1 + org/mozilla/jss/pkcs11/KeyType.java | 1 + org/mozilla/jss/pkcs11/PK11PubKey.java | 1 + org/mozilla/jss/pkix/cmc/RevokeRequest.java | 1 + org/mozilla/jss/pkix/cmmf/RevRequest.java | 2 ++ .../javax/crypto/JSSKeyGeneratorSpi.java | 1 + .../javax/crypto/JSSSecretKeyFactorySpi.java | 1 + org/mozilla/jss/ssl/SSLSecurityStatus.java | 1 + org/mozilla/jss/ssl/SSLServerSocket.java | 3 ++ org/mozilla/jss/ssl/SSLSocket.java | 5 +++ org/mozilla/jss/util/NativeErrcodes.java | 2 ++ 25 files changed, 87 insertions(+), 10 deletions(-) diff --git a/coreconf/Linux.mk b/coreconf/Linux.mk index 66d81890..fb6d05a6 100644 --- a/coreconf/Linux.mk +++ b/coreconf/Linux.mk @@ -127,7 +127,7 @@ endif # Place -ansi and *_SOURCE before $(DSO_CFLAGS) so DSO_CFLAGS can override # -ansi on platforms like Android where the system headers are C99 and do # not build with -ansi. -STANDARDS_CFLAGS = -D_POSIX_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE +STANDARDS_CFLAGS = -D_POSIX_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE OS_CFLAGS = $(STANDARDS_CFLAGS) $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -DLINUX -Dlinux -DHAVE_STRERROR OS_LIBS = $(OS_PTHREAD) -ldl -lc diff --git a/org/mozilla/jss/CryptoManager.java b/org/mozilla/jss/CryptoManager.java index 5dd6cfbc..3c7edb35 100644 --- a/org/mozilla/jss/CryptoManager.java +++ b/org/mozilla/jss/CryptoManager.java @@ -1082,6 +1082,7 @@ public final class CryptoManager implements TokenSupplier * with the given nickname. * @deprecated Use verifyCertificate() instead */ + @Deprecated public boolean isCertValid(String nickname, boolean checkSig, CertificateUsage certificateUsage) throws ObjectNotFoundException, InvalidNicknameException diff --git a/org/mozilla/jss/crypto/Algorithm.java b/org/mozilla/jss/crypto/Algorithm.java index 32730c5b..07c9cdbd 100644 --- a/org/mozilla/jss/crypto/Algorithm.java +++ b/org/mozilla/jss/crypto/Algorithm.java @@ -84,6 +84,7 @@ public class Algorithm { * @return Parameter type. * @deprecated Call getParameterClasses() instead. */ + @Deprecated public Class getParameterClass() { if( parameterClasses.length == 0) { return null; diff --git a/org/mozilla/jss/crypto/BadPaddingException.java b/org/mozilla/jss/crypto/BadPaddingException.java index 90b0f1ce..b8d8a79b 100644 --- a/org/mozilla/jss/crypto/BadPaddingException.java +++ b/org/mozilla/jss/crypto/BadPaddingException.java @@ -6,6 +6,7 @@ package org.mozilla.jss.crypto; /** * @deprecated Use javax.crypto.BadPaddingException. */ +@Deprecated public class BadPaddingException extends javax.crypto.BadPaddingException { private static final long serialVersionUID = 1L; public BadPaddingException() { diff --git a/org/mozilla/jss/crypto/EncryptionAlgorithm.java b/org/mozilla/jss/crypto/EncryptionAlgorithm.java index 1b80dd55..cac3cfdb 100644 --- a/org/mozilla/jss/crypto/EncryptionAlgorithm.java +++ b/org/mozilla/jss/crypto/EncryptionAlgorithm.java @@ -226,6 +226,7 @@ public class EncryptionAlgorithm extends Algorithm { * don't contain key length, which is necessary to distinguish between * AES algorithms. */ + @Deprecated public static EncryptionAlgorithm fromString(String name) throws NoSuchAlgorithmException { @@ -276,6 +277,7 @@ public class EncryptionAlgorithm extends Algorithm { * @return true if this algorithm performs padding. * @deprecated Call getPaddingType() instead. */ + @Deprecated public boolean isPadded() { return ! Padding.NONE.equals(padding); } diff --git a/org/mozilla/jss/crypto/PrivateKey.java b/org/mozilla/jss/crypto/PrivateKey.java index 7aff37ee..f9b21e41 100644 --- a/org/mozilla/jss/crypto/PrivateKey.java +++ b/org/mozilla/jss/crypto/PrivateKey.java @@ -37,6 +37,7 @@ public interface PrivateKey extends java.security.PrivateKey * another way, such as a function that directly matches a cert and * key. */ + @Deprecated public byte[] getUniqueID() throws TokenException; /** diff --git a/org/mozilla/jss/crypto/TokenCertificate.java b/org/mozilla/jss/crypto/TokenCertificate.java index 59763381..e64a9ef0 100644 --- a/org/mozilla/jss/crypto/TokenCertificate.java +++ b/org/mozilla/jss/crypto/TokenCertificate.java @@ -22,6 +22,7 @@ public interface TokenCertificate extends X509Certificate { * another way, such as a function that directly matches a cert and * key. */ + @Deprecated public abstract byte[] getUniqueID(); /** diff --git a/org/mozilla/jss/netscape/security/acl/AclEntryImpl.java b/org/mozilla/jss/netscape/security/acl/AclEntryImpl.java index bf7eed49..762e0352 100644 --- a/org/mozilla/jss/netscape/security/acl/AclEntryImpl.java +++ b/org/mozilla/jss/netscape/security/acl/AclEntryImpl.java @@ -138,7 +138,10 @@ public class AclEntryImpl implements AclEntry { /** * Return a string representation of the contents of the ACL entry. + * + * @deprecated Group and Permission in java.security.acl have been deprecated and marked for removal */ + @Deprecated public String toString() { StringBuffer s = new StringBuffer(); if (negative) @@ -152,7 +155,7 @@ public class AclEntryImpl implements AclEntry { s.append(user + "="); Enumeration e = permissions(); while (e.hasMoreElements()) { - Permission p = e.nextElement(); + @Deprecated Permission p = e.nextElement(); s.append(p); if (e.hasMoreElements()) s.append(","); diff --git a/org/mozilla/jss/netscape/security/acl/AclImpl.java b/org/mozilla/jss/netscape/security/acl/AclImpl.java index c5c82aa5..64c37aa6 100644 --- a/org/mozilla/jss/netscape/security/acl/AclImpl.java +++ b/org/mozilla/jss/netscape/security/acl/AclImpl.java @@ -32,7 +32,11 @@ import java.util.Vector; * An Access Control List (ACL) is encapsulated by this class. * * @author Satish Dharmaraj + * + * @deprecated Owner in java.security.acl has been deprecated and marked for removal + * */ +@Deprecated public class AclImpl extends OwnerImpl implements Acl { // // Maintain four tables. one each for positive and negative @@ -165,7 +169,9 @@ public class AclImpl extends OwnerImpl implements Acl { * * @param user the principal for which the ACL entry is returned. * @return The resulting permission set that the principal is allowed. + * @deprecated Permission in java.security.acl has been deprecated and marked for removal */ + @Deprecated public synchronized Enumeration getPermissions(Principal user) { Enumeration individualPositive; @@ -313,6 +319,10 @@ public class AclImpl extends OwnerImpl implements Acl { return v.elements(); } + /** + * @deprecated Permission in java.security.acl has been deprecated and marked for removal + */ + @Deprecated private Enumeration getGroupPositive(Principal user) { Enumeration groupPositive = zeroSet.elements(); Enumeration e = allowedGroupsTable.keys(); @@ -326,6 +336,10 @@ public class AclImpl extends OwnerImpl implements Acl { return groupPositive; } + /** + * @deprecated Permission in java.security.acl has been deprecated and marked for removal + */ + @Deprecated private Enumeration getGroupNegative(Principal user) { Enumeration groupNegative = zeroSet.elements(); Enumeration e = deniedGroupsTable.keys(); @@ -339,6 +353,10 @@ public class AclImpl extends OwnerImpl implements Acl { return groupNegative; } + /** + * @deprecated Permission in java.security.acl has been deprecated and marked for removal + */ + @Deprecated private Enumeration getIndividualPositive(Principal user) { Enumeration individualPositive = zeroSet.elements(); AclEntry ae = allowedUsersTable.get(user); @@ -347,6 +365,10 @@ public class AclImpl extends OwnerImpl implements Acl { return individualPositive; } + /** + * @deprecated Permission in java.security.acl has been deprecated and marked for removal + */ + @Deprecated private Enumeration getIndividualNegative(Principal user) { Enumeration individualNegative = zeroSet.elements(); AclEntry ae = deniedUsersTable.get(user); @@ -356,10 +378,21 @@ public class AclImpl extends OwnerImpl implements Acl { } } +/** + * + * @deprecated Acl in java.security.acl has been deprecated and marked for removal + * @deprecated AclEntry in java.security.acl has been deprecated and marked for removal + */ +@Deprecated final class AclEnumerator implements Enumeration { - Acl acl; + @Deprecated Acl acl; Enumeration u1, u2, g1, g2; + /** + * @deprecated AclEntry in java.security.acl has been deprecated and marked for removal + * @deprecated Acl in java.security.acl has been deprecated and marked for removal + */ + @Deprecated AclEnumerator(Acl acl, Hashtable u1, Hashtable g1, Hashtable u2, Hashtable g2) { this.acl = acl; diff --git a/org/mozilla/jss/netscape/security/acl/GroupImpl.java b/org/mozilla/jss/netscape/security/acl/GroupImpl.java index f602c3fd..4387d0a5 100644 --- a/org/mozilla/jss/netscape/security/acl/GroupImpl.java +++ b/org/mozilla/jss/netscape/security/acl/GroupImpl.java @@ -26,7 +26,9 @@ import java.util.Vector; * This class implements a group of principals. * * @author Satish Dharmaraj + * @deprecated Group in java.security.acl has been deprecated and marked for removal */ +@Deprecated public class GroupImpl implements Group { private Vector groupMembers = new Vector(50, 100); private String group; @@ -107,7 +109,9 @@ public class GroupImpl implements Group { * @param member The principal whose membership must be checked for. * @return true if the principal is a member of this group, * false otherwise + * @deprecated Group in java.security.acl has been deprecated and marked for removal */ + @Deprecated public boolean isMember(Principal member) { // @@ -136,6 +140,10 @@ public class GroupImpl implements Group { // a vector of already seen groups. Only new groups are considered, // thereby avoiding loops. // + /** + * @deprecated Group in java.security.acl has been deprecated and marked for removal + */ + @Deprecated boolean isMemberRecurse(Principal member, Vector alreadySeen) { Enumeration e = members(); while (e.hasMoreElements()) { @@ -155,12 +163,12 @@ public class GroupImpl implements Group { // case rather than clutter the interface by forcing the // implementation of this method.) // - GroupImpl g = (GroupImpl) p; + @Deprecated GroupImpl g = (GroupImpl) p; alreadySeen.addElement(this); if (!alreadySeen.contains(g)) mem = g.isMemberRecurse(member, alreadySeen); } else if (p instanceof Group) { - Group g = (Group) p; + @Deprecated Group g = (Group) p; if (!alreadySeen.contains(g)) mem = g.isMember(member); } diff --git a/org/mozilla/jss/netscape/security/acl/OwnerImpl.java b/org/mozilla/jss/netscape/security/acl/OwnerImpl.java index 11055837..6548951c 100644 --- a/org/mozilla/jss/netscape/security/acl/OwnerImpl.java +++ b/org/mozilla/jss/netscape/security/acl/OwnerImpl.java @@ -30,9 +30,11 @@ import java.util.Enumeration; * part of the constructor. * * @author Satish Dharmaraj + * @deprecated Owner in java.security.acl has been deprecated and marked for removal */ +@Deprecated public class OwnerImpl implements Owner { - private Group ownerGroup; + @Deprecated private Group ownerGroup; public OwnerImpl(Principal owner) { ownerGroup = new GroupImpl("AclOwners"); @@ -51,7 +53,9 @@ public class OwnerImpl implements Owner { * @return true if success, false if already an owner. * @exception NotOwnerException if the caller principal is not on * the owners list of the Acl. + * @deprecated LastOwnerException in java.security.acl has been deprecated and marked for removal */ + @Deprecated public synchronized boolean addOwner(Principal caller, Principal owner) throws NotOwnerException { if (!isOwner(caller)) @@ -75,7 +79,9 @@ public class OwnerImpl implements Owner { * the owners list of the Acl. * @exception LastOwnerException if there is only one owner left in the group, then * deleteOwner would leave the ACL owner-less. This exception is raised in such a case. + * @deprecated LastOwnerException in java.security.acl has been deprecated and marked for removal */ + @Deprecated public synchronized boolean deleteOwner(Principal caller, Principal owner) throws NotOwnerException, LastOwnerException { if (!isOwner(caller)) @@ -89,8 +95,7 @@ public class OwnerImpl implements Owner { if (e.hasMoreElements()) return ownerGroup.removeMember(owner); else - throw new LastOwnerException(); - + throw new LastOwnerException(); } /** diff --git a/org/mozilla/jss/netscape/security/provider/DSA.java b/org/mozilla/jss/netscape/security/provider/DSA.java index e7f155ea..403f2ef9 100644 --- a/org/mozilla/jss/netscape/security/provider/DSA.java +++ b/org/mozilla/jss/netscape/security/provider/DSA.java @@ -437,6 +437,7 @@ public final class DSA extends Signature { * * @deprecated */ + @Deprecated protected void engineSetParameter(String key, Object param) { if (key.equals("KSEED")) { @@ -469,8 +470,6 @@ public final class DSA extends Signature { * * * @return the value of the requested parameter. - * - * @deprecated */ protected Object engineGetParameter(String key) { if (key.equals("KSEED")) { diff --git a/org/mozilla/jss/netscape/security/x509/AlgorithmId.java b/org/mozilla/jss/netscape/security/x509/AlgorithmId.java index 5ea7f5e5..f97c63e9 100644 --- a/org/mozilla/jss/netscape/security/x509/AlgorithmId.java +++ b/org/mozilla/jss/netscape/security/x509/AlgorithmId.java @@ -190,6 +190,7 @@ public class AlgorithmId implements Serializable, DerEncoder { * * @deprecated use one of the other constructors. */ + @Deprecated public AlgorithmId() { } diff --git a/org/mozilla/jss/netscape/security/x509/CertAndKeyGen.java b/org/mozilla/jss/netscape/security/x509/CertAndKeyGen.java index 626bb796..aca271ff 100644 --- a/org/mozilla/jss/netscape/security/x509/CertAndKeyGen.java +++ b/org/mozilla/jss/netscape/security/x509/CertAndKeyGen.java @@ -86,6 +86,7 @@ public final class CertAndKeyGen { * * @deprecated All random numbers come from PKCS #11 now. */ + @Deprecated public void setRandom(SecureRandom generator) { } @@ -166,6 +167,7 @@ public final class CertAndKeyGen { * @param myname X.500 name of the subject (who is also the issuer) * @param validity how long the certificate should be valid, in seconds */ + @Deprecated public X509Cert getSelfCert(X500Name myname, long validity) throws InvalidKeyException, SignatureException, NoSuchAlgorithmException { X509Certificate cert; diff --git a/org/mozilla/jss/netscape/security/x509/X509Cert.java b/org/mozilla/jss/netscape/security/x509/X509Cert.java index c3f51492..60f1d3a6 100644 --- a/org/mozilla/jss/netscape/security/x509/X509Cert.java +++ b/org/mozilla/jss/netscape/security/x509/X509Cert.java @@ -46,6 +46,7 @@ import org.mozilla.jss.netscape.security.util.DerValue; * @deprecated Use the new X509Certificate class. * This class is only restored for backwards compatibility. */ +@Deprecated public class X509Cert implements Certificate, Serializable { /** diff --git a/org/mozilla/jss/pkcs11/KeyType.java b/org/mozilla/jss/pkcs11/KeyType.java index 31fb4957..19ba3d0f 100644 --- a/org/mozilla/jss/pkcs11/KeyType.java +++ b/org/mozilla/jss/pkcs11/KeyType.java @@ -151,6 +151,7 @@ public final class KeyType { * @deprecated As of NSS 3.11, FORTEZZA is no longer supported. * This is just a placeholder for backward compatibility. */ + @Deprecated static public final KeyType FORTEZZA = new KeyType(new Algorithm[0], "FORTEZZA"); diff --git a/org/mozilla/jss/pkcs11/PK11PubKey.java b/org/mozilla/jss/pkcs11/PK11PubKey.java index 39e24120..9d82011d 100644 --- a/org/mozilla/jss/pkcs11/PK11PubKey.java +++ b/org/mozilla/jss/pkcs11/PK11PubKey.java @@ -45,6 +45,7 @@ public class PK11PubKey extends org.mozilla.jss.pkcs11.PK11Key * fromSPKI() instead. * @see #fromSPKI(byte[]) */ + @Deprecated public static PK11PubKey fromRaw(PrivateKey.Type type, byte[] rawKey) throws InvalidKeyFormatException { diff --git a/org/mozilla/jss/pkix/cmc/RevokeRequest.java b/org/mozilla/jss/pkix/cmc/RevokeRequest.java index e5f4962a..012a263f 100644 --- a/org/mozilla/jss/pkix/cmc/RevokeRequest.java +++ b/org/mozilla/jss/pkix/cmc/RevokeRequest.java @@ -218,6 +218,7 @@ public class RevokeRequest implements ASN1Value { * @param comment The comment field. This field is optional, * so null may be used. */ + @Deprecated public RevokeRequest(ANY issuerName, INTEGER serialNumber, ENUMERATED reason, OCTET_STRING passphrase, UTF8String comment) diff --git a/org/mozilla/jss/pkix/cmmf/RevRequest.java b/org/mozilla/jss/pkix/cmmf/RevRequest.java index c9166a10..a4393da5 100644 --- a/org/mozilla/jss/pkix/cmmf/RevRequest.java +++ b/org/mozilla/jss/pkix/cmmf/RevRequest.java @@ -154,6 +154,7 @@ public class RevRequest implements ASN1Value { * @deprecated The passphrase field has been renamed * sharedSecret. Call getSharedSecret instead. */ + @Deprecated public OCTET_STRING getPassphrase() { return sharedSecret; } @@ -194,6 +195,7 @@ public class RevRequest implements ASN1Value { * @param comment The comment field. This field is optional, * so null may be used. */ + @Deprecated public RevRequest(ANY issuerName, INTEGER serialNumber, ENUMERATED reason, OCTET_STRING sharedSecret, UTF8String comment) diff --git a/org/mozilla/jss/provider/javax/crypto/JSSKeyGeneratorSpi.java b/org/mozilla/jss/provider/javax/crypto/JSSKeyGeneratorSpi.java index b6a8caee..9b7d5e00 100644 --- a/org/mozilla/jss/provider/javax/crypto/JSSKeyGeneratorSpi.java +++ b/org/mozilla/jss/provider/javax/crypto/JSSKeyGeneratorSpi.java @@ -105,6 +105,7 @@ class JSSKeyGeneratorSpi extends javax.crypto.KeyGeneratorSpi { * is used for generating Password-Based Authentication keys * for use with HmacSHA1. Use PBAHmacSHA1 instead. */ + @Deprecated public static class HmacSHA1 extends JSSKeyGeneratorSpi { public HmacSHA1() { super(KeyGenAlgorithm.PBA_SHA1_HMAC); diff --git a/org/mozilla/jss/provider/javax/crypto/JSSSecretKeyFactorySpi.java b/org/mozilla/jss/provider/javax/crypto/JSSSecretKeyFactorySpi.java index 76bd3604..ab53eeae 100644 --- a/org/mozilla/jss/provider/javax/crypto/JSSSecretKeyFactorySpi.java +++ b/org/mozilla/jss/provider/javax/crypto/JSSSecretKeyFactorySpi.java @@ -403,6 +403,7 @@ class JSSSecretKeyFactorySpi extends SecretKeyFactorySpi { * is used for generating Password-Based Authentication keys * for use with HmacSHA1. Use PBAHmacSHA1 instead. */ + @Deprecated public static class HmacSHA1 extends JSSSecretKeyFactorySpi { public HmacSHA1() { super(KeyGenAlgorithm.PBA_SHA1_HMAC); diff --git a/org/mozilla/jss/ssl/SSLSecurityStatus.java b/org/mozilla/jss/ssl/SSLSecurityStatus.java index b122fddd..b8267fbb 100644 --- a/org/mozilla/jss/ssl/SSLSecurityStatus.java +++ b/org/mozilla/jss/ssl/SSLSecurityStatus.java @@ -28,6 +28,7 @@ public class SSLSecurityStatus { * @deprecated As of NSS 3.11, FORTEZZA is no longer supported. * STATUS_FORTEZZA is a placeholder for backward compatibility. */ + @Deprecated final public int STATUS_FORTEZZA = 3; /** diff --git a/org/mozilla/jss/ssl/SSLServerSocket.java b/org/mozilla/jss/ssl/SSLServerSocket.java index a17d7906..4f921860 100644 --- a/org/mozilla/jss/ssl/SSLServerSocket.java +++ b/org/mozilla/jss/ssl/SSLServerSocket.java @@ -303,6 +303,7 @@ public class SSLServerSocket extends java.net.ServerSocket { * @deprecated As of JSS 3.0. This method is misnamed. Use * requestClientAuth instead. */ + @Deprecated public void setNeedClientAuth(boolean b) throws SocketException { base.requestClientAuth(b); } @@ -324,6 +325,7 @@ public class SSLServerSocket extends java.net.ServerSocket { * @deprecated As of JSS 3.0. This method is misnamed. Use * requestClientAuthNoExpiryCheck instead. */ + @Deprecated public void setNeedClientAuthNoExpiryCheck(boolean b) throws SocketException { @@ -477,6 +479,7 @@ public class SSLServerSocket extends java.net.ServerSocket { * it. * @deprecated use requireClientAuth(int) */ + @Deprecated public void requireClientAuth(boolean require, boolean onRedo) throws SocketException { diff --git a/org/mozilla/jss/ssl/SSLSocket.java b/org/mozilla/jss/ssl/SSLSocket.java index e104d3cd..8ca3ea77 100644 --- a/org/mozilla/jss/ssl/SSLSocket.java +++ b/org/mozilla/jss/ssl/SSLSocket.java @@ -480,6 +480,7 @@ public class SSLSocket extends java.net.Socket { * @deprecated As of JSS 3.0. The stream parameter is ignored, because * only stream sockets are supported. */ + @Deprecated public SSLSocket(InetAddress address, int port, InetAddress localAddr, int localPort, boolean stream, SSLCertificateApprovalCallback certApprovalCallback, @@ -1168,6 +1169,7 @@ public class SSLSocket extends java.net.Socket { * it. * @deprecated use requireClientAuth(int) */ + @Deprecated public void requireClientAuth(boolean require, boolean onRedo) throws SocketException { @@ -1203,6 +1205,7 @@ public class SSLSocket extends java.net.Socket { * All subsequently created sockets will use this default setting. * @deprecated use requireClientAuthDefault(int) */ + @Deprecated public void requireClientAuthDefault(boolean require, boolean onRedo) throws SocketException { @@ -1311,6 +1314,7 @@ public class SSLSocket extends java.net.Socket { * @deprecated As of JSS 3.0. This method is misnamed. Use * requestClientAuth instead. */ + @Deprecated public void setNeedClientAuth(boolean b) throws SocketException { base.requestClientAuth(b); } @@ -1332,6 +1336,7 @@ public class SSLSocket extends java.net.Socket { * @deprecated As of JSS 3.0. This method is misnamed. Use * requestClientAuthNoExpiryCheck instead. */ + @Deprecated public void setNeedClientAuthNoExpiryCheck(boolean b) throws SocketException { diff --git a/org/mozilla/jss/util/NativeErrcodes.java b/org/mozilla/jss/util/NativeErrcodes.java index cfee0225..36e3bf03 100644 --- a/org/mozilla/jss/util/NativeErrcodes.java +++ b/org/mozilla/jss/util/NativeErrcodes.java @@ -111,6 +111,7 @@ public class NativeErrcodes { * SSL_ERROR_FORTEZZA_PQG is a placeholder for backward * compatibility. */ + @Deprecated public static final int SSL_ERROR_FORTEZZA_PQG = 97; public static final int SSL_ERROR_UNKNOWN_CIPHER_SUITE = 98; public static final int SSL_ERROR_NO_CIPHERS_SUPPORTED = 99; @@ -310,6 +311,7 @@ public class NativeErrcodes { * SEC_ERROR_NOT_FORTEZZA_ISSUER is a placeholder for backward * compatibility. */ + @Deprecated public static final int SEC_ERROR_NOT_FORTEZZA_ISSUER = 283; public static final int SEC_ERROR_CANNOT_MOVE_SENSITIVE_KEY = 284; public static final int SEC_ERROR_JS_INVALID_MODULE_NAME = 285; -- 2.18.0