1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qsslcertificate.cpp -->
<title>Qt 4.8: QSslCertificate Class Reference</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="content">
<a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
</div>
<div class="breadcrumb toolblock">
<ul>
<li class="first"><a href="index.html">Home</a></li>
<!-- Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtnetwork.html">QtNetwork</a></li>
<li>QSslCertificate</li>
</ul>
</div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QSslCertificate Class Reference</h1>
<!-- $$$QSslCertificate-brief -->
<p>The QSslCertificate class provides a convenient API for an X509 certificate. <a href="#details">More...</a></p>
<!-- @@@QSslCertificate -->
<pre class="cpp"> <span class="preprocessor">#include <QSslCertificate></span></pre><p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
<p>This class was introduced in Qt 4.3.</p>
<ul>
<li><a href="qsslcertificate-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#SubjectInfo-enum">SubjectInfo</a></b> { Organization, CommonName, LocalityName, OrganizationalUnitName, CountryName, StateOrProvinceName }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#QSslCertificate">QSslCertificate</a></b> ( QIODevice * <i>device</i>, QSsl::EncodingFormat <i>format</i> = QSsl::Pem )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#QSslCertificate-2">QSslCertificate</a></b> ( const QByteArray & <i>data</i> = QByteArray(), QSsl::EncodingFormat <i>format</i> = QSsl::Pem )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#QSslCertificate-3">QSslCertificate</a></b> ( const QSslCertificate & <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#dtor.QSslCertificate">~QSslCertificate</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMultiMap<QSsl::AlternateNameEntryType, QString> </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#alternateSubjectNames">alternateSubjectNames</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#clear">clear</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#digest">digest</a></b> ( QCryptographicHash::Algorithm <i>algorithm</i> = QCryptographicHash::Md5 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDateTime </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#effectiveDate">effectiveDate</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDateTime </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#expiryDate">expiryDate</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::HANDLE </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#handle">handle</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#isNull">isNull</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#isValid">isValid</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#issuerInfo">issuerInfo</a></b> ( SubjectInfo <i>subject</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#issuerInfo-2">issuerInfo</a></b> ( const QByteArray & <i>tag</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSslKey </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#publicKey">publicKey</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#serialNumber">serialNumber</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#subjectInfo">subjectInfo</a></b> ( SubjectInfo <i>subject</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#subjectInfo-2">subjectInfo</a></b> ( const QByteArray & <i>tag</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#toDer">toDer</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#toPem">toPem</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#version">version</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#operator-not-eq">operator!=</a></b> ( const QSslCertificate & <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSslCertificate & </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#operator-eq">operator=</a></b> ( const QSslCertificate & <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#operator-eq-eq">operator==</a></b> ( const QSslCertificate & <i>other</i> ) const</td></tr>
</table>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QList<QSslCertificate> </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#fromData">fromData</a></b> ( const QByteArray & <i>data</i>, QSsl::EncodingFormat <i>format</i> = QSsl::Pem )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList<QSslCertificate> </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#fromDevice">fromDevice</a></b> ( QIODevice * <i>device</i>, QSsl::EncodingFormat <i>format</i> = QSsl::Pem )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList<QSslCertificate> </td><td class="memItemRight bottomAlign"><b><a href="qsslcertificate.html#fromPath">fromPath</a></b> ( const QString & <i>path</i>, QSsl::EncodingFormat <i>format</i> = QSsl::Pem, QRegExp::PatternSyntax <i>syntax</i> = QRegExp::FixedString )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QSslCertificate-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QSslCertificate class provides a convenient API for an X509 certificate.</p>
<p>QSslCertificate stores an X509 certificate, and is commonly used to verify the identity and store information about the local host, a remotely connected peer, or a trusted third party Certificate Authority.</p>
<p>There are many ways to construct a QSslCertificate. The most common way is to call <a href="qsslsocket.html#peerCertificate">QSslSocket::peerCertificate</a>(), which returns a QSslCertificate object, or <a href="qsslsocket.html#peerCertificateChain">QSslSocket::peerCertificateChain</a>(), which returns a list of them. You can also load certificates from a DER (binary) or PEM (Base64) encoded bundle, typically stored as one or more local files, or in a Qt Resource.</p>
<p>You can call <a href="qsslcertificate.html#isNull">isNull</a>() to check if your certificate is null. By default, QSslCertificate constructs a null certificate. To check if the certificate is valid, call <a href="qsslcertificate.html#isValid">isValid</a>(). A null certificate is invalid, but an invalid certificate is not necessarily null. If you want to reset all contents in a certificate, call <a href="qsslcertificate.html#clear">clear</a>().</p>
<p>After loading a certificate, you can find information about the certificate, its subject, and its issuer, by calling one of the many accessor functions, including <a href="qsslcertificate.html#version">version</a>(), <a href="qsslcertificate.html#serialNumber">serialNumber</a>(), <a href="qsslcertificate.html#issuerInfo">issuerInfo</a>() and <a href="qsslcertificate.html#subjectInfo">subjectInfo</a>(). You can call <a href="qsslcertificate.html#effectiveDate">effectiveDate</a>() and <a href="qsslcertificate.html#expiryDate">expiryDate</a>() to check when the certificate starts being effective and when it expires. The <a href="qsslcertificate.html#publicKey">publicKey</a>() function returns the certificate subject's public key as a <a href="qsslkey.html">QSslKey</a>. You can call <a href="qsslcertificate.html#issuerInfo">issuerInfo</a>() or <a href="qsslcertificate.html#subjectInfo">subjectInfo</a>() to get detailed information about the certificate issuer and its subject.</p>
<p>Internally, QSslCertificate is stored as an X509 structure. You can access this handle by calling <a href="qsslcertificate.html#handle">handle</a>(), but the results are likely to not be portable.</p>
</div>
<p><b>See also </b><a href="qsslsocket.html">QSslSocket</a>, <a href="qsslkey.html">QSslKey</a>, <a href="qsslcipher.html">QSslCipher</a>, and <a href="qsslerror.html">QSslError</a>.</p>
<!-- @@@QSslCertificate -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$SubjectInfo$$$Organization$$$CommonName$$$LocalityName$$$OrganizationalUnitName$$$CountryName$$$StateOrProvinceName -->
<h3 class="fn"><a name="SubjectInfo-enum"></a>enum QSslCertificate::<span class="name">SubjectInfo</span></h3>
<p>Describes keys that you can pass to <a href="qsslcertificate.html#issuerInfo">QSslCertificate::issuerInfo</a>() or <a href="qsslcertificate.html#subjectInfo">QSslCertificate::subjectInfo</a>() to get information about the certificate issuer or subject.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QSslCertificate::Organization</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">"O" The name of the organization.</td></tr>
<tr><td class="topAlign"><tt>QSslCertificate::CommonName</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">"CN" The common name; most often this is used to store the host name.</td></tr>
<tr><td class="topAlign"><tt>QSslCertificate::LocalityName</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">"L" The locality.</td></tr>
<tr><td class="topAlign"><tt>QSslCertificate::OrganizationalUnitName</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">"OU" The organizational unit name.</td></tr>
<tr><td class="topAlign"><tt>QSslCertificate::CountryName</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">"C" The country.</td></tr>
<tr><td class="topAlign"><tt>QSslCertificate::StateOrProvinceName</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">"ST" The state or province.</td></tr>
</table>
<!-- @@@SubjectInfo -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QSslCertificate[overload1]$$$QSslCertificateQIODevice*QSsl::EncodingFormat -->
<h3 class="fn"><a name="QSslCertificate"></a>QSslCertificate::<span class="name">QSslCertificate</span> ( <span class="type"><a href="qiodevice.html">QIODevice</a></span> * <i>device</i>, <span class="type"><a href="qssl.html#EncodingFormat-enum">QSsl::EncodingFormat</a></span> <i>format</i> = QSsl::Pem )</h3>
<p>Constructs a <a href="qsslcertificate.html">QSslCertificate</a> by reading <i>format</i> encoded data from <i>device</i> and using the first certificate found. You can later call <a href="qsslcertificate.html#isNull">isNull</a>() to see if <i>device</i> contained a certificate, and if this certificate was loaded successfully.</p>
<!-- @@@QSslCertificate -->
<!-- $$$QSslCertificate$$$QSslCertificateconstQByteArray&QSsl::EncodingFormat -->
<h3 class="fn"><a name="QSslCertificate-2"></a>QSslCertificate::<span class="name">QSslCertificate</span> ( const <span class="type"><a href="qbytearray.html">QByteArray</a></span> & <i>data</i> = QByteArray(), <span class="type"><a href="qssl.html#EncodingFormat-enum">QSsl::EncodingFormat</a></span> <i>format</i> = QSsl::Pem )</h3>
<p>Constructs a <a href="qsslcertificate.html">QSslCertificate</a> by parsing the <i>format</i> encoded <i>data</i> and using the first available certificate found. You can later call <a href="qsslcertificate.html#isNull">isNull</a>() to see if <i>data</i> contained a certificate, and if this certificate was loaded successfully.</p>
<!-- @@@QSslCertificate -->
<!-- $$$QSslCertificate$$$QSslCertificateconstQSslCertificate& -->
<h3 class="fn"><a name="QSslCertificate-3"></a>QSslCertificate::<span class="name">QSslCertificate</span> ( const <span class="type">QSslCertificate</span> & <i>other</i> )</h3>
<p>Constructs an identical copy of <i>other</i>.</p>
<!-- @@@QSslCertificate -->
<!-- $$$~QSslCertificate[overload1]$$$~QSslCertificate -->
<h3 class="fn"><a name="dtor.QSslCertificate"></a>QSslCertificate::<span class="name">~QSslCertificate</span> ()</h3>
<p>Destroys the <a href="qsslcertificate.html">QSslCertificate</a>.</p>
<!-- @@@~QSslCertificate -->
<!-- $$$alternateSubjectNames[overload1]$$$alternateSubjectNames -->
<h3 class="fn"><a name="alternateSubjectNames"></a><span class="type"><a href="qmultimap.html">QMultiMap</a></span><<span class="type"><a href="qssl.html#AlternateNameEntryType-enum">QSsl::AlternateNameEntryType</a></span>, <span class="type"><a href="qstring.html">QString</a></span>> QSslCertificate::<span class="name">alternateSubjectNames</span> () const</h3>
<p>Returns the list of alternative subject names for this certificate. The alternate subject names typically contain host names, optionally with wildcards, that are valid for this certificate.</p>
<p>These names are tested against the connected peer's host name, if either the subject information for <a href="qsslcertificate.html#SubjectInfo-enum">CommonName</a> doesn't define a valid host name, or the subject info name doesn't match the peer's host name.</p>
<p><b>See also </b><a href="qsslcertificate.html#subjectInfo">subjectInfo</a>().</p>
<!-- @@@alternateSubjectNames -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn"><a name="clear"></a><span class="type">void</span> QSslCertificate::<span class="name">clear</span> ()</h3>
<p>Clears the contents of this certificate, making it a null certificate.</p>
<p><b>See also </b><a href="qsslcertificate.html#isNull">isNull</a>().</p>
<!-- @@@clear -->
<!-- $$$digest[overload1]$$$digestQCryptographicHash::Algorithm -->
<h3 class="fn"><a name="digest"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> QSslCertificate::<span class="name">digest</span> ( <span class="type"><a href="qcryptographichash.html#Algorithm-enum">QCryptographicHash::Algorithm</a></span> <i>algorithm</i> = QCryptographicHash::Md5 ) const</h3>
<p>Returns a cryptographic digest of this certificate. By default, an MD5 digest will be generated, but you can also specify a custom <i>algorithm</i>.</p>
<!-- @@@digest -->
<!-- $$$effectiveDate[overload1]$$$effectiveDate -->
<h3 class="fn"><a name="effectiveDate"></a><span class="type"><a href="qdatetime.html">QDateTime</a></span> QSslCertificate::<span class="name">effectiveDate</span> () const</h3>
<p>Returns the date-time that the certificate becomes valid, or an empty <a href="qdatetime.html">QDateTime</a> if this is a null certificate.</p>
<p><b>See also </b><a href="qsslcertificate.html#expiryDate">expiryDate</a>().</p>
<!-- @@@effectiveDate -->
<!-- $$$expiryDate[overload1]$$$expiryDate -->
<h3 class="fn"><a name="expiryDate"></a><span class="type"><a href="qdatetime.html">QDateTime</a></span> QSslCertificate::<span class="name">expiryDate</span> () const</h3>
<p>Returns the date-time that the certificate expires, or an empty <a href="qdatetime.html">QDateTime</a> if this is a null certificate.</p>
<p><b>See also </b><a href="qsslcertificate.html#effectiveDate">effectiveDate</a>().</p>
<!-- @@@expiryDate -->
<!-- $$$fromData[overload1]$$$fromDataconstQByteArray&QSsl::EncodingFormat -->
<h3 class="fn"><a name="fromData"></a><span class="type"><a href="qlist.html">QList</a></span><<span class="type">QSslCertificate</span>> QSslCertificate::<span class="name">fromData</span> ( const <span class="type"><a href="qbytearray.html">QByteArray</a></span> & <i>data</i>, <span class="type"><a href="qssl.html#EncodingFormat-enum">QSsl::EncodingFormat</a></span> <i>format</i> = QSsl::Pem )<tt> [static]</tt></h3>
<p>Searches for and parses all certificates in <i>data</i> that are encoded in the specified <i>format</i> and returns them in a list of certificates.</p>
<p><b>See also </b><a href="qsslcertificate.html#fromDevice">fromDevice</a>().</p>
<!-- @@@fromData -->
<!-- $$$fromDevice[overload1]$$$fromDeviceQIODevice*QSsl::EncodingFormat -->
<h3 class="fn"><a name="fromDevice"></a><span class="type"><a href="qlist.html">QList</a></span><<span class="type">QSslCertificate</span>> QSslCertificate::<span class="name">fromDevice</span> ( <span class="type"><a href="qiodevice.html">QIODevice</a></span> * <i>device</i>, <span class="type"><a href="qssl.html#EncodingFormat-enum">QSsl::EncodingFormat</a></span> <i>format</i> = QSsl::Pem )<tt> [static]</tt></h3>
<p>Searches for and parses all certificates in <i>device</i> that are encoded in the specified <i>format</i> and returns them in a list of certificates.</p>
<p><b>See also </b><a href="qsslcertificate.html#fromData">fromData</a>().</p>
<!-- @@@fromDevice -->
<!-- $$$fromPath[overload1]$$$fromPathconstQString&QSsl::EncodingFormatQRegExp::PatternSyntax -->
<h3 class="fn"><a name="fromPath"></a><span class="type"><a href="qlist.html">QList</a></span><<span class="type">QSslCertificate</span>> QSslCertificate::<span class="name">fromPath</span> ( const <span class="type"><a href="qstring.html">QString</a></span> & <i>path</i>, <span class="type"><a href="qssl.html#EncodingFormat-enum">QSsl::EncodingFormat</a></span> <i>format</i> = QSsl::Pem, <span class="type"><a href="qregexp.html#PatternSyntax-enum">QRegExp::PatternSyntax</a></span> <i>syntax</i> = QRegExp::FixedString )<tt> [static]</tt></h3>
<p>Searches all files in the <i>path</i> for certificates encoded in the specified <i>format</i> and returns them in a list. <i>must</i> be a file or a pattern matching one or more files, as specified by <i>syntax</i>.</p>
<p>Example:</p>
<pre class="cpp"> <a href="qtglobal.html#foreach">foreach</a> (<span class="keyword">const</span> <span class="type"><a href="qsslcertificate.html">QSslCertificate</a></span> <span class="operator">&</span>cert<span class="operator">,</span> <span class="type"><a href="qsslcertificate.html">QSslCertificate</a></span><span class="operator">::</span>fromPath(<span class="string">"C:/ssl/certificate.*.pem"</span><span class="operator">,</span> <span class="type"><a href="qssl.html">QSsl</a></span><span class="operator">::</span>Pem<span class="operator">,</span>
<span class="type"><a href="qregexp.html">QRegExp</a></span><span class="operator">::</span>Wildcard)) {
<a href="qtglobal.html#qDebug">qDebug</a>() <span class="operator"><</span><span class="operator"><</span> cert<span class="operator">.</span>issuerInfo(<span class="type"><a href="qsslcertificate.html">QSslCertificate</a></span><span class="operator">::</span>Organization);
}</pre>
<p><b>See also </b><a href="qsslcertificate.html#fromData">fromData</a>().</p>
<!-- @@@fromPath -->
<!-- $$$handle[overload1]$$$handle -->
<h3 class="fn"><a name="handle"></a><span class="type"><a href="qt.html#HANDLE-typedef">Qt::HANDLE</a></span> QSslCertificate::<span class="name">handle</span> () const</h3>
<p>Returns a pointer to the native certificate handle, if there is one, or a null pointer otherwise.</p>
<p>You can use this handle, together with the native API, to access extended information about the certificate.</p>
<p><b>Warning:</b> Use of this function has a high probability of being non-portable, and its return value may vary from platform to platform or change from minor release to minor release.</p>
<!-- @@@handle -->
<!-- $$$isNull[overload1]$$$isNull -->
<h3 class="fn"><a name="isNull"></a><span class="type">bool</span> QSslCertificate::<span class="name">isNull</span> () const</h3>
<p>Returns true if this is a null certificate (i.e., a certificate with no contents); otherwise returns false.</p>
<p>By default, <a href="qsslcertificate.html">QSslCertificate</a> constructs a null certificate.</p>
<p><b>See also </b><a href="qsslcertificate.html#isValid">isValid</a>() and <a href="qsslcertificate.html#clear">clear</a>().</p>
<!-- @@@isNull -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn"><a name="isValid"></a><span class="type">bool</span> QSslCertificate::<span class="name">isValid</span> () const</h3>
<p>Returns true if this certificate is valid; otherwise returns false.</p>
<p>Note: Currently, this function checks that the current data-time is within the date-time range during which the certificate is considered valid, and checks that the certificate is not in a blacklist of fraudulent certificates.</p>
<p><b>See also </b><a href="qsslcertificate.html#isNull">isNull</a>().</p>
<!-- @@@isValid -->
<!-- $$$issuerInfo[overload1]$$$issuerInfoSubjectInfo -->
<h3 class="fn"><a name="issuerInfo"></a><span class="type"><a href="qstring.html">QString</a></span> QSslCertificate::<span class="name">issuerInfo</span> ( <span class="type"><a href="qsslcertificate.html#SubjectInfo-enum">SubjectInfo</a></span> <i>subject</i> ) const</h3>
<p>Returns the issuer information for the <i>subject</i> from the certificate, or an empty string if there is no information for <i>subject</i> in the certificate.</p>
<p><b>See also </b><a href="qsslcertificate.html#subjectInfo">subjectInfo</a>().</p>
<!-- @@@issuerInfo -->
<!-- $$$issuerInfo$$$issuerInfoconstQByteArray& -->
<h3 class="fn"><a name="issuerInfo-2"></a><span class="type"><a href="qstring.html">QString</a></span> QSslCertificate::<span class="name">issuerInfo</span> ( const <span class="type"><a href="qbytearray.html">QByteArray</a></span> & <i>tag</i> ) const</h3>
<p>Returns the issuer information for <i>tag</i> from the certificate, or an empty string if there is no information for <i>tag</i> in the certificate.</p>
<p><b>See also </b><a href="qsslcertificate.html#subjectInfo">subjectInfo</a>().</p>
<!-- @@@issuerInfo -->
<!-- $$$publicKey[overload1]$$$publicKey -->
<h3 class="fn"><a name="publicKey"></a><span class="type"><a href="qsslkey.html">QSslKey</a></span> QSslCertificate::<span class="name">publicKey</span> () const</h3>
<p>Returns the certificate subject's public key.</p>
<!-- @@@publicKey -->
<!-- $$$serialNumber[overload1]$$$serialNumber -->
<h3 class="fn"><a name="serialNumber"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> QSslCertificate::<span class="name">serialNumber</span> () const</h3>
<p>Returns the certificate's serial number string in decimal format. In case the serial number cannot be converted to decimal format (i.e. if it is bigger than 4294967295, which means it does not fit into 4 bytes), its hexadecimal version is returned.</p>
<!-- @@@serialNumber -->
<!-- $$$subjectInfo[overload1]$$$subjectInfoSubjectInfo -->
<h3 class="fn"><a name="subjectInfo"></a><span class="type"><a href="qstring.html">QString</a></span> QSslCertificate::<span class="name">subjectInfo</span> ( <span class="type"><a href="qsslcertificate.html#SubjectInfo-enum">SubjectInfo</a></span> <i>subject</i> ) const</h3>
<p>Returns the information for the <i>subject</i>, or an empty string if there is no information for <i>subject</i> in the certificate.</p>
<p><b>See also </b><a href="qsslcertificate.html#issuerInfo">issuerInfo</a>().</p>
<!-- @@@subjectInfo -->
<!-- $$$subjectInfo$$$subjectInfoconstQByteArray& -->
<h3 class="fn"><a name="subjectInfo-2"></a><span class="type"><a href="qstring.html">QString</a></span> QSslCertificate::<span class="name">subjectInfo</span> ( const <span class="type"><a href="qbytearray.html">QByteArray</a></span> & <i>tag</i> ) const</h3>
<p>Returns the subject information for <i>tag</i>, or an empty string if there is no information for <i>tag</i> in the certificate.</p>
<p><b>See also </b><a href="qsslcertificate.html#issuerInfo">issuerInfo</a>().</p>
<!-- @@@subjectInfo -->
<!-- $$$toDer[overload1]$$$toDer -->
<h3 class="fn"><a name="toDer"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> QSslCertificate::<span class="name">toDer</span> () const</h3>
<p>Returns this certificate converted to a DER (binary) encoded representation.</p>
<!-- @@@toDer -->
<!-- $$$toPem[overload1]$$$toPem -->
<h3 class="fn"><a name="toPem"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> QSslCertificate::<span class="name">toPem</span> () const</h3>
<p>Returns this certificate converted to a PEM (Base64) encoded representation.</p>
<!-- @@@toPem -->
<!-- $$$version[overload1]$$$version -->
<h3 class="fn"><a name="version"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> QSslCertificate::<span class="name">version</span> () const</h3>
<p>Returns the certificate's version string.</p>
<!-- @@@version -->
<!-- $$$operator!=[overload1]$$$operator!=constQSslCertificate& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QSslCertificate::<span class="name">operator!=</span> ( const <span class="type">QSslCertificate</span> & <i>other</i> ) const</h3>
<p>Returns true if this certificate is not the same as <i>other</i>; otherwise returns false.</p>
<!-- @@@operator!= -->
<!-- $$$operator=[overload1]$$$operator=constQSslCertificate& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">QSslCertificate</span> & QSslCertificate::<span class="name">operator=</span> ( const <span class="type">QSslCertificate</span> & <i>other</i> )</h3>
<p>Copies the contents of <i>other</i> into this certificate, making the two certificates identical.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQSslCertificate& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QSslCertificate::<span class="name">operator==</span> ( const <span class="type">QSslCertificate</span> & <i>other</i> ) const</h3>
<p>Returns true if this certificate is the same as <i>other</i>; otherwise returns false.</p>
<!-- @@@operator== -->
</div>
<div class="ft">
<span></span>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2012 Nokia Corporation and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.</p>
<br />
<p>
The documentation provided herein is licensed under the terms of the
<a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
License version 1.3</a> as published by the Free Software Foundation.</p>
<p>
Documentation sources may be obtained from <a href="http://www.qt-project.org">
www.qt-project.org</a>.</p>
<br />
<p>
Nokia, Qt and their respective logos are trademarks of Nokia Corporation
in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. <a title="Privacy Policy"
href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>
|