make it run

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2003 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2010-01-13 21:01:06 +00:00
parent a0a64fb588
commit 9d53481946
16 changed files with 54 additions and 79 deletions

View file

@ -813,22 +813,33 @@ bool AuthSSL::getCertDetails(SSL_id id, sslcert &cert)
bool valid = false;
sslcert *tcert = NULL;
if (id == mOwnId)
{
cert = *mOwnCert;
valid = true;
}
else if (locked_FindCert(id, &tcert))
{
valid = true;
if (id == mOwnId) {
cert.authed = mOwnCert->authed;
cert.certificate = mOwnCert->certificate;
cert.email = mOwnCert->email;
cert.fpr = mOwnCert->fpr;
cert.id = mOwnCert->id;
cert.issuer = mOwnCert->issuer;
cert.location = mOwnCert->location;
cert.name = mOwnCert->name;
cert.org = mOwnCert->org;
cert.signers = mOwnCert->signers;
valid = true;
} else if (locked_FindCert(id, &tcert)) {
cert.authed = tcert->authed;
cert.certificate = tcert->certificate;
cert.email = tcert->email;
cert.fpr = tcert->fpr;
cert.id = tcert->id;
cert.issuer = tcert->issuer;
cert.location = tcert->location;
cert.name = tcert->name;
cert.org = tcert->org;
cert.signers = tcert->signers;
valid = true;
}
if (valid)
{
cert = *tcert;
}
sslMtx.unlock(); /**** UNLOCK ****/
sslMtx.unlock(); /**** UNLOCK ****/
return valid;
}