Added support for running on Windows#66
Open
duncanmmacleod wants to merge 6 commits intofermitools:masterfrom
Open
Added support for running on Windows#66duncanmmacleod wants to merge 6 commits intofermitools:masterfrom
duncanmmacleod wants to merge 6 commits intofermitools:masterfrom
Conversation
mainly to support not using posix paths on windows
this exists on windows as well (python>=3.0)
DrDaveD
requested changes
Jul 29, 2019
| _default_cafile = "/etc/pki/tls/cert.pem" | ||
| import kerberos | ||
|
|
||
| USERNAME = os.getlogin() |
Contributor
There was a problem hiding this comment.
I prefer this to not be the only variable in all caps. You could just use "currentuser".
| help="Certifying Authority certificates directory " + | ||
| '[default: $X509_CERT_DIR or ' + | ||
| defaults['capath'] + ']') | ||
| str(defaults['capath']) + ']') |
Contributor
There was a problem hiding this comment.
Under what conditions does this need "str"? Are you sure it's not needed elsewhere in the program?
|
|
||
| def get_ca_defaults(): | ||
| # on Windows and macOS, always trust the built-in defaults | ||
| if platform.system() in {"Windows", "Darwin"}: |
Contributor
There was a problem hiding this comment.
Why do you use platform.system() here, when several other places you use os.name? Could it be made to be consistent? I thought we already had the code general enough to work on Darwin, so maybe this could just check os.name == "nt" and let Darwin go through the rest of the function.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for generating an X.509 credential certificate on Windows (python>=3 only). This change should have zero functional impact on Unix systems.
Closes #65.