Permalink
Commits on Feb 16, 2017
  1. More work on encode_message, fix put_kex_pkt.

    put_kex just puts the kex stuff, buf_of_kex_pkt makes the full packet.
    committed Feb 16, 2017
  2. Clean up some open Ssh.

    committed Feb 16, 2017
  3. Rename old encode_ to buf_of_.

    committed Feb 16, 2017
  4. Rename Encode.add_ to Encode.put_

    This is to be symetrical with the following Decode.decode_ -> Decode.get_.
    committed Feb 16, 2017
  5. Rename Buf to Encode.

    committed Feb 16, 2017
  6. Simplify encode_message.

    committed Feb 16, 2017
  7. Reorder awa.mlpack.

    committed Feb 16, 2017
  8. Kill encode_plain_pkt.

    committed Feb 16, 2017
  9. Pull decode stuff out of Ssh into Decode.

    Still have to rename most of it.
    committed Feb 16, 2017
  10. Remove old Ssh.encode*

    committed Feb 16, 2017
  11. Get rid of encode_mpint.

    committed Feb 16, 2017
  12. Comment out the old encoding functions.

    I think in the end I'll have encode.ml and decode.ml
    committed Feb 16, 2017
  13. More conversions to Buf.t.

    There are times where we really just want the encoded value.
    committed Feb 16, 2017
  14. Convert more stuff to Buf.t.

    committed Feb 16, 2017
  15. Use Buf.t to encode messages.

    Next step is to convert the existing encode_* functions, they should have the
    same interface as Buf.add_*
    committed Feb 16, 2017
  16. Add buf.ml

    The idea is to have a more efficient and less error prone Cstruct.t.
    
    Basically, we create Buf.t with 256 bytes, and the buffer automagically grow as
    we add stuff. The nice thing is that it allows us to have this idiom:
    
         add_id SSH_MSG_DEBUG (create ()) |>
          add_bool always_display |>
          add_string message |>
          add_string lang
    
    Before it would be something like
    
    let a = encode_bool always_display in
    let b = encode_string message in
    let c = encode_string lang in
    
    Cstruct.concat [a;b;c]
    
    Each encode would be one alloc, then we copy all the data to each buffer, and
    then later we recopy them while concatenating, that's ETOOMANYCOPIES.
    
    The negative point is that encoding uses Buf.t while decoding uses Cstruct.t.
    committed Feb 16, 2017
Commits on Feb 15, 2017
  1. Typo.

    committed Feb 15, 2017
Commits on Feb 14, 2017
  1. The NEWKEYS activation is independent of direction.

    Basically when we send our NEWKEYS, it means we will use it to transmit and the
    peer should use it as the receiving keys (obviously).
    
    Before this, I assumed that NEWKEYS installed both ways, since both sides can
    calculate the keys at that point. That's wrong.
    committed Feb 14, 2017
Commits on Feb 12, 2017
  1. Zap old comment.

    committed Feb 12, 2017
  2. Simplify some code.

    committed Feb 12, 2017
  3. Calculated needed key length.

    committed Feb 12, 2017
  4. Add Mac.preferred.

    committed Feb 12, 2017