From 5db58348f8466a71508d66d8d144f3fde22dce94 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Fri, 24 Jul 2020 13:49:38 -0700 Subject: [PATCH] 8250246: Address reliance on default constructors in security libs Reviewed-by: mullan --- .../java/security/AlgorithmParameterGeneratorSpi.java | 7 ++++++- .../classes/java/security/AlgorithmParametersSpi.java | 7 ++++++- .../share/classes/java/security/KeyFactorySpi.java | 5 +++++ .../share/classes/java/security/KeyPairGeneratorSpi.java | 7 ++++++- src/java.base/share/classes/java/security/KeyStoreSpi.java | 7 ++++++- .../share/classes/java/security/MessageDigestSpi.java | 7 ++++++- .../share/classes/java/security/PermissionCollection.java | 7 ++++++- src/java.base/share/classes/java/security/Policy.java | 7 ++++++- src/java.base/share/classes/java/security/PolicySpi.java | 7 ++++++- .../share/classes/java/security/SignatureSpi.java | 5 +++++ .../classes/java/security/cert/CertificateFactorySpi.java | 7 ++++++- .../share/classes/java/security/cert/X509CRLEntry.java | 7 ++++++- src/java.base/share/classes/javax/crypto/CipherSpi.java | 7 ++++++- .../share/classes/javax/crypto/ExemptionMechanismSpi.java | 7 ++++++- .../share/classes/javax/crypto/KeyAgreementSpi.java | 7 ++++++- .../share/classes/javax/crypto/KeyGeneratorSpi.java | 7 ++++++- src/java.base/share/classes/javax/crypto/MacSpi.java | 7 ++++++- .../share/classes/javax/crypto/SecretKeyFactorySpi.java | 7 ++++++- .../javax/security/auth/login/ConfigurationSpi.java | 7 ++++++- .../share/classes/javax/security/cert/Certificate.java | 7 ++++++- .../share/classes/javax/security/cert/X509Certificate.java | 5 +++++ .../share/classes/org/ietf/jgss/GSSManager.java | 7 ++++++- .../com/sun/security/auth/module/JndiLoginModule.java | 7 ++++++- .../com/sun/security/auth/module/KeyStoreLoginModule.java | 7 ++++++- .../com/sun/security/auth/module/Krb5LoginModule.java | 5 +++++ .../com/sun/security/auth/module/LdapLoginModule.java | 7 ++++++- .../com/sun/security/auth/module/NTLoginModule.java | 7 ++++++- .../com/sun/security/auth/module/UnixLoginModule.java | 7 ++++++- .../share/classes/com/sun/security/jgss/GSSUtil.java | 7 ++++++- 29 files changed, 170 insertions(+), 25 deletions(-) diff --git a/src/java.base/share/classes/java/security/AlgorithmParameterGeneratorSpi.java b/src/java.base/share/classes/java/security/AlgorithmParameterGeneratorSpi.java index 27ed5ff189d..fe83aabbba9 100644 --- a/src/java.base/share/classes/java/security/AlgorithmParameterGeneratorSpi.java +++ b/src/java.base/share/classes/java/security/AlgorithmParameterGeneratorSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -60,6 +60,11 @@ import java.security.spec.AlgorithmParameterSpec; public abstract class AlgorithmParameterGeneratorSpi { + /** + * Constructor for subclasses to call. + */ + public AlgorithmParameterGeneratorSpi() {} + /** * Initializes this parameter generator for a certain size * and source of randomness. diff --git a/src/java.base/share/classes/java/security/AlgorithmParametersSpi.java b/src/java.base/share/classes/java/security/AlgorithmParametersSpi.java index b47f4094d76..c6628df2156 100644 --- a/src/java.base/share/classes/java/security/AlgorithmParametersSpi.java +++ b/src/java.base/share/classes/java/security/AlgorithmParametersSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,6 +50,11 @@ import java.security.spec.InvalidParameterSpecException; public abstract class AlgorithmParametersSpi { + /** + * Constructor for subclasses to call. + */ + public AlgorithmParametersSpi() {} + /** * Initializes this parameters object using the parameters * specified in {@code paramSpec}. diff --git a/src/java.base/share/classes/java/security/KeyFactorySpi.java b/src/java.base/share/classes/java/security/KeyFactorySpi.java index cea5f165144..6cb4b8d5639 100644 --- a/src/java.base/share/classes/java/security/KeyFactorySpi.java +++ b/src/java.base/share/classes/java/security/KeyFactorySpi.java @@ -69,6 +69,11 @@ import java.security.spec.InvalidKeySpecException; public abstract class KeyFactorySpi { + /** + * Constructor for subclasses to call. + */ + public KeyFactorySpi() {} + /** * Generates a public key object from the provided key * specification (key material). diff --git a/src/java.base/share/classes/java/security/KeyPairGeneratorSpi.java b/src/java.base/share/classes/java/security/KeyPairGeneratorSpi.java index aad8d01fc9d..38aec1b745d 100644 --- a/src/java.base/share/classes/java/security/KeyPairGeneratorSpi.java +++ b/src/java.base/share/classes/java/security/KeyPairGeneratorSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -58,6 +58,11 @@ import java.security.spec.AlgorithmParameterSpec; public abstract class KeyPairGeneratorSpi { + /** + * Constructor for subclasses to call. + */ + public KeyPairGeneratorSpi() {} + /** * Initializes the key pair generator for a certain keysize, using * the default parameter set. diff --git a/src/java.base/share/classes/java/security/KeyStoreSpi.java b/src/java.base/share/classes/java/security/KeyStoreSpi.java index a0451bf64ac..ad43caa27b7 100644 --- a/src/java.base/share/classes/java/security/KeyStoreSpi.java +++ b/src/java.base/share/classes/java/security/KeyStoreSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -53,6 +53,11 @@ import javax.security.auth.callback.*; public abstract class KeyStoreSpi { + /** + * Constructor for subclasses to call. + */ + public KeyStoreSpi() {} + /** * Returns the key associated with the given alias, using the given * password to recover it. The key must have been associated with diff --git a/src/java.base/share/classes/java/security/MessageDigestSpi.java b/src/java.base/share/classes/java/security/MessageDigestSpi.java index 59088f173d9..17bd34e507c 100644 --- a/src/java.base/share/classes/java/security/MessageDigestSpi.java +++ b/src/java.base/share/classes/java/security/MessageDigestSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -54,6 +54,11 @@ public abstract class MessageDigestSpi { // for re-use in engineUpdate(ByteBuffer input) private byte[] tempArray; + /** + * Constructor for subclasses to call. + */ + public MessageDigestSpi() {} + /** * Returns the digest length in bytes. * diff --git a/src/java.base/share/classes/java/security/PermissionCollection.java b/src/java.base/share/classes/java/security/PermissionCollection.java index 79eb825ac60..c11fb2afe1c 100644 --- a/src/java.base/share/classes/java/security/PermissionCollection.java +++ b/src/java.base/share/classes/java/security/PermissionCollection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -102,6 +102,11 @@ public abstract class PermissionCollection implements java.io.Serializable { // when set, add will throw an exception. private volatile boolean readOnly; + /** + * Constructor for subclasses to call. + */ + public PermissionCollection() {} + /** * Adds a permission object to the current collection of permission objects. * diff --git a/src/java.base/share/classes/java/security/Policy.java b/src/java.base/share/classes/java/security/Policy.java index c1194851575..27f6696fe60 100644 --- a/src/java.base/share/classes/java/security/Policy.java +++ b/src/java.base/share/classes/java/security/Policy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -87,6 +87,11 @@ import sun.security.util.SecurityConstants; public abstract class Policy { + /** + * Constructor for subclasses to call. + */ + public Policy() {} + /** * A read-only empty PermissionCollection instance. * @since 1.6 diff --git a/src/java.base/share/classes/java/security/PolicySpi.java b/src/java.base/share/classes/java/security/PolicySpi.java index 608ce1fa777..b4d759fe8b9 100644 --- a/src/java.base/share/classes/java/security/PolicySpi.java +++ b/src/java.base/share/classes/java/security/PolicySpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,6 +44,11 @@ package java.security; public abstract class PolicySpi { + /** + * Constructor for subclasses to call. + */ + public PolicySpi() {} + /** * Check whether the policy has granted a Permission to a ProtectionDomain. * diff --git a/src/java.base/share/classes/java/security/SignatureSpi.java b/src/java.base/share/classes/java/security/SignatureSpi.java index 396ac0ee885..7c3c015109a 100644 --- a/src/java.base/share/classes/java/security/SignatureSpi.java +++ b/src/java.base/share/classes/java/security/SignatureSpi.java @@ -52,6 +52,11 @@ import sun.security.jca.JCAUtil; public abstract class SignatureSpi { + /** + * Constructor for subclasses to call. + */ + public SignatureSpi() {} + /** * Application-specified source of randomness. */ diff --git a/src/java.base/share/classes/java/security/cert/CertificateFactorySpi.java b/src/java.base/share/classes/java/security/cert/CertificateFactorySpi.java index 36bdfc14f6a..32d4156a4be 100644 --- a/src/java.base/share/classes/java/security/cert/CertificateFactorySpi.java +++ b/src/java.base/share/classes/java/security/cert/CertificateFactorySpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -65,6 +65,11 @@ import java.security.NoSuchProviderException; public abstract class CertificateFactorySpi { + /** + * Constructor for subclasses to call. + */ + public CertificateFactorySpi() {} + /** * Generates a certificate object and initializes it with * the data read from the input stream {@code inStream}. diff --git a/src/java.base/share/classes/java/security/cert/X509CRLEntry.java b/src/java.base/share/classes/java/security/cert/X509CRLEntry.java index 72dc9c64e02..a02e414c429 100644 --- a/src/java.base/share/classes/java/security/cert/X509CRLEntry.java +++ b/src/java.base/share/classes/java/security/cert/X509CRLEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -67,6 +67,11 @@ import sun.security.x509.X509CRLEntryImpl; public abstract class X509CRLEntry implements X509Extension { + /** + * Constructor for subclasses to call. + */ + public X509CRLEntry() {} + /** * Compares this CRL entry for equality with the given * object. If the {@code other} object is an diff --git a/src/java.base/share/classes/javax/crypto/CipherSpi.java b/src/java.base/share/classes/javax/crypto/CipherSpi.java index fcb0ae62b3f..cd05d230dbc 100644 --- a/src/java.base/share/classes/javax/crypto/CipherSpi.java +++ b/src/java.base/share/classes/javax/crypto/CipherSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -229,6 +229,11 @@ import java.nio.ByteBuffer; public abstract class CipherSpi { + /** + * Constructor for subclasses to call. + */ + public CipherSpi() {} + /** * Sets the mode of this cipher. * diff --git a/src/java.base/share/classes/javax/crypto/ExemptionMechanismSpi.java b/src/java.base/share/classes/javax/crypto/ExemptionMechanismSpi.java index 9a6d52466f4..2aa59f6c6de 100644 --- a/src/java.base/share/classes/javax/crypto/ExemptionMechanismSpi.java +++ b/src/java.base/share/classes/javax/crypto/ExemptionMechanismSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,6 +45,11 @@ import java.security.spec.AlgorithmParameterSpec; public abstract class ExemptionMechanismSpi { + /** + * Constructor for subclasses to call. + */ + public ExemptionMechanismSpi() {} + /** * Returns the length in bytes that an output buffer would need to be in * order to hold the result of the next diff --git a/src/java.base/share/classes/javax/crypto/KeyAgreementSpi.java b/src/java.base/share/classes/javax/crypto/KeyAgreementSpi.java index db8c05b379a..895df51955c 100644 --- a/src/java.base/share/classes/javax/crypto/KeyAgreementSpi.java +++ b/src/java.base/share/classes/javax/crypto/KeyAgreementSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -62,6 +62,11 @@ import java.security.spec.*; public abstract class KeyAgreementSpi { + /** + * Constructor for subclasses to call. + */ + public KeyAgreementSpi() {} + /** * Initializes this key agreement with the given key and source of * randomness. The given key is required to contain all the algorithm diff --git a/src/java.base/share/classes/javax/crypto/KeyGeneratorSpi.java b/src/java.base/share/classes/javax/crypto/KeyGeneratorSpi.java index ea084d5807a..c5989e4cc0f 100644 --- a/src/java.base/share/classes/javax/crypto/KeyGeneratorSpi.java +++ b/src/java.base/share/classes/javax/crypto/KeyGeneratorSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -55,6 +55,11 @@ import java.security.spec.*; public abstract class KeyGeneratorSpi { + /** + * Constructor for subclasses to call. + */ + public KeyGeneratorSpi() {} + /** * Initializes the key generator. * diff --git a/src/java.base/share/classes/javax/crypto/MacSpi.java b/src/java.base/share/classes/javax/crypto/MacSpi.java index 63aef7865e6..671a7993402 100644 --- a/src/java.base/share/classes/javax/crypto/MacSpi.java +++ b/src/java.base/share/classes/javax/crypto/MacSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -46,6 +46,11 @@ import java.nio.ByteBuffer; public abstract class MacSpi { + /** + * Constructor for subclasses to call. + */ + public MacSpi() {} + /** * Returns the length of the MAC in bytes. * diff --git a/src/java.base/share/classes/javax/crypto/SecretKeyFactorySpi.java b/src/java.base/share/classes/javax/crypto/SecretKeyFactorySpi.java index 342a5c7ffbd..80750de2aa8 100644 --- a/src/java.base/share/classes/javax/crypto/SecretKeyFactorySpi.java +++ b/src/java.base/share/classes/javax/crypto/SecretKeyFactorySpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -53,6 +53,11 @@ import java.security.spec.*; public abstract class SecretKeyFactorySpi { + /** + * Constructor for subclasses to call. + */ + public SecretKeyFactorySpi() {} + /** * Generates a SecretKey object from the * provided key specification (key material). diff --git a/src/java.base/share/classes/javax/security/auth/login/ConfigurationSpi.java b/src/java.base/share/classes/javax/security/auth/login/ConfigurationSpi.java index c63b0efd75b..071b5876a1d 100644 --- a/src/java.base/share/classes/javax/security/auth/login/ConfigurationSpi.java +++ b/src/java.base/share/classes/javax/security/auth/login/ConfigurationSpi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,6 +43,11 @@ package javax.security.auth.login; */ public abstract class ConfigurationSpi { + /** + * Constructor for subclasses to call. + */ + public ConfigurationSpi() {} + /** * Retrieve the AppConfigurationEntries for the specified {@code name}. * diff --git a/src/java.base/share/classes/javax/security/cert/Certificate.java b/src/java.base/share/classes/javax/security/cert/Certificate.java index 78d2d43f6aa..602d6b7fd2b 100644 --- a/src/java.base/share/classes/javax/security/cert/Certificate.java +++ b/src/java.base/share/classes/javax/security/cert/Certificate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -65,6 +65,11 @@ import java.security.SignatureException; @Deprecated(since="9", forRemoval=true) public abstract class Certificate { + /** + * Constructor for subclasses to call. + */ + public Certificate() {} + /** * Compares this certificate for equality with the specified * object. If the {@code other} object is an diff --git a/src/java.base/share/classes/javax/security/cert/X509Certificate.java b/src/java.base/share/classes/javax/security/cert/X509Certificate.java index 3973e2daa0c..d07e497d5b5 100644 --- a/src/java.base/share/classes/javax/security/cert/X509Certificate.java +++ b/src/java.base/share/classes/javax/security/cert/X509Certificate.java @@ -130,6 +130,11 @@ import java.util.Date; @Deprecated(since="9", forRemoval=true) public abstract class X509Certificate extends Certificate { + /** + * Constructor for subclasses to call. + */ + public X509Certificate() {} + /** * Constant to lookup in the Security properties file. * In the Security properties file the default implementation diff --git a/src/java.security.jgss/share/classes/org/ietf/jgss/GSSManager.java b/src/java.security.jgss/share/classes/org/ietf/jgss/GSSManager.java index f9ae3efafee..8819daaf25b 100644 --- a/src/java.security.jgss/share/classes/org/ietf/jgss/GSSManager.java +++ b/src/java.security.jgss/share/classes/org/ietf/jgss/GSSManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -138,6 +138,11 @@ import java.security.Provider; */ public abstract class GSSManager { + /** + * Constructor for subclasses to call. + */ + public GSSManager() {} + /** * Returns the default GSSManager implementation. * diff --git a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/JndiLoginModule.java b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/JndiLoginModule.java index 349409c579d..613ed2f4dc0 100644 --- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/JndiLoginModule.java +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/JndiLoginModule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -195,6 +195,11 @@ public class JndiLoginModule implements LoginModule { private static final String NAME = "javax.security.auth.login.name"; private static final String PWD = "javax.security.auth.login.password"; + /** + * Creates a {@code JndiLoginModule}. + */ + public JndiLoginModule() {} + /** * Initialize this {@code LoginModule}. * diff --git a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java index 625739c1b52..6e67b5abc62 100644 --- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -162,6 +162,11 @@ public class KeyStoreLoginModule implements LoginModule { private boolean token = false; private boolean protectedPath = false; + /** + * Creates a {@code KeyStoreLoginModule}. + */ + public KeyStoreLoginModule() {} + /* -- Methods -- */ /** diff --git a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/Krb5LoginModule.java b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/Krb5LoginModule.java index 82e37c64b8e..2e42e73fff4 100644 --- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/Krb5LoginModule.java +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/Krb5LoginModule.java @@ -419,6 +419,11 @@ public class Krb5LoginModule implements LoginModule { private static final String NAME = "javax.security.auth.login.name"; private static final String PWD = "javax.security.auth.login.password"; + /** + * Creates a {@code Krb5LoginModule}. + */ + public Krb5LoginModule() {} + /** * Initialize this {@code LoginModule}. * diff --git a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/LdapLoginModule.java b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/LdapLoginModule.java index 8d3ba689dbb..60dbb1d56fd 100644 --- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/LdapLoginModule.java +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/LdapLoginModule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -355,6 +355,11 @@ public class LdapLoginModule implements LoginModule { private Hashtable ldapEnvironment; private SearchControls constraints = null; + /** + * Creates an {@code LdapLoginModule}. + */ + public LdapLoginModule() {} + /** * Initialize this {@code LoginModule}. * diff --git a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTLoginModule.java b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTLoginModule.java index c251d54eb58..111703459b4 100644 --- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTLoginModule.java +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTLoginModule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -83,6 +83,11 @@ public class NTLoginModule implements LoginModule { private NTSidGroupPrincipal[] groups; // supplementary groups private NTNumericCredential iToken; // impersonation token + /** + * Creates an {@code NTLoginModule}. + */ + public NTLoginModule() {} + /** * Initialize this {@code LoginModule}. * diff --git a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixLoginModule.java b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixLoginModule.java index a2acf7a9742..404e974936c 100644 --- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixLoginModule.java +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixLoginModule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -72,6 +72,11 @@ public class UnixLoginModule implements LoginModule { private LinkedList supplementaryGroups = new LinkedList<>(); + /** + * Creates a {@code UnixLoginModule}. + */ + public UnixLoginModule() {} + /** * Initialize this {@code LoginModule}. * diff --git a/src/jdk.security.jgss/share/classes/com/sun/security/jgss/GSSUtil.java b/src/jdk.security.jgss/share/classes/com/sun/security/jgss/GSSUtil.java index e1f63c28ab5..0669596800d 100644 --- a/src/jdk.security.jgss/share/classes/com/sun/security/jgss/GSSUtil.java +++ b/src/jdk.security.jgss/share/classes/com/sun/security/jgss/GSSUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,6 +34,11 @@ import org.ietf.jgss.GSSCredential; * implementation of Java GSS-API. */ public class GSSUtil { + /** + * Do not call. + */ + @Deprecated(since="16", forRemoval=true) + public GSSUtil() {} /** * Use this method to convert a GSSName and GSSCredential into a