Class to authenticate via Grid Certificate
Definition at line 23 of file authentication.py.
def authentication.X509CertAuth.__init__ |
( |
|
self, |
|
|
|
host, |
|
|
|
args, |
|
|
|
kwargs |
|
) |
| |
Definition at line 25 of file authentication.py.
References cmsRelvalreport.exit.
26 def __init__(self, host, *args, **kwargs):
30 x509_path = getenv(
"X509_USER_PROXY",
None)
31 if x509_path
and exists(x509_path):
32 key_file = cert_file = x509_path
35 x509_path = getenv(
"X509_USER_KEY",
None)
36 if x509_path
and exists(x509_path):
40 x509_path = getenv(
"X509_USER_CERT",
None)
41 if x509_path
and exists(x509_path):
45 x509_path = getenv(
"HOME") +
"/.globus/userkey.pem"
50 x509_path = getenv(
"HOME") +
"/.globus/usercert.pem"
54 if not key_file
or not exists(key_file):
55 print >>stderr,
"No certificate private key file found"
58 if not cert_file
or not exists(cert_file):
59 print >>stderr,
"No certificate public key file found"
65 HTTPSConnection.__init__(self,
68 cert_file = cert_file,