Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3] Record layer refactor #7

Merged
merged 28 commits into from Jun 2, 2015
Merged

[v3] Record layer refactor #7

merged 28 commits into from Jun 2, 2015

Conversation

tomato42
Copy link
Member

Move record encryption and decryption to separate class, put it under full unit test coverage.

Rebased on top of current master, together with changes from pull #5 (commits since 9fc246c are the real addition).

add generic TLS message class
extend exceptions hierarchy to allow for internal handling of errors
initializers can be shared between RecordHeader2 and RecordHeader3

also add some documentation to the classes
fixes pylint W0631 undefined-loop-variable.

this is not entirely necessary, as _recvHeader() and _sockRecvAll()
will never return without yielding at least once
add RecordLayer class and assorted classes to implement sending
encrypted messages using TLS record layer protocol
This was of relevance only to SSLv3 - TLSv1.0 and later include
on-the-wire protocol version in the MAC input, so if the content is
MACed the version check is performed implicitly
stop TLSRecordLayer using private fields of RecordLayer
class was moved to recordlayer module
fixes pylint C0103 (invalid-name)
fixes pylint C0103 (invalid-name)
resolves pylint C0103 (invalid-name)
since the code is essentially the same, we can move it to a separate
method
W0631 undefined-loop-variable - not necessary as recv() will always
yield at least once before returning
@tomato42 tomato42 added the review request PR finished, ready for review label May 31, 2015
@landscape-bot
Copy link

Code Health
Repository health increased by 6% when pulling f521f51 on record-layer-refactor-3 into d3a2493 on master.

remove unused imports, fix documentation warnings, add excuses for not
fixing other issues
@landscape-bot
Copy link

Code Health
Repository health increased by 6% when pulling f3c2927 on record-layer-refactor-3 into d3a2493 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+13.86%) to 56.06% when pulling f521f51 on record-layer-refactor-3 into d3a2493 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+13.85%) to 56.04% when pulling f3c2927 on record-layer-refactor-3 into d3a2493 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+13.85%) to 56.04% when pulling f3c2927 on record-layer-refactor-3 into d3a2493 on master.

@tomato42 tomato42 merged commit f3c2927 into master Jun 2, 2015
tomato42 added a commit that referenced this pull request Jun 2, 2015
Closes #7

Conflicts:
	tlslite/errors.py
	tlslite/messages.py
	tlslite/recordlayer.py
	tlslite/tlsrecordlayer.py
	unit_tests/mocksock.py
	unit_tests/test_tlslite_recordlayer.py
@tomato42 tomato42 deleted the record-layer-refactor-3 branch June 2, 2015 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review request PR finished, ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants