1. 25 Aug, 2011 1 commit
    • Joel Martin's avatar
      Add sha1.*. Remove UTF-8 encode. Protocol handling. · d8b7f7a7
      Joel Martin authored
      Add common/sha1.h and common/sha1.c so that we have the SHA routines
      even if openssl is not available. From the IETF SHA RFC example code.
      
      Remove the UTF-8 encoding hack. This was really just an experiment.
      
      If the protocol passed in the handshake has "binary" then don't base64
      encode for the HyBi protocol. This will allow noVNC to request the
      binary data be passed raw and not base64 encoded. Unfortunately, the
      client doesn't speak first in VNC protocol (bad original design). If
      it did then we could determine whether to base64 encode or not based
      on the first HyBi frame from the client and whether the binary bit is
      set or not. Oh well.
      
      Misc Cleanup:
      
      - Always free response and buf in handshake routine.
      
      - Remove some unused variables.
      d8b7f7a7