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>
(cherry picked from commit 2e8d206fd9f656cd88b797c059ef83ed3df32881)
This commit is contained in:
Pierre Rossi 2011-02-01 11:29:13 +01:00 committed by Peter Hartmann
parent 92f6bd3a15
commit fe54165149

View File

@ -669,14 +669,13 @@ QByteArray QSslCertificatePrivate::QByteArray_from_X509(X509 *x509, QSsl::Encodi
static QMap<QString, QString> _q_mapFromX509Name(X509_NAME *name) static QMap<QString, QString> _q_mapFromX509Name(X509_NAME *name)
{ {
QMap<QString, QString> info; QMap<QString, QString> info;
for( int i = 0; i < q_X509_NAME_entry_count(name); ++i ) for (int i = 0; i < q_X509_NAME_entry_count(name); ++i) {
{ X509_NAME_ENTRY *e = q_X509_NAME_get_entry(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)));
const char *obj = q_OBJ_nid2sn( q_OBJ_obj2nid( q_X509_NAME_ENTRY_get_object( e ) ) );
unsigned char *data = 0; unsigned char *data = 0;
int size = q_ASN1_STRING_to_UTF8( &data, q_X509_NAME_ENTRY_get_data( e ) ); int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e));
info[QString::fromUtf8( obj )] = QString::fromUtf8( (char*)data, size ); info[QString::fromUtf8(obj)] = QString::fromUtf8((char*)data, size);
q_CRYPTO_free( data ); q_CRYPTO_free(data);
} }
return info; return info;
} }