1
0
mirror of https://github.com/laurivosandi/certidude synced 2024-12-22 16:25:17 +00:00

More fixes to make client work on Mac OS X

This commit is contained in:
Lauri Võsandi 2017-01-30 18:12:27 +00:00
parent 34e8fb9c8c
commit 6c1d0bfae9
2 changed files with 4 additions and 6 deletions

View File

@ -4,7 +4,7 @@ import os
import requests
import subprocess
import tempfile
from certidude import errors
from certidude import errors, const
from certidude.wrappers import Certificate, Request
from cryptography import x509
from cryptography.hazmat.primitives.asymmetric import rsa
@ -188,10 +188,10 @@ def certidude_request_certificate(server, key_path, request_path, certificate_pa
cp = ConfigParser(delimiters=("="))
cp.readfp(open("/etc/samba/smb.conf"))
name = cp.get("global", "netbios name")
os.system("kinit -S HTTP/%s -k %s$" % (name, server))
os.system("kinit -S HTTP/%s -k %s$" % (server, name))
else:
os.system("kinit -S HTTP/%s -k %s$" % (const.HOSTNAME.lower(), server) # Mac OS X
os.system("kinit -S HTTP/%s -k %s$" % (const.HOSTNAME.upper(), server) # Fedora /w SSSD
os.system("kinit -S HTTP/%s -k %s$" % (server, const.HOSTNAME.lower())) # Mac OS X
os.system("kinit -S HTTP/%s -k %s$" % (server, const.HOSTNAME.upper())) # Fedora /w SSSD
from requests_kerberos import HTTPKerberosAuth, OPTIONAL
auth = HTTPKerberosAuth(mutual_authentication=OPTIONAL, force_preemptive=True)
else:

View File

@ -14,11 +14,9 @@ MarkupSafe==0.23
ndg-httpsclient==0.4.2
pyasn1==0.1.9
pycparser==2.14
pyOpenSSL==16.0.0
python-ldap==2.4.25
python-mimeparse==1.5.2
requests==2.10.0
setproctitle==1.1.10
six==1.10.0
urllib3==1.16
wsgiref==0.1.2