Skip to content

select MIC algorithm using Disposition-Notification-Options header#20

Merged
alexdean merged 11 commits intomasterfrom
parse-complex-headers
Feb 24, 2023
Merged

select MIC algorithm using Disposition-Notification-Options header#20
alexdean merged 11 commits intomasterfrom
parse-complex-headers

Conversation

@alexdean
Copy link
Owner

@alexdean alexdean commented Jan 4, 2023

fixes #19

Alex Dean added 4 commits December 26, 2022 17:57
…specific

can re-use parts of this as new cases arise & refactor as more is learned. just
focusing on the specific at hand for right now, & in a way that won't require
public API changes in the future.
@alexdean alexdean self-assigned this Jan 4, 2023
Alex Dean added 7 commits January 4, 2023 09:23
in expected usage, we'll do validation before passing algorithm name to Message.
so we should only be using default if client does not specify an algorithm.

if client specified an unknown algorithm, & we instead defaulted to sha256, that's
certain to result in a MIC mismatch & a failed transmission - but the silent
fallback will make the issue harder to troubleshoot. so better to raise & solve
the issue at the source.
examples:

  /Users/alexdean/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/net/protocol.rb:30: warning: method redefined; discarding old protocol_param
  /Users/alexdean/.rvm/gems/ruby-2.6.4/gems/net-protocol-0.2.1/lib/net/protocol.rb:32: warning: previous definition of protocol_param was here
  /Users/alexdean/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/net/protocol.rb:38: warning: method redefined; discarding old ssl_socket_connect
  /Users/alexdean/.rvm/gems/ruby-2.6.4/gems/net-protocol-0.2.1/lib/net/protocol.rb:40: warning: previous definition of ssl_socket_connect was here
  /Users/alexdean/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/net/protocol.rb:66: warning: already initialized constant Net::ProtocRetryError
  /Users/alexdean/.rvm/gems/ruby-2.6.4/gems/net-protocol-0.2.1/lib/net/protocol.rb:68: warning: previous definition of ProtocRetryError was here
  $ bundle exec rake test
  ... snip ...
  test/client_test.rb:160: warning: assigned but unused variable - file_name_received_by_bob
  test/client_test.rb:161: warning: assigned but unused variable - file_content_received_by_bob
  test/client_test.rb:177: warning: assigned but unused variable - file_name_received_by_bob
  test/client_test.rb:178: warning: assigned but unused variable - file_content_received_by_bob
  test/server_test.rb:31: warning: assigned but unused variable - status
  test/server_test.rb:66: warning: assigned but unused variable - status
This reverts commit 5b6d73a.

Will address this separately. See #21. At this point I'm not sure what the
actual problem or root cause are, so seems better not to mix this unrelated change
into the current feature addition in this PR.
leftovers from initial attempt to handle many different kinds of headers.
not needed now that this class is only focused on a single header type.
@alexdean alexdean marked this pull request as ready for review January 4, 2023 18:20
@alexdean alexdean merged commit 87aadb9 into master Feb 24, 2023
alexdean pushed a commit that referenced this pull request Feb 24, 2023
in case partner cares about 'sha-256' vs 'sha256' when evaluating MDNs we build

refs #20
@alexdean alexdean deleted the parse-complex-headers branch April 10, 2023 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use MIC algo specified by sender

1 participant