Skip to content

Conversation

bwhmather
Copy link

(depends on bwhmather/cryptography@1b55947c).
Writing a simple ca and need to be able verify that a certificate request received by the server is the same as the one sent by the client. Comparing digests seems like the obvious way to do it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can write this as _ffi.new("unsigned int *", len(result_buffer))

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Admittedly whole function was copied and pasted from X509.digest.
The test for X509.digest is currently failing (#150) so I haven't made the corresponding change there.
Also added bit to the documentation.

@alex
Copy link
Member

alex commented Nov 12, 2014

This probably needs an entry in the docs as well

@ihamburglar
Copy link
Contributor

There have been a few releases of cryptography since this PR was submitted. Perhaps we should get this retested?

@bwhmather
Copy link
Author

pyca/cryptography#1472 has been merged so it should indeed work now. I figured I would need to wait for the release before bumping here and then forgot... Sorry

@hynek
Copy link
Contributor

hynek commented May 5, 2015

This needs to be rebased and a changelog entry.

@bwhmather bwhmather force-pushed the X509Req.get_digest branch from de3dbb8 to a5a5dad Compare May 6, 2015 08:18
@coveralls
Copy link

Coverage Status

Coverage decreased (-2.37%) to 92.94% when pulling a5a5dad on bwhmather:X509Req.get_digest into 5992c07 on pyca:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-2.37%) to 92.94% when pulling a5a5dad on bwhmather:X509Req.get_digest into 5992c07 on pyca:master.

@bwhmather
Copy link
Author

Apparently default digest was changed in 0.9.8 to SHA1. This is causing the tests to fail. Will figure out what the digest should be and fix the tests.

@bwhmather bwhmather force-pushed the X509Req.get_digest branch 3 times, most recently from bb329df to 6a9ace7 Compare May 6, 2015 22:21
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 95.29% when pulling 6a9ace7 on bwhmather:X509Req.get_digest into e9ae673 on pyca:master.

@bwhmather bwhmather force-pushed the X509Req.get_digest branch from 6a9ace7 to a66105d Compare May 7, 2015 20:34
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.85%) to 94.46% when pulling a66105d on bwhmather:X509Req.get_digest into e9ae673 on pyca:master.

@bwhmather bwhmather force-pushed the X509Req.get_digest branch from a66105d to dfed66e Compare May 7, 2015 20:46
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.84%) to 94.47% when pulling dfed66e on bwhmather:X509Req.get_digest into e9ae673 on pyca:master.

@hynek
Copy link
Contributor

hynek commented Jan 4, 2016

First of all, please accept my sincere apologies for this PR not moving along as we’d like to. I’ve tried to come up with a long-term solution to the general x509 problem domain and would also welcome your feedback to this thread:

https://mail.python.org/pipermail/cryptography-dev/2015-December/000539.html

(please note that there’s already responses: https://mail.python.org/pipermail/cryptography-dev/2015-December/thread.html https://mail.python.org/pipermail/cryptography-dev/2016-January/thread.html ).

I really hope this could be a way to loosen the guardian knot that the pyOpenSSL’s x509 layer currently presents to us maintainers and lightens the frustrations for contributors like you.

@bwhmather bwhmather force-pushed the X509Req.get_digest branch 3 times, most recently from 7b220f2 to c158328 Compare January 11, 2016 22:03
@codecov-io
Copy link

Current coverage is 87.60%

Merging #170 into master will decrease coverage by -0.13% as of 8fdae08

@@            master   #170   diff @@
=====================================
  Files            7      7       
  Stmts         2047   2057    +10
  Branches       377    380     +3
  Methods          0      0       
=====================================
+ Hit           1796   1802     +6
- Partial        121    123     +2
- Missed         130    132     +2

Review entire Coverage Diff as of 8fdae08

Powered by Codecov. Updated on successful CI builds.

@reaperhulk
Copy link
Member

At this point this functionality can be obtained via converting to a cryptography object (to_cryptography) and computing a digest over the tbs_certrequest_bytes. Apologies for mishandling this PR 😞

@reaperhulk reaperhulk closed this May 16, 2018
@bwhmather
Copy link
Author

Not a problem. Thank you for following up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

7 participants