mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-14 00:49:42 +00:00
8066638: Suppress deprecation warnings in jdk.crypto module
8066641: Suppress deprecation warnings in jdk.naming module Reviewed-by: wetmore, xuelei, valeriep, lancea
This commit is contained in:
parent
9fa1d1239b
commit
c278cc80e9
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, 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
|
||||
@ -445,6 +445,7 @@ abstract class P11Key implements Key, Length {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static class P11TlsMasterSecretKey extends P11SecretKey
|
||||
implements TlsMasterSecret {
|
||||
private static final long serialVersionUID = -1318560923770573441L;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, 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
|
||||
@ -169,6 +169,7 @@ final class P11RSACipher extends CipherSpi {
|
||||
}
|
||||
|
||||
// see JCE spec
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void engineInit(int opmode, Key key,
|
||||
AlgorithmParameterSpec params, SecureRandom random)
|
||||
throws InvalidKeyException, InvalidAlgorithmParameterException {
|
||||
@ -461,6 +462,7 @@ final class P11RSACipher extends CipherSpi {
|
||||
}
|
||||
|
||||
// see JCE spec
|
||||
@SuppressWarnings("deprecation")
|
||||
protected Key engineUnwrap(byte[] wrappedKey, String algorithm,
|
||||
int type) throws InvalidKeyException, NoSuchAlgorithmException {
|
||||
|
||||
|
||||
@ -765,12 +765,14 @@ final class P11Signature extends SignatureSpi {
|
||||
}
|
||||
|
||||
// see JCA spec
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void engineSetParameter(String param, Object value)
|
||||
throws InvalidParameterException {
|
||||
throw new UnsupportedOperationException("setParameter() not supported");
|
||||
}
|
||||
|
||||
// see JCA spec
|
||||
@SuppressWarnings("deprecation")
|
||||
protected Object engineGetParameter(String param)
|
||||
throws InvalidParameterException {
|
||||
throw new UnsupportedOperationException("getParameter() not supported");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2014, 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,7 @@ public final class P11TlsKeyMaterialGenerator extends KeyGeneratorSpi {
|
||||
private long mechanism;
|
||||
|
||||
// parameter spec
|
||||
@SuppressWarnings("deprecation")
|
||||
private TlsKeyMaterialParameterSpec spec;
|
||||
|
||||
// master secret as a P11Key
|
||||
@ -82,6 +83,7 @@ public final class P11TlsKeyMaterialGenerator extends KeyGeneratorSpi {
|
||||
throw new InvalidParameterException(MSG);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void engineInit(AlgorithmParameterSpec params,
|
||||
SecureRandom random) throws InvalidAlgorithmParameterException {
|
||||
if (params instanceof TlsKeyMaterialParameterSpec == false) {
|
||||
@ -107,6 +109,7 @@ public final class P11TlsKeyMaterialGenerator extends KeyGeneratorSpi {
|
||||
throw new InvalidParameterException(MSG);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected SecretKey engineGenerateKey() {
|
||||
if (spec == null) {
|
||||
throw new IllegalStateException
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2014, 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
|
||||
@ -57,6 +57,7 @@ public final class P11TlsMasterSecretGenerator extends KeyGeneratorSpi {
|
||||
// mechanism id
|
||||
private long mechanism;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private TlsMasterSecretParameterSpec spec;
|
||||
private P11Key p11Key;
|
||||
|
||||
@ -74,6 +75,7 @@ public final class P11TlsMasterSecretGenerator extends KeyGeneratorSpi {
|
||||
throw new InvalidParameterException(MSG);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void engineInit(AlgorithmParameterSpec params,
|
||||
SecureRandom random) throws InvalidAlgorithmParameterException {
|
||||
if (params instanceof TlsMasterSecretParameterSpec == false) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2014, 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
|
||||
@ -63,6 +63,7 @@ final class P11TlsPrfGenerator extends KeyGeneratorSpi {
|
||||
// mechanism id
|
||||
private final long mechanism;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private TlsPrfParameterSpec spec;
|
||||
|
||||
private P11Key p11Key;
|
||||
@ -79,6 +80,7 @@ final class P11TlsPrfGenerator extends KeyGeneratorSpi {
|
||||
throw new InvalidParameterException(MSG);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void engineInit(AlgorithmParameterSpec params,
|
||||
SecureRandom random) throws InvalidAlgorithmParameterException {
|
||||
if (params instanceof TlsPrfParameterSpec == false) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2014, 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
|
||||
@ -57,6 +57,7 @@ final class P11TlsRsaPremasterSecretGenerator extends KeyGeneratorSpi {
|
||||
// mechanism id
|
||||
private long mechanism;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private TlsRsaPremasterSecretParameterSpec spec;
|
||||
|
||||
P11TlsRsaPremasterSecretGenerator(Token token, String algorithm, long mechanism)
|
||||
@ -71,6 +72,7 @@ final class P11TlsRsaPremasterSecretGenerator extends KeyGeneratorSpi {
|
||||
throw new InvalidParameterException(MSG);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void engineInit(AlgorithmParameterSpec params,
|
||||
SecureRandom random) throws InvalidAlgorithmParameterException {
|
||||
if (!(params instanceof TlsRsaPremasterSecretParameterSpec)) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2014, 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
|
||||
@ -353,6 +353,7 @@ public class RegistryContext implements Context, Referenceable {
|
||||
/**
|
||||
* Wrap a RemoteException inside a NamingException.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static NamingException wrapRemoteException(RemoteException re) {
|
||||
|
||||
NamingException ne;
|
||||
@ -413,6 +414,7 @@ public class RegistryContext implements Context, Referenceable {
|
||||
* Attempts to install a security manager if none is currently in
|
||||
* place.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private static void installSecurityMgr() {
|
||||
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user