Class to authenticate via Grid Certificate
Definition at line 20 of file authentication.py.
def authentication.X509CertAuth.__init__ |
( |
|
self, |
|
|
|
host, |
|
|
|
args, |
|
|
|
kwargs |
|
) |
| |
Definition at line 22 of file authentication.py.
References cmsRelvalreport.exit.
23 def __init__(self, host, *args, **kwargs):
27 x509_path = getenv(
"X509_USER_PROXY",
None)
28 if x509_path
and exists(x509_path):
29 key_file = cert_file = x509_path
32 x509_path = getenv(
"X509_USER_KEY",
None)
33 if x509_path
and exists(x509_path):
37 x509_path = getenv(
"X509_USER_CERT",
None)
38 if x509_path
and exists(x509_path):
42 x509_path = getenv(
"HOME") +
"/.globus/userkey.pem"
47 x509_path = getenv(
"HOME") +
"/.globus/usercert.pem"
51 if not key_file
or not exists(key_file):
52 print >>stderr,
"No certificate private key file found"
55 if not cert_file
or not exists(cert_file):
56 print >>stderr,
"No certificate public key file found"
62 HTTPSConnection.__init__(self,
65 cert_file = cert_file,