-
Notifications
You must be signed in to change notification settings - Fork 19
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
WIP: Fix for MacOS 10.13 and older to use SecTrustEvaluate #156
Conversation
61439eb
to
e0a218c
Compare
Since SecTrustEvaluateWithError is 10.14+
e0a218c
to
b15c591
Compare
It looks like the test failures in CI are pre-existing. Toggling this line lets you run the code on a more modern mac.
|
try: | ||
sec_trust_result = int(sec_trust_result) | ||
except (TypeError, ValueError): | ||
sec_trust_result = -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried the code on macOS 10.12 where I was encountering the pip issues and it almost worked. Thanks for working on this!
440 needs to get changed to use sec_trust_result.value
, otherwise it will be -1 (due to except block).
For c_uint
types, .value
is documented to be int
, so maybe that int()
is not even needed if the result type is always c_uint
. Please check, I am not familiar with that stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After that change, pip install ...
worked!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like that might be the reason for the github CI failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping @illume - can you try the fix I suggested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try: | |
sec_trust_result = int(sec_trust_result) | |
except (TypeError, ValueError): | |
sec_trust_result = -1 | |
try: | |
sec_trust_result = int(sec_trust_result.value) | |
except (TypeError, ValueError): | |
sec_trust_result = -1 |
Looks like this will get superseded by #157 . |
Closed in favor of #157, thanks again! |
Since SecTrustEvaluateWithError is 10.14+
Fixes #119