latest probs wtih winglobus/pyglbous
Robert Olson
olson at mcs.anl.gov
Thu Mar 18 17:16:06 CST 2004
Following is an annotated part of
distribution/gsi/credential/source/library/globus_gsi_credential.c:
if((handle->cert_chain = sk_X509_new_null()) == NULL)
{
GLOBUS_GSI_CRED_OPENSSL_ERROR_RESULT(
result,
GLOBUS_GSI_CRED_ERROR_READING_CRED,
("Can't initialize cert chain\n"));
goto exit;
}
printf("%s:%d\n", __FILE__, __LINE__);
/* HERE */
while(!BIO_eof(cert_bio))
{
X509 * tmp_cert = NULL;
if(!PEM_read_bio_X509(cert_bio, &tmp_cert, NULL, NULL))
{
ERR_clear_error();
break;
}
if(!sk_X509_insert(handle->cert_chain, tmp_cert, i))
{
X509_free(tmp_cert);
/* ToDo: Fix memory leak from X509_NAME_online call below */
GLOBUS_GSI_CRED_OPENSSL_ERROR_RESULT(
result,
GLOBUS_GSI_CRED_ERROR_READING_CRED,
("Error adding cert: %s\n to issuer cert chain\n",
X509_NAME_oneline(X509_get_subject_name(tmp_cert), 0, 0)));
goto exit;
}
++i;
}
result = globus_i_gsi_cred_goodtill(handle, &(handle->goodtill));
printf("%s:%d\n", __FILE__, __LINE__);
the printf just before HERE is the last one that we see before the
following program just exits, no error message, no crash...
from AccessGrid.Security import Utilities
from pyGlobus import security
import getpass
def test():
print Utilities.get_certificate_locations()
cert_dir = r"c:\documents and Settings\olson\Application
Data\AccessGrid\trustedCACerts"
#cert_dir= "t"
cert = r"\home\olson\.globus\usercert.pem"
key = r"\home\olson\.globus\userkey.pem"
#key = "/home/olson/.tcshrc"
out = r"\temp\pp"
def cb(msg):
print "Dbg: ", msg
p = getpass.getpass("passphrase: ")
try:
ret = security.grid_proxy_init(outFile = out,
certDir = cert_dir,
certFile = cert,
keyFile = key,
passphrase = p,
debugCB = cb)
print ret
except security.GSIException, e:
print e
for l in e[1]:
print l
if __name__ == "__main__":
test()
More information about the ag-dev
mailing list