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 DataInputStreamdinDeprecated.DataOutputStreamdoutDeprecated.InputStreaminDeprecated.OutputStreamoutDeprecated.
-
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 voidclose()Deprecated.KeyAgreementdiffieHellman(boolean side)Deprecated.Performs a Diffie-Hellman key exchange and produce a common secret between two ends of the connection.KeyAgreementdiffieHellman(boolean side, int keySize)Deprecated.ConnectionencryptConnection(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.voidproveIdentity(byte[] sharedSecret, KeyPair key)Deprecated.Used in conjunction withverifyIdentity(byte[])to prove that we actually own the private key of the given key pair.booleanreadBoolean()Deprecated.byte[]readByteArray()Deprecated.X509EncodedKeySpecreadKey()Deprecated.<T> TreadObject()Deprecated.Receives an object sent bywriteObject(Object)StringreadUTF()Deprecated.PublicKeyverifyIdentity(byte[] sharedSecret)Deprecated.Verifies that we are talking to a peer that actually owns the private key corresponding to the public key we get.voidwriteBoolean(boolean b)Deprecated.voidwriteByteArray(byte[] data)Deprecated.voidwriteKey(Key key)Deprecated.voidwriteObject(Object o)Deprecated.Sends a serializable object.voidwriteUTF(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 IOExceptionDeprecated.- Throws:
IOException
-
readBoolean
public boolean readBoolean() throws IOExceptionDeprecated.- Throws:
IOException
-
writeObject
public void writeObject(Object o) throws IOException
Deprecated.Sends a serializable object.- Throws:
IOException
-
readObject
public <T> T readObject() throws IOException, ClassNotFoundExceptionDeprecated.Receives an object sent bywriteObject(Object)- Throws:
IOExceptionClassNotFoundException
-
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 IOExceptionDeprecated.- Throws:
IOException
-
readByteArray
public byte[] readByteArray() throws IOExceptionDeprecated.- 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:
IOExceptionGeneralSecurityException
-
diffieHellman
public KeyAgreement diffieHellman(boolean side, int keySize) throws IOException, GeneralSecurityException
Deprecated.- Throws:
IOExceptionGeneralSecurityException
-
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
Connectionobject that includes the transport encryption. - Throws:
IOExceptionGeneralSecurityException
-
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, GeneralSecurityExceptionDeprecated.Used in conjunction withverifyIdentity(byte[])to prove that we actually own the private key of the given key pair.- Throws:
IOExceptionGeneralSecurityException
-
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:
IOExceptionGeneralSecurityException
-
close
public void close() throws IOExceptionDeprecated.- Throws:
IOException
-
-