Fix MessageID bug due to wrong ASN.1 BER encoding of integers and length #9

Merged
quentin merged 5 commits from bug/message-id into main 2021-09-16 13:04:46 +00:00
Owner

Fixes #3

I chose to vendor goldap because the maintainer does not seem to answer and I think that the poor code quality of this library will require additional fixes in the future...

My fix is based on the following resources:

I fixed the following bugs:

I disabled the "Reconnect()" function in the test runner as now we can run all the tests with a single connection.

Also, for the future, I would recommend to totally drop this library and replace it with the clean ASN.1 library shipped with Go. If I have some time, I will try to hack on it!

Fixes #3 I chose to vendor goldap because the maintainer does not seem to answer and I think that the poor code quality of this library will require additional fixes in the future... My fix is based on the following resources: - https://ldap.com/ldapv3-wire-protocol-reference-asn1-ber/ - https://pkg.go.dev/encoding/asn1 I fixed the following bugs: - https://github.com/lor00x/goldap/issues/3 - and a regression caused by the fact that ASN.1 integer encoding must not be used to write lengths as encoding differs. I disabled the "Reconnect()" function in the test runner as now we can run all the tests with a single connection. Also, for the future, I would recommend to totally drop this library and replace it with the clean ASN.1 library shipped with Go. If I have some time, I will try to hack on it!
quentin force-pushed bug/message-id from 5cdfdc38ee to dbd9003714 2021-09-16 11:54:18 +00:00 Compare
lx approved these changes 2021-09-16 12:50:35 +00:00
quentin merged commit dbd9003714 into main 2021-09-16 13:04:46 +00:00
quentin deleted branch bug/message-id 2021-09-16 13:05:01 +00:00
Sign in to join this conversation.
No reviewers
lx
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/bottin#9
No description provided.