Package com.trilead.ssh2.packets

Examples of com.trilead.ssh2.packets.TypesReader.readString()


  public static DSAPublicKey decodeSSHDSAPublicKey(byte[] key) throws IOException
  {
    TypesReader tr = new TypesReader(key);

    String key_format = tr.readString();

    if (key_format.equals("ssh-dss") == false)
      throw new IllegalArgumentException("This is not a ssh-dss public key!");

    BigInteger p = tr.readMPINT();
View Full Code Here


  public static DSASignature decodeSSHDSASignature(byte[] sig) throws IOException
  {
    TypesReader tr = new TypesReader(sig);

    String sig_format = tr.readString();

    if (sig_format.equals("ssh-dss") == false)
      throw new IOException("Peer sent wrong signature format");

    byte[] rsArray = tr.readByteString();
View Full Code Here

  public void msgChannelOpen(byte[] msg, int msglen) throws IOException
  {
    TypesReader tr = new TypesReader(msg, 0, msglen);

    tr.readByte(); // skip packet type
    String channelType = tr.readString();
    int remoteID = tr.readUINT32(); /* sender channel */
    int remoteWindow = tr.readUINT32(); /* initial window size */
    int remoteMaxPacketSize = tr.readUINT32(); /* maximum packet size */

    if ("x11".equals(channelType))
View Full Code Here

          return;
        }
      }

      String remoteOriginatorAddress = tr.readString();
      int remoteOriginatorPort = tr.readUINT32();

      Channel c = new Channel(this);

      synchronized (c)
View Full Code Here

      return;
    }

    if ("forwarded-tcpip".equals(channelType))
    {
      String remoteConnectedAddress = tr.readString(); /* address that was connected */
      int remoteConnectedPort = tr.readUINT32(); /* port that was connected */
      String remoteOriginatorAddress = tr.readString(); /* originator IP address */
      int remoteOriginatorPort = tr.readUINT32(); /* originator port */

      RemoteForwardingData rfd = null;
View Full Code Here

    if ("forwarded-tcpip".equals(channelType))
    {
      String remoteConnectedAddress = tr.readString(); /* address that was connected */
      int remoteConnectedPort = tr.readUINT32(); /* port that was connected */
      String remoteOriginatorAddress = tr.readString(); /* originator IP address */
      int remoteOriginatorPort = tr.readUINT32(); /* originator port */

      RemoteForwardingData rfd = null;

      synchronized (remoteForwardings)
View Full Code Here

    Channel c = getChannel(id);

    if (c == null)
      throw new IOException("Unexpected SSH_MSG_CHANNEL_REQUEST message for non-existent channel " + id);

    String type = tr.readString("US-ASCII");
    boolean wantReply = tr.readBoolean();

    if (log.isEnabled())
      log.log(80, "Got SSH_MSG_CHANNEL_REQUEST (channel " + id + ", '" + type + "')");
View Full Code Here

  public static RSAPublicKey decodeSSHRSAPublicKey(byte[] key) throws IOException
  {
    TypesReader tr = new TypesReader(key);

    String key_format = tr.readString();

    if (key_format.equals("ssh-rsa") == false)
      throw new IllegalArgumentException("This is not a ssh-rsa public key");

    BigInteger e = tr.readMPINT();
View Full Code Here

  public static RSASignature decodeSSHRSASignature(byte[] sig) throws IOException
  {
    TypesReader tr = new TypesReader(sig);

    String sig_format = tr.readString();

    if (sig_format.equals("ssh-rsa") == false)
      throw new IOException("Peer sent wrong signature format");

    /* S is NOT an MPINT. "The value for 'rsa_signature_blob' is encoded as a string
View Full Code Here

        {
          TypesReader tr = new TypesReader(msg, 0, msglen);
          tr.readByte();
          tr.readBoolean();
          StringBuffer debugMessageBuffer = new StringBuffer();
          debugMessageBuffer.append(tr.readString("UTF-8"));

          for (int i = 0; i < debugMessageBuffer.length(); i++)
          {
            char c = debugMessageBuffer.charAt(i);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.