diff options
author | Pierre Rossi <pierre.rossi@nokia.com> | 2011-02-01 10:29:13 (GMT) |
---|---|---|
committer | Peter Hartmann <peter.hartmann@nokia.com> | 2011-05-23 15:24:11 (GMT) |
commit | 2e8d206fd9f656cd88b797c059ef83ed3df32881 (patch) | |
tree | c420e89eb26ca66ca2a2445f214b94bbafd1c1d6 /src | |
parent | e5d94256be2525c24a8b61edd771662b7f2b8be3 (diff) | |
download | Qt-2e8d206fd9f656cd88b797c059ef83ed3df32881.zip Qt-2e8d206fd9f656cd88b797c059ef83ed3df32881.tar.gz Qt-2e8d206fd9f656cd88b797c059ef83ed3df32881.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.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index 9887438..3a703270 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; } |