Package hudson.cli
Class Connection
- java.lang.Object
-
- hudson.cli.Connection
-
@Deprecated public class Connection extends Object
Deprecated.No longer used.
-
-
Field Summary
Fields Modifier and Type Field Description DataInputStream
din
Deprecated.DataOutputStream
dout
Deprecated.InputStream
in
Deprecated.OutputStream
out
Deprecated.
-
Constructor Summary
Constructors Constructor Description Connection(InputStream in, OutputStream out)
Deprecated.Connection(Socket socket)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
Deprecated.KeyAgreement
diffieHellman(boolean side)
Deprecated.Performs a Diffie-Hellman key exchange and produce a common secret between two ends of the connection.KeyAgreement
diffieHellman(boolean side, int keySize)
Deprecated.Connection
encryptConnection(SecretKey sessionKey, String algorithm)
Deprecated.Upgrades a connection with transport encryption by the specified symmetric cipher.static byte[]
fold(byte[] bytes, int size)
Deprecated.Given a byte array that contains arbitrary number of bytes, digests or expands those bits into the specified number of bytes without loss of entropy.void
proveIdentity(byte[] sharedSecret, KeyPair key)
Deprecated.Used in conjunction withverifyIdentity(byte[])
to prove that we actually own the private key of the given key pair.boolean
readBoolean()
Deprecated.byte[]
readByteArray()
Deprecated.X509EncodedKeySpec
readKey()
Deprecated.<T> T
readObject()
Deprecated.Receives an object sent bywriteObject(Object)
String
readUTF()
Deprecated.PublicKey
verifyIdentity(byte[] sharedSecret)
Deprecated.Verifies that we are talking to a peer that actually owns the private key corresponding to the public key we get.void
writeBoolean(boolean b)
Deprecated.void
writeByteArray(byte[] data)
Deprecated.void
writeKey(Key key)
Deprecated.void
writeObject(Object o)
Deprecated.Sends a serializable object.void
writeUTF(String msg)
Deprecated.
-
-
-
Field Detail
-
in
public final InputStream in
Deprecated.
-
out
public final OutputStream out
Deprecated.
-
din
public final DataInputStream din
Deprecated.
-
dout
public final DataOutputStream dout
Deprecated.
-
-
Constructor Detail
-
Connection
public Connection(Socket socket) throws IOException
Deprecated.- Throws:
IOException
-
Connection
public Connection(InputStream in, OutputStream out)
Deprecated.
-
-
Method Detail
-
writeUTF
public void writeUTF(String msg) throws IOException
Deprecated.- Throws:
IOException
-
readUTF
public String readUTF() throws IOException
Deprecated.- Throws:
IOException
-
writeBoolean
public void writeBoolean(boolean b) throws IOException
Deprecated.- Throws:
IOException
-
readBoolean
public boolean readBoolean() throws IOException
Deprecated.- Throws:
IOException
-
writeObject
public void writeObject(Object o) throws IOException
Deprecated.Sends a serializable object.- Throws:
IOException
-
readObject
public <T> T readObject() throws IOException, ClassNotFoundException
Deprecated.Receives an object sent bywriteObject(Object)
- Throws:
IOException
ClassNotFoundException
-
writeKey
public void writeKey(Key key) throws IOException
Deprecated.- Throws:
IOException
-
readKey
public X509EncodedKeySpec readKey() throws IOException
Deprecated.- Throws:
IOException
-
writeByteArray
public void writeByteArray(byte[] data) throws IOException
Deprecated.- Throws:
IOException
-
readByteArray
public byte[] readByteArray() throws IOException
Deprecated.- Throws:
IOException
-
diffieHellman
public KeyAgreement diffieHellman(boolean side) throws IOException, GeneralSecurityException
Deprecated.Performs a Diffie-Hellman key exchange and produce a common secret between two ends of the connection.DH is also useful as a coin-toss algorithm. Two parties get the same random number without trusting each other.
- Throws:
IOException
GeneralSecurityException
-
diffieHellman
public KeyAgreement diffieHellman(boolean side, int keySize) throws IOException, GeneralSecurityException
Deprecated.- Throws:
IOException
GeneralSecurityException
-
encryptConnection
public Connection encryptConnection(SecretKey sessionKey, String algorithm) throws IOException, GeneralSecurityException
Deprecated.Upgrades a connection with transport encryption by the specified symmetric cipher.- Returns:
- A new
Connection
object that includes the transport encryption. - Throws:
IOException
GeneralSecurityException
-
fold
public static byte[] fold(byte[] bytes, int size)
Deprecated.Given a byte array that contains arbitrary number of bytes, digests or expands those bits into the specified number of bytes without loss of entropy. Cryptographic utility code.
-
proveIdentity
public void proveIdentity(byte[] sharedSecret, KeyPair key) throws IOException, GeneralSecurityException
Deprecated.Used in conjunction withverifyIdentity(byte[])
to prove that we actually own the private key of the given key pair.- Throws:
IOException
GeneralSecurityException
-
verifyIdentity
public PublicKey verifyIdentity(byte[] sharedSecret) throws IOException, GeneralSecurityException
Deprecated.Verifies that we are talking to a peer that actually owns the private key corresponding to the public key we get.- Throws:
IOException
GeneralSecurityException
-
close
public void close() throws IOException
Deprecated.- Throws:
IOException
-
-