summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-14 18:57:18 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-14 21:36:32 (GMT)
commitcb05f5a908e20006c954ce38755c2e422ecc2388 (patch)
treea793551a5fe279a57d4330119560e8542f745484 /Swiften/TLS/OpenSSL
parentcad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff)
downloadswift-cb05f5a908e20006c954ce38755c2e422ecc2388.zip
swift-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2
Removed Swift::String.
Diffstat (limited to 'Swiften/TLS/OpenSSL')
-rw-r--r--Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp2
-rw-r--r--Swiften/TLS/OpenSSL/OpenSSLCertificate.h28
-rw-r--r--Swiften/TLS/OpenSSL/OpenSSLContext.cpp2
3 files changed, 16 insertions, 16 deletions
diff --git a/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp b/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp
index 6a3d688..8a3bf97 100644
--- a/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp
+++ b/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp
@@ -58,7 +58,7 @@ void OpenSSLCertificate::parse() {
ByteArray subjectNameData;
subjectNameData.resize(256);
X509_NAME_oneline(X509_get_subject_name(cert.get()), subjectNameData.getData(), subjectNameData.getSize());
- this->subjectName = String(subjectNameData.getData());
+ this->subjectName = std::string(subjectNameData.getData());
// Common name
int cnLoc = X509_NAME_get_index_by_NID(subjectName, NID_commonName, -1);
diff --git a/Swiften/TLS/OpenSSL/OpenSSLCertificate.h b/Swiften/TLS/OpenSSL/OpenSSLCertificate.h
index 2255826..b900170 100644
--- a/Swiften/TLS/OpenSSL/OpenSSLCertificate.h
+++ b/Swiften/TLS/OpenSSL/OpenSSLCertificate.h
@@ -9,7 +9,7 @@
#include <boost/shared_ptr.hpp>
#include <openssl/ssl.h>
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/TLS/Certificate.h"
namespace Swift {
@@ -18,23 +18,23 @@ namespace Swift {
OpenSSLCertificate(boost::shared_ptr<X509>);
OpenSSLCertificate(const ByteArray& der);
- String getSubjectName() const {
+ std::string getSubjectName() const {
return subjectName;
}
- std::vector<String> getCommonNames() const {
+ std::vector<std::string> getCommonNames() const {
return commonNames;
}
- std::vector<String> getSRVNames() const {
+ std::vector<std::string> getSRVNames() const {
return srvNames;
}
- std::vector<String> getDNSNames() const {
+ std::vector<std::string> getDNSNames() const {
return dnsNames;
}
- std::vector<String> getXMPPAddresses() const {
+ std::vector<std::string> getXMPPAddresses() const {
return xmppAddresses;
}
@@ -47,24 +47,24 @@ namespace Swift {
private:
void parse();
- void addSRVName(const String& name) {
+ void addSRVName(const std::string& name) {
srvNames.push_back(name);
}
- void addDNSName(const String& name) {
+ void addDNSName(const std::string& name) {
dnsNames.push_back(name);
}
- void addXMPPAddress(const String& addr) {
+ void addXMPPAddress(const std::string& addr) {
xmppAddresses.push_back(addr);
}
private:
boost::shared_ptr<X509> cert;
- String subjectName;
- std::vector<String> commonNames;
- std::vector<String> dnsNames;
- std::vector<String> xmppAddresses;
- std::vector<String> srvNames;
+ std::string subjectName;
+ std::vector<std::string> commonNames;
+ std::vector<std::string> dnsNames;
+ std::vector<std::string> xmppAddresses;
+ std::vector<std::string> srvNames;
};
}
diff --git a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
index be2f0af..21e377f 100644
--- a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
+++ b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
@@ -178,7 +178,7 @@ bool OpenSSLContext::setClientCertificate(const PKCS12Certificate& certificate)
X509 *certPtr = 0;
EVP_PKEY* privateKeyPtr = 0;
STACK_OF(X509)* caCertsPtr = 0;
- int result = PKCS12_parse(pkcs12.get(), certificate.getPassword().getUTF8Data(), &privateKeyPtr, &certPtr, &caCertsPtr);
+ int result = PKCS12_parse(pkcs12.get(), certificate.getPassword().c_str(), &privateKeyPtr, &certPtr, &caCertsPtr);
if (result != 1) {
return false;
}