[swift-users] Where is the key getting created?
Kevin Smith
kevin.smith at isode.com
Tue Jun 23 07:04:56 UTC 2015
On 22 Jun 2015, at 21:18, Travis Loyd <fun.tloyd at gmail.com> wrote:
> Hello, I'm working to use the Swiften library for internal communication on a personal project.
Hi,
> Currently, I have been trying to understand where the TLS certificate is being created. So far I haven't been able to track that step down. I see calls to 'setCertificate' & 'addTLSCertificate', but where is the certificate being created? (Whether SChannel or OpenSSL)
Excerpts from the QtSwift.cpp file:
#ifdef HAVE_SCHANNEL
#include "CAPICertificateSelector.h"
#include <Swiften/TLS/CAPICertificate.h>
#endif
#include <Swiften/TLS/PKCS12Certificate.h>
…
CertificateWithKey::ref certificate;
std::string certificateString = Q2PSTRING(certificateFile_);
#if defined(HAVE_SCHANNEL)
if (isCAPIURI(certificateString)) {
certificate = boost::make_shared<CAPICertificate>(certificateString, timerFactory_);
} else {
certificate = boost::make_shared<PKCS12Certificate>(certificateString, createSafeByteArray(Q2PSTRING(password_->text())));
}
#else
certificate = boost::make_shared<PKCS12Certificate>(certificateString, createSafeByteArray(Q2PSTRING(password_->text())));
#endif
/K
More information about the swift-users
mailing list