1. 08 Oct, 2021 1 commit
  2. 16 Sep, 2021 1 commit
  3. 01 Sep, 2021 1 commit
  4. 10 Aug, 2021 2 commits
  5. 22 Jun, 2021 1 commit
  6. 21 Jun, 2021 1 commit
  7. 24 Aug, 2020 4 commits
  8. 25 Oct, 2019 1 commit
  9. 21 Oct, 2019 1 commit
  10. 25 Oct, 2018 1 commit
  11. 17 May, 2018 1 commit
  12. 15 May, 2018 1 commit
  13. 08 May, 2018 1 commit
  14. 07 May, 2018 1 commit
  15. 02 May, 2018 1 commit
  16. 16 Apr, 2018 1 commit
  17. 09 Apr, 2018 1 commit
  18. 04 Apr, 2018 1 commit
  19. 12 Mar, 2018 4 commits
  20. 07 Mar, 2018 2 commits
    • Martin Vopatek's avatar
      Fix unprotect when pktlen < (2*mki_size + tag_len) · ca8e9a58
      Martin Vopatek authored
      The condition mki_start_location >= *mki_size in
      srtp_get_session_keys() should use base_mki_start_location.
      Now the condition is false for packets < 2*mki_size + tag_len.
      But as of commit d4bd43c9 the correct condition is now checked
      earlier so we simply remove the expression altogether.
    • Pascal Buhler's avatar
      prevent potential double free · ba2ed79c
      Pascal Buhler authored
      If alloc of icm fails then set *c to NULL after freeing
      so it will not be freed again. This is the same pattern
      used when allocating other ciphers.
  21. 06 Mar, 2018 3 commits
  22. 26 Feb, 2018 1 commit
    • Pascal Buhler's avatar
      Set gcm IV directly with EVP_CipherInit_ex · 9eb1716f
      Pascal Buhler authored
      Setting the IV directly with EVP_CipherInit_ex will
      save two calls to openssl and simplify the code.
      There is a comment that the 3 calls are required but
      I am not sure why, EVP_CTRL_GCM_SET_IV_FIXED will
      just store the vector and EVP_CTRL_GCM_IV_GEN will use
      it internally and then increment the last digits before
      returning it in iv variable passed in.
      EVP_CipherInit_ex will store the iv and use it internally.
      Incrementing and retrieving the new IV is not required for
      SRTP-GCM, a new IV is used for each packet.
      Tested with openssl 1.0.1d & 1.0.2g
  23. 15 Feb, 2018 1 commit
  24. 09 Feb, 2018 4 commits
    • Pascal Buhler's avatar
      Validate mki index when looking up keys · c995df45
      Pascal Buhler authored
      If the mki index is not valid then a NULL session
      key should be returned not just defaulting to first.
      This allows the protect functions to return
      with error bad mki.
    • Pascal Buhler's avatar
      Ensure returned trailer length is sufficient · 55626f32
      Pascal Buhler authored
      The srtp_get_protect_trailer_length needs to ensure
      that the returned value is large enough for any of
      the streams in the session.
      When a session is initialized with multiple polices
      it is possible to have different tag lengths for each
      policy. This function provides no way to specify which
      policy to use, so for now loop over all and find largest.
      The current function now has limited use so suggest to make
      two functions, one that takes ssrc or packet header so
      correct stream can be used, second function that takes a
      # Conflicts:
      #	srtp/srtp.c
    • Pascal Buhler's avatar
      Remove needless check of session_keys · 253ac269
      Pascal Buhler authored
      The session_keys array is not shared with the
      template so if it was allocated just free it.
    • Pascal Buhler's avatar
      Prevent OOB access of stream_template->session_keys · 9546e959
      Pascal Buhler authored
      The template may not have been used for the deallocated
      stream, therefore the size of the session_keys array
      could be different.
      Should maybe contain a pointer to template from stream
      so it is explicitly known that it was used.
  25. 08 Feb, 2018 1 commit
  26. 07 Feb, 2018 2 commits
    • Pascal Buhler's avatar
      remove srtp_stream_free use srtp_stream_dealloc instead · 8ec13a7e
      Pascal Buhler authored
      logic in srtp_stream_free was not correct and could result
      in memory access errors, srtp_stream_dealloc can safely be used
      instead and is "more" correct.
    • marcus's avatar
      Fix memory access issue in srtp_get_session_keys() · d4bd43c9
      marcus authored
      In srtp_get_session_keys(), when packet size (*pkt_octet_len) is
      greater than auth tag length but smaller than (auth tag length + MKI
      size), mki_start_location would take on incredible huge values,
      leading to memory access issue when calling memcmp() on iOS platform.
      Add additional sanity check before calculating mki_start_location.