8250246: Address reliance on default constructors in security libs

Reviewed-by: mullan
This commit is contained in:
Joe Darcy 2020-07-24 13:49:38 -07:00
parent 9b73fb125d
commit 5db58348f8
29 changed files with 170 additions and 25 deletions

View file

@ -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.
*

View file

@ -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

View file

@ -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

View file

@ -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.
*

View file

@ -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.
*

View file

@ -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 <code>SecretKey</code> object from the
* provided key specification (key material).

View file

@ -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}.
*

View file

@ -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

View file

@ -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