summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@nokia.com>2011-02-01 10:29:13 (GMT)
committerQt Commercial Integration <QtCommercial@digia.com>2012-01-31 10:25:02 (GMT)
commitb8c45095c5bcdc9e63067171d23957e370a88385 (patch)
tree5a8b40e4811f193592632f3dd1cb40c9ec6395aa /src
parent00b4accf7067cca855855128a57977dccd7315e8 (diff)
downloadQt-b8c45095c5bcdc9e63067171d23957e370a88385.zip
Qt-b8c45095c5bcdc9e63067171d23957e370a88385.tar.gz
Qt-b8c45095c5bcdc9e63067171d23957e370a88385.tar.bz2
fix coding style for merge request re. utf8 characters in SSL certs
fixes minor coding issues for "Use OpenSSL X509_NAME_ENTRY API to parse UTF8 subjectName/issuerName" Task-number: QTBUG-7912 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/network/ssl/qsslcertificate.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index a258110..2a2ad55 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -669,14 +669,13 @@ QByteArray QSslCertificatePrivate::QByteArray_from_X509(X509 *x509, QSsl::Encodi
static QMap<QString, QString> _q_mapFromX509Name(X509_NAME *name)
{
QMap<QString, QString> info;
- for( int i = 0; i < q_X509_NAME_entry_count(name); ++i )
- {
- X509_NAME_ENTRY *e = q_X509_NAME_get_entry( name, i );
- const char *obj = q_OBJ_nid2sn( q_OBJ_obj2nid( q_X509_NAME_ENTRY_get_object( e ) ) );
+ for (int i = 0; i < q_X509_NAME_entry_count(name); ++i) {
+ X509_NAME_ENTRY *e = q_X509_NAME_get_entry(name, i);
+ const char *obj = q_OBJ_nid2sn(q_OBJ_obj2nid(q_X509_NAME_ENTRY_get_object(e)));
unsigned char *data = 0;
- int size = q_ASN1_STRING_to_UTF8( &data, q_X509_NAME_ENTRY_get_data( e ) );
- info[QString::fromUtf8( obj )] = QString::fromUtf8( (char*)data, size );
- q_CRYPTO_free( data );
+ int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e));
+ info[QString::fromUtf8(obj)] = QString::fromUtf8((char*)data, size);
+ q_CRYPTO_free(data);
}
return info;
}