Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly deprecate and Restrict JNLP3 utility classes. #227

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
*/
package org.jenkinsci.remoting.engine;

import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;

import java.io.IOException;
import java.security.GeneralSecurityException;
import java.util.Random;
Expand All @@ -32,11 +35,16 @@
import javax.crypto.spec.SecretKeySpec;

/**
* Provides ciphers required by the JNLP3 protocol.
*
* {@link javax.crypto.Cipher}s that will be used to construct an encrypted
* {@link hudson.remoting.Channel} after a successful handshake.
*
* @deprecated JNLP3 protocol is deprecated
* @author Akshay Dayal
*/
@Deprecated
@Restricted(NoExternalUse.class)
class ChannelCiphers {

private final byte[] aesKey;
Expand Down
9 changes: 8 additions & 1 deletion src/main/java/org/jenkinsci/remoting/engine/EngineUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
*/
package org.jenkinsci.remoting.engine;

import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;

import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.IOException;
Expand All @@ -34,12 +37,16 @@
import java.util.logging.Logger;

/**
* Engine utility methods.
* Engine utility methods for JNLP3.
*
* Internal class. DO NOT USE FROM OUTSIDE.
*
* @deprecated JNLP3 protocol is deprecated
* @author Akshay Dayal
*/
@Restricted(NoExternalUse.class)
@Deprecated
//TODO: @RestrictedSince
public class EngineUtil {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,18 @@
import java.security.GeneralSecurityException;
import java.security.spec.KeySpec;
import org.jenkinsci.remoting.util.Charsets;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;

/**
* {@link Cipher}s that will be used to during the handshake
* process for JNLP3 protocol.
*
* @deprecated JNLP3 protocol is deprecated
* @author Akshay Dayal
*/
@Deprecated
@Restricted(NoExternalUse.class)
class HandshakeCiphers {

private final SecretKey secretKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
/**
* Represents the connection state of a {@link JnlpProtocol3Handler} connection.
*
* @deprecated JNLP3 protocol is deprecated
* @since 3.0
*/
@Deprecated
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/org/jenkinsci/remoting/engine/Jnlp3Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,18 @@
import java.util.Arrays;
import java.util.Random;
import org.jenkinsci.remoting.util.Charsets;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;

/**
* Utility methods for JNLP3.
*
* @deprecated JNLP3 Protocol is deprecated.
* @author Akshay Dayal
*/
class Jnlp3Util {
@Restricted(NoExternalUse.class)
@Deprecated
/*package*/ class Jnlp3Util {

/**
* Generate a random 128bit key.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ public static boolean[] useNioHub() {
@DataPoints
public static Factory[] protocols() {
return new Factory[]{
//TODO: Disable JNLP-1 tests by default?
new Factory() {
@Override
public JnlpProtocolHandler<? extends JnlpConnectionState> create(JnlpClientDatabase db,
Expand Down Expand Up @@ -731,6 +732,7 @@ public String toString() {
return "JNLP2-connect";
}
},
//TODO: Disable JNLP3 tests by default?
new Factory() {
@Override
public JnlpProtocolHandler<? extends JnlpConnectionState> create(JnlpClientDatabase db,
Expand Down