Skip to content

Comments

Added support for running on Windows#66

Open
duncanmmacleod wants to merge 6 commits intofermitools:masterfrom
duncanmmacleod:windows
Open

Added support for running on Windows#66
duncanmmacleod wants to merge 6 commits intofermitools:masterfrom
duncanmmacleod:windows

Conversation

@duncanmmacleod
Copy link
Contributor

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.

_default_cafile = "/etc/pki/tls/cert.pem"
import kerberos

USERNAME = os.getlogin()
Copy link
Contributor

Choose a reason for hiding this comment

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

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']) + ']')
Copy link
Contributor

Choose a reason for hiding this comment

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

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"}:
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default X509_USER_PROXY on windows

2 participants