Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 6440

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?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" />
<!-- qsslconfiguration.cpp -->
  <title>Qt 4.8: QSslConfiguration Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <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>QSslConfiguration</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></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-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">QSslConfiguration Class Reference</h1>
<!-- $$$QSslConfiguration-brief -->
<p>The QSslConfiguration class holds the configuration and state of an SSL connection <a href="#details">More...</a></p>
<!-- @@@QSslConfiguration -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QSslConfiguration&gt;</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.4.</p>
<ul>
<li><a href="qsslconfiguration-members.html">List of all members, including inherited members</a></li>
</ul>
<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="qsslconfiguration.html#QSslConfiguration">QSslConfiguration</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#QSslConfiguration-2">QSslConfiguration</a></b> ( const QSslConfiguration &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#dtor.QSslConfiguration">~QSslConfiguration</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QSslCertificate&gt; </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#caCertificates">caCertificates</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QSslCipher&gt; </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#ciphers">ciphers</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#isNull">isNull</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSslCertificate </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#localCertificate">localCertificate</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSslCertificate </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#peerCertificate">peerCertificate</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QSslCertificate&gt; </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#peerCertificateChain">peerCertificateChain</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#peerVerifyDepth">peerVerifyDepth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSslSocket::PeerVerifyMode </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#peerVerifyMode">peerVerifyMode</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSslKey </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#privateKey">privateKey</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSsl::SslProtocol </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#protocol">protocol</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSslCipher </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#sessionCipher">sessionCipher</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#setCaCertificates">setCaCertificates</a></b> ( const QList&lt;QSslCertificate&gt; &amp; <i>certificates</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#setCiphers">setCiphers</a></b> ( const QList&lt;QSslCipher&gt; &amp; <i>ciphers</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#setLocalCertificate">setLocalCertificate</a></b> ( const QSslCertificate &amp; <i>certificate</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#setPeerVerifyDepth">setPeerVerifyDepth</a></b> ( int <i>depth</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#setPeerVerifyMode">setPeerVerifyMode</a></b> ( QSslSocket::PeerVerifyMode <i>mode</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#setPrivateKey">setPrivateKey</a></b> ( const QSslKey &amp; <i>key</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#setProtocol">setProtocol</a></b> ( QSsl::SslProtocol <i>protocol</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#setSslOption">setSslOption</a></b> ( QSsl::SslOption <i>option</i>, bool <i>on</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#testSslOption">testSslOption</a></b> ( QSsl::SslOption <i>option</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#operator-not-eq">operator!=</a></b> ( const QSslConfiguration &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSslConfiguration &amp; </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#operator-eq">operator=</a></b> ( const QSslConfiguration &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#operator-eq-eq">operator==</a></b> ( const QSslConfiguration &amp; <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"> QSslConfiguration </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#defaultConfiguration">defaultConfiguration</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsslconfiguration.html#setDefaultConfiguration">setDefaultConfiguration</a></b> ( const QSslConfiguration &amp; <i>configuration</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QSslConfiguration-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QSslConfiguration class holds the configuration and state of an SSL connection</p>
<p>QSslConfiguration is used by Qt networking classes to relay information about an open SSL connection and to allow the application to control certain features of that connection.</p>
<p>The settings that QSslConfiguration currently supports are:</p>
<ul>
<li>The SSL/TLS protocol to be used</li>
<li>The certificate to be presented to the peer during connection and its associated private key</li>
<li>The ciphers allowed to be used for encrypting the connection</li>
<li>The list of Certificate Authorities certificates that are used to validate the peer's certificate</li>
</ul>
<p>These settings are applied only during the connection handshake. Setting them after the connection has been established has no effect.</p>
<p>The state that QSslConfiguration supports are:</p>
<ul>
<li>The certificate the peer presented during handshake, along with the chain leading to a CA certificate</li>
<li>The cipher used to encrypt this session</li>
</ul>
<p>The state can only be obtained once the SSL connection starts, but not necessarily before it's done. Some settings may change during the course of the SSL connection without need to restart it (for instance, the cipher can be changed over time).</p>
<p>State in QSslConfiguration objects cannot be changed.</p>
<p>QSslConfiguration can be used with <a href="qsslsocket.html">QSslSocket</a> and the Network Access API.</p>
<p>Note that changing settings in QSslConfiguration is not enough to change the settings in the related SSL connection. You must call setSslConfiguration on a modified QSslConfiguration object to achieve that. The following example illustrates how to change the protocol to TLSv1 in a <a href="qsslsocket.html">QSslSocket</a> object:</p>
<pre class="cpp"> <span class="type">QSslConfiguration</span> config <span class="operator">=</span> sslSocket<span class="operator">.</span>sslConfiguration();
 config<span class="operator">.</span><a href="qsslconfiguration.html#setProtocol">setProtocol</a>(<span class="type"><a href="qssl.html">QSsl</a></span><span class="operator">::</span>TlsV1);
 sslSocket<span class="operator">.</span>setSslConfiguration(config);</pre>
<p><a href="qsslsocket.html">QSslSocket</a>, <a href="qnetworkaccessmanager.html">QNetworkAccessManager</a>, <a href="qsslsocket.html#sslConfiguration">QSslSocket::sslConfiguration</a>(), <a href="qsslsocket.html#setSslConfiguration">QSslSocket::setSslConfiguration</a>()</p>
</div>
<p><b>See also </b><a href="qssl.html#SslProtocol-enum">QSsl::SslProtocol</a>, <a href="qsslcertificate.html">QSslCertificate</a>, <a href="qsslcipher.html">QSslCipher</a>, and <a href="qsslkey.html">QSslKey</a>.</p>
<!-- @@@QSslConfiguration -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QSslConfiguration[overload1]$$$QSslConfiguration -->
<h3 class="fn"><a name="QSslConfiguration"></a>QSslConfiguration::<span class="name">QSslConfiguration</span> ()</h3>
<p>Constructs an empty SSL configuration. This configuration contains no valid settings and the state will be empty. <a href="qsslconfiguration.html#isNull">isNull</a>() will return true after this constructor is called.</p>
<p>Once any setter methods are called, <a href="qsslconfiguration.html#isNull">isNull</a>() will return false.</p>
<!-- @@@QSslConfiguration -->
<!-- $$$QSslConfiguration$$$QSslConfigurationconstQSslConfiguration& -->
<h3 class="fn"><a name="QSslConfiguration-2"></a>QSslConfiguration::<span class="name">QSslConfiguration</span> ( const <span class="type">QSslConfiguration</span> &amp; <i>other</i> )</h3>
<p>Copies the configuration and state of <i>other</i>. If <i>other</i> is null, this object will be null too.</p>
<!-- @@@QSslConfiguration -->
<!-- $$$~QSslConfiguration[overload1]$$$~QSslConfiguration -->
<h3 class="fn"><a name="dtor.QSslConfiguration"></a>QSslConfiguration::<span class="name">~QSslConfiguration</span> ()</h3>
<p>Releases any resources held by <a href="qsslconfiguration.html">QSslConfiguration</a>.</p>
<!-- @@@~QSslConfiguration -->
<!-- $$$caCertificates[overload1]$$$caCertificates -->
<h3 class="fn"><a name="caCertificates"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qsslcertificate.html">QSslCertificate</a></span>&gt; QSslConfiguration::<span class="name">caCertificates</span> () const</h3>
<p>Returns this connection's CA certificate database. The CA certificate database is used by the socket during the handshake phase to validate the peer's certificate. It can be modified prior to the handshake with <a href="qsslconfiguration.html#setCaCertificates">setCaCertificates</a>(), or with <a href="qsslsocket.html">QSslSocket</a>'s <a href="qsslsocket.html#addCaCertificate">addCaCertificate()</a> and <a href="qsslsocket.html#addCaCertificates">addCaCertificates()</a>.</p>
<p><b>See also </b><a href="qsslconfiguration.html#setCaCertificates">setCaCertificates</a>().</p>
<!-- @@@caCertificates -->
<!-- $$$ciphers[overload1]$$$ciphers -->
<h3 class="fn"><a name="ciphers"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qsslcipher.html">QSslCipher</a></span>&gt; QSslConfiguration::<span class="name">ciphers</span> () const</h3>
<p>Returns this connection's current cryptographic cipher suite. This list is used during the handshake phase for choosing a session cipher. The returned list of ciphers is ordered by descending preference. (i.e&#x2e;, the first cipher in the list is the most preferred cipher). The session cipher will be the first one in the list that is also supported by the peer.</p>
<p>By default, the handshake phase can choose any of the ciphers supported by this system's SSL libraries, which may vary from system to system. The list of ciphers supported by this system's SSL libraries is returned by <a href="qsslsocket.html#supportedCiphers">QSslSocket::supportedCiphers</a>(). You can restrict the list of ciphers used for choosing the session cipher for this socket by calling <a href="qsslconfiguration.html#setCiphers">setCiphers</a>() with a subset of the supported ciphers. You can revert to using the entire set by calling <a href="qsslconfiguration.html#setCiphers">setCiphers</a>() with the list returned by <a href="qsslsocket.html#supportedCiphers">QSslSocket::supportedCiphers</a>().</p>
<p><b>See also </b><a href="qsslconfiguration.html#setCiphers">setCiphers</a>() and <a href="qsslsocket.html#supportedCiphers">QSslSocket::supportedCiphers</a>().</p>
<!-- @@@ciphers -->
<!-- $$$defaultConfiguration[overload1]$$$defaultConfiguration -->
<h3 class="fn"><a name="defaultConfiguration"></a><span class="type">QSslConfiguration</span> QSslConfiguration::<span class="name">defaultConfiguration</span> ()<tt> [static]</tt></h3>
<p>Returns the default SSL configuration to be used in new SSL connections.</p>
<p>The default SSL configuration consists of:</p>
<ul>
<li>no local certificate and no private key</li>
<li>protocol SecureProtocols (meaning either TLS 1.0 or SSL 3 will be used)</li>
<li>the system's default CA certificate list</li>
<li>the cipher list equal to the list of the SSL libraries' supported SSL ciphers</li>
</ul>
<p><b>See also </b><a href="qsslsocket.html#supportedCiphers">QSslSocket::supportedCiphers</a>() and <a href="qsslconfiguration.html#setDefaultConfiguration">setDefaultConfiguration</a>().</p>
<!-- @@@defaultConfiguration -->
<!-- $$$isNull[overload1]$$$isNull -->
<h3 class="fn"><a name="isNull"></a><span class="type">bool</span> QSslConfiguration::<span class="name">isNull</span> () const</h3>
<p>Returns true if this is a null <a href="qsslconfiguration.html">QSslConfiguration</a> object.</p>
<p>A <a href="qsslconfiguration.html">QSslConfiguration</a> object is null if it has been default-constructed and no setter methods have been called.</p>
<p><b>See also </b><a href="qsslconfiguration.html#setProtocol">setProtocol</a>(), <a href="qsslconfiguration.html#setLocalCertificate">setLocalCertificate</a>(), <a href="qsslconfiguration.html#setPrivateKey">setPrivateKey</a>(), <a href="qsslconfiguration.html#setCiphers">setCiphers</a>(), and <a href="qsslconfiguration.html#setCaCertificates">setCaCertificates</a>().</p>
<!-- @@@isNull -->
<!-- $$$localCertificate[overload1]$$$localCertificate -->
<h3 class="fn"><a name="localCertificate"></a><span class="type"><a href="qsslcertificate.html">QSslCertificate</a></span> QSslConfiguration::<span class="name">localCertificate</span> () const</h3>
<p>Returns the certificate to be presented to the peer during the SSL handshake process.</p>
<p><b>See also </b><a href="qsslconfiguration.html#setLocalCertificate">setLocalCertificate</a>().</p>
<!-- @@@localCertificate -->
<!-- $$$peerCertificate[overload1]$$$peerCertificate -->
<h3 class="fn"><a name="peerCertificate"></a><span class="type"><a href="qsslcertificate.html">QSslCertificate</a></span> QSslConfiguration::<span class="name">peerCertificate</span> () const</h3>
<p>Returns the peer's digital certificate (i.e&#x2e;, the immediate certificate of the host you are connected to), or a null certificate, if the peer has not assigned a certificate.</p>
<p>The peer certificate is checked automatically during the handshake phase, so this function is normally used to fetch the certificate for display or for connection diagnostic purposes. It contains information about the peer, including its host name, the certificate issuer, and the peer's public key.</p>
<p>Because the peer certificate is set during the handshake phase, it is safe to access the peer certificate from a slot connected to the <a href="qsslsocket.html#sslErrors">QSslSocket::sslErrors</a>() signal, <a href="qnetworkreply.html#sslErrors">QNetworkReply::sslErrors</a>() signal, or the <a href="qsslsocket.html#encrypted">QSslSocket::encrypted</a>() signal.</p>
<p>If a null certificate is returned, it can mean the SSL handshake failed, or it can mean the host you are connected to doesn't have a certificate, or it can mean there is no connection.</p>
<p>If you want to check the peer's complete chain of certificates, use <a href="qsslconfiguration.html#peerCertificateChain">peerCertificateChain</a>() to get them all at once.</p>
<p><b>See also </b><a href="qsslconfiguration.html#peerCertificateChain">peerCertificateChain</a>(), <a href="qsslsocket.html#sslErrors">QSslSocket::sslErrors</a>(), <a href="qsslsocket.html#ignoreSslErrors">QSslSocket::ignoreSslErrors</a>(), <a href="qnetworkreply.html#sslErrors">QNetworkReply::sslErrors</a>(), and <a href="qnetworkreply.html#ignoreSslErrors">QNetworkReply::ignoreSslErrors</a>().</p>
<!-- @@@peerCertificate -->
<!-- $$$peerCertificateChain[overload1]$$$peerCertificateChain -->
<h3 class="fn"><a name="peerCertificateChain"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qsslcertificate.html">QSslCertificate</a></span>&gt; QSslConfiguration::<span class="name">peerCertificateChain</span> () const</h3>
<p>Returns the peer's chain of digital certificates, starting with the peer's immediate certificate and ending with the CA's certificate.</p>
<p>Peer certificates are checked automatically during the handshake phase. This function is normally used to fetch certificates for display, or for performing connection diagnostics. Certificates contain information about the peer and the certificate issuers, including host name, issuer names, and issuer public keys.</p>
<p>Because the peer certificate is set during the handshake phase, it is safe to access the peer certificate from a slot connected to the <a href="qsslsocket.html#sslErrors">QSslSocket::sslErrors</a>() signal, <a href="qnetworkreply.html#sslErrors">QNetworkReply::sslErrors</a>() signal, or the <a href="qsslsocket.html#encrypted">QSslSocket::encrypted</a>() signal.</p>
<p>If an empty list is returned, it can mean the SSL handshake failed, or it can mean the host you are connected to doesn't have a certificate, or it can mean there is no connection.</p>
<p>If you want to get only the peer's immediate certificate, use <a href="qsslconfiguration.html#peerCertificate">peerCertificate</a>().</p>
<p><b>See also </b><a href="qsslconfiguration.html#peerCertificate">peerCertificate</a>(), <a href="qsslsocket.html#sslErrors">QSslSocket::sslErrors</a>(), <a href="qsslsocket.html#ignoreSslErrors">QSslSocket::ignoreSslErrors</a>(), <a href="qnetworkreply.html#sslErrors">QNetworkReply::sslErrors</a>(), and <a href="qnetworkreply.html#ignoreSslErrors">QNetworkReply::ignoreSslErrors</a>().</p>
<!-- @@@peerCertificateChain -->
<!-- $$$peerVerifyDepth[overload1]$$$peerVerifyDepth -->
<h3 class="fn"><a name="peerVerifyDepth"></a><span class="type">int</span> QSslConfiguration::<span class="name">peerVerifyDepth</span> () const</h3>
<p>Returns the maximum number of certificates in the peer's certificate chain to be checked during the SSL handshake phase, or 0 (the default) if no maximum depth has been set, indicating that the whole certificate chain should be checked.</p>
<p>The certificates are checked in issuing order, starting with the peer's own certificate, then its issuer's certificate, and so on.</p>
<p><b>See also </b><a href="qsslconfiguration.html#setPeerVerifyDepth">setPeerVerifyDepth</a>() and <a href="qsslconfiguration.html#peerVerifyMode">peerVerifyMode</a>().</p>
<!-- @@@peerVerifyDepth -->
<!-- $$$peerVerifyMode[overload1]$$$peerVerifyMode -->
<h3 class="fn"><a name="peerVerifyMode"></a><span class="type"><a href="qsslsocket.html#PeerVerifyMode-enum">QSslSocket::PeerVerifyMode</a></span> QSslConfiguration::<span class="name">peerVerifyMode</span> () const</h3>
<p>Returns the verify mode. This mode decides whether <a href="qsslsocket.html">QSslSocket</a> should request a certificate from the peer (i.e&#x2e;, the client requests a certificate from the server, or a server requesting a certificate from the client), and whether it should require that this certificate is valid.</p>
<p>The default mode is AutoVerifyPeer, which tells <a href="qsslsocket.html">QSslSocket</a> to use VerifyPeer for clients, QueryPeer for servers.</p>
<p><b>See also </b><a href="qsslconfiguration.html#setPeerVerifyMode">setPeerVerifyMode</a>().</p>
<!-- @@@peerVerifyMode -->
<!-- $$$privateKey[overload1]$$$privateKey -->
<h3 class="fn"><a name="privateKey"></a><span class="type"><a href="qsslkey.html">QSslKey</a></span> QSslConfiguration::<span class="name">privateKey</span> () const</h3>
<p>Returns the <a href="qsslkey.html">SSL key</a> assigned to this connection or a null key if none has been assigned yet.</p>
<p><b>See also </b><a href="qsslconfiguration.html#setPrivateKey">setPrivateKey</a>() and <a href="qsslconfiguration.html#localCertificate">localCertificate</a>().</p>
<!-- @@@privateKey -->
<!-- $$$protocol[overload1]$$$protocol -->
<h3 class="fn"><a name="protocol"></a><span class="type"><a href="qssl.html#SslProtocol-enum">QSsl::SslProtocol</a></span> QSslConfiguration::<span class="name">protocol</span> () const</h3>
<p>Returns the protocol setting for this SSL configuration.</p>
<p><b>See also </b><a href="qsslconfiguration.html#setProtocol">setProtocol</a>().</p>
<!-- @@@protocol -->
<!-- $$$sessionCipher[overload1]$$$sessionCipher -->
<h3 class="fn"><a name="sessionCipher"></a><span class="type"><a href="qsslcipher.html">QSslCipher</a></span> QSslConfiguration::<span class="name">sessionCipher</span> () const</h3>
<p>Returns the socket's cryptographic <a href="qsslcipher.html">cipher</a>, or a null cipher if the connection isn't encrypted. The socket's cipher for the session is set during the handshake phase. The cipher is used to encrypt and decrypt data transmitted through the socket.</p>
<p>The SSL infrastructure also provides functions for setting the ordered list of ciphers from which the handshake phase will eventually select the session cipher. This ordered list must be in place before the handshake phase begins.</p>
<p><b>See also </b><a href="qsslconfiguration.html#ciphers">ciphers</a>(), <a href="qsslconfiguration.html#setCiphers">setCiphers</a>(), and <a href="qsslsocket.html#supportedCiphers">QSslSocket::supportedCiphers</a>().</p>
<!-- @@@sessionCipher -->
<!-- $$$setCaCertificates[overload1]$$$setCaCertificatesconstQList<QSslCertificate>& -->
<h3 class="fn"><a name="setCaCertificates"></a><span class="type">void</span> QSslConfiguration::<span class="name">setCaCertificates</span> ( const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qsslcertificate.html">QSslCertificate</a></span>&gt; &amp; <i>certificates</i> )</h3>
<p>Sets this socket's CA certificate database to be <i>certificates</i>. The certificate database must be set prior to the SSL handshake. The CA certificate database is used by the socket during the handshake phase to validate the peer's certificate.</p>
<p><b>See also </b><a href="qsslconfiguration.html#caCertificates">caCertificates</a>().</p>
<!-- @@@setCaCertificates -->
<!-- $$$setCiphers[overload1]$$$setCiphersconstQList<QSslCipher>& -->
<h3 class="fn"><a name="setCiphers"></a><span class="type">void</span> QSslConfiguration::<span class="name">setCiphers</span> ( const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qsslcipher.html">QSslCipher</a></span>&gt; &amp; <i>ciphers</i> )</h3>
<p>Sets the cryptographic cipher suite for this socket to <i>ciphers</i>, which must contain a subset of the ciphers in the list returned by supportedCiphers().</p>
<p>Restricting the cipher suite must be done before the handshake phase, where the session cipher is chosen.</p>
<p><b>See also </b><a href="qsslconfiguration.html#ciphers">ciphers</a>() and <a href="qsslsocket.html#supportedCiphers">QSslSocket::supportedCiphers</a>().</p>
<!-- @@@setCiphers -->
<!-- $$$setDefaultConfiguration[overload1]$$$setDefaultConfigurationconstQSslConfiguration& -->
<h3 class="fn"><a name="setDefaultConfiguration"></a><span class="type">void</span> QSslConfiguration::<span class="name">setDefaultConfiguration</span> ( const <span class="type">QSslConfiguration</span> &amp; <i>configuration</i> )<tt> [static]</tt></h3>
<p>Sets the default SSL configuration to be used in new SSL connections to be <i>configuration</i>. Existing connections are not affected by this call.</p>
<p><b>See also </b><a href="qsslsocket.html#supportedCiphers">QSslSocket::supportedCiphers</a>() and <a href="qsslconfiguration.html#defaultConfiguration">defaultConfiguration</a>().</p>
<!-- @@@setDefaultConfiguration -->
<!-- $$$setLocalCertificate[overload1]$$$setLocalCertificateconstQSslCertificate& -->
<h3 class="fn"><a name="setLocalCertificate"></a><span class="type">void</span> QSslConfiguration::<span class="name">setLocalCertificate</span> ( const <span class="type"><a href="qsslcertificate.html">QSslCertificate</a></span> &amp; <i>certificate</i> )</h3>
<p>Sets the certificate to be presented to the peer during SSL handshake to be <i>certificate</i>.</p>
<p>Setting the certificate once the connection has been established has no effect.</p>
<p>A certificate is the means of identification used in the SSL process. The local certificate is used by the remote end to verify the local user's identity against its list of Certification Authorities. In most cases, such as in HTTP web browsing, only servers identify to the clients, so the client does not send a certificate.</p>
<p><b>See also </b><a href="qsslconfiguration.html#localCertificate">localCertificate</a>().</p>
<!-- @@@setLocalCertificate -->
<!-- $$$setPeerVerifyDepth[overload1]$$$setPeerVerifyDepthint -->
<h3 class="fn"><a name="setPeerVerifyDepth"></a><span class="type">void</span> QSslConfiguration::<span class="name">setPeerVerifyDepth</span> ( <span class="type">int</span> <i>depth</i> )</h3>
<p>Sets the maximum number of certificates in the peer's certificate chain to be checked during the SSL handshake phase, to <i>depth</i>. Setting a depth of 0 means that no maximum depth is set, indicating that the whole certificate chain should be checked.</p>
<p>The certificates are checked in issuing order, starting with the peer's own certificate, then its issuer's certificate, and so on.</p>
<p><b>See also </b><a href="qsslconfiguration.html#peerVerifyDepth">peerVerifyDepth</a>() and <a href="qsslconfiguration.html#setPeerVerifyMode">setPeerVerifyMode</a>().</p>
<!-- @@@setPeerVerifyDepth -->
<!-- $$$setPeerVerifyMode[overload1]$$$setPeerVerifyModeQSslSocket::PeerVerifyMode -->
<h3 class="fn"><a name="setPeerVerifyMode"></a><span class="type">void</span> QSslConfiguration::<span class="name">setPeerVerifyMode</span> ( <span class="type"><a href="qsslsocket.html#PeerVerifyMode-enum">QSslSocket::PeerVerifyMode</a></span> <i>mode</i> )</h3>
<p>Sets the verify mode to <i>mode</i>. This mode decides whether <a href="qsslsocket.html">QSslSocket</a> should request a certificate from the peer (i.e&#x2e;, the client requests a certificate from the server, or a server requesting a certificate from the client), and whether it should require that this certificate is valid.</p>
<p>The default mode is AutoVerifyPeer, which tells <a href="qsslsocket.html">QSslSocket</a> to use VerifyPeer for clients, QueryPeer for servers.</p>
<p><b>See also </b><a href="qsslconfiguration.html#peerVerifyMode">peerVerifyMode</a>().</p>
<!-- @@@setPeerVerifyMode -->
<!-- $$$setPrivateKey[overload1]$$$setPrivateKeyconstQSslKey& -->
<h3 class="fn"><a name="setPrivateKey"></a><span class="type">void</span> QSslConfiguration::<span class="name">setPrivateKey</span> ( const <span class="type"><a href="qsslkey.html">QSslKey</a></span> &amp; <i>key</i> )</h3>
<p>Sets the connection's private <a href="qsslkey.html">key</a> to <i>key</i>. The private key and the local <a href="qsslcertificate.html">certificate</a> are used by clients and servers that must prove their identity to SSL peers.</p>
<p>Both the key and the local certificate are required if you are creating an SSL server socket. If you are creating an SSL client socket, the key and local certificate are required if your client must identify itself to an SSL server.</p>
<p><b>See also </b><a href="qsslconfiguration.html#privateKey">privateKey</a>() and <a href="qsslconfiguration.html#setLocalCertificate">setLocalCertificate</a>().</p>
<!-- @@@setPrivateKey -->
<!-- $$$setProtocol[overload1]$$$setProtocolQSsl::SslProtocol -->
<h3 class="fn"><a name="setProtocol"></a><span class="type">void</span> QSslConfiguration::<span class="name">setProtocol</span> ( <span class="type"><a href="qssl.html#SslProtocol-enum">QSsl::SslProtocol</a></span> <i>protocol</i> )</h3>
<p>Sets the protocol setting for this configuration to be <i>protocol</i>.</p>
<p>Setting the protocol once the connection has already been established has no effect.</p>
<p><b>See also </b><a href="qsslconfiguration.html#protocol">protocol</a>().</p>
<!-- @@@setProtocol -->
<!-- $$$setSslOption[overload1]$$$setSslOptionQSsl::SslOptionbool -->
<h3 class="fn"><a name="setSslOption"></a><span class="type">void</span> QSslConfiguration::<span class="name">setSslOption</span> ( <span class="type"><a href="qssl.html#SslOption-enum">QSsl::SslOption</a></span> <i>option</i>, <span class="type">bool</span> <i>on</i> )</h3>
<p>Enables or disables an SSL compatibility option.</p>
<p><b>See also </b>testSSlOption().</p>
<!-- @@@setSslOption -->
<!-- $$$testSslOption[overload1]$$$testSslOptionQSsl::SslOption -->
<h3 class="fn"><a name="testSslOption"></a><span class="type">bool</span> QSslConfiguration::<span class="name">testSslOption</span> ( <span class="type"><a href="qssl.html#SslOption-enum">QSsl::SslOption</a></span> <i>option</i> ) const</h3>
<p>Returns true if the specified SSL compatibility option is enabled.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also </b>testSSlOption().</p>
<!-- @@@testSslOption -->
<!-- $$$operator!=[overload1]$$$operator!=constQSslConfiguration& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QSslConfiguration::<span class="name">operator!=</span> ( const <span class="type">QSslConfiguration</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this <a href="qsslconfiguration.html">QSslConfiguration</a> differs from <i>other</i>. Two <a href="qsslconfiguration.html">QSslConfiguration</a> objects are considered different if any state or setting is different.</p>
<p><b>See also </b><a href="qsslconfiguration.html#operator-eq-eq">operator==</a>().</p>
<!-- @@@operator!= -->
<!-- $$$operator=[overload1]$$$operator=constQSslConfiguration& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">QSslConfiguration</span> &amp; QSslConfiguration::<span class="name">operator=</span> ( const <span class="type">QSslConfiguration</span> &amp; <i>other</i> )</h3>
<p>Copies the configuration and state of <i>other</i>. If <i>other</i> is null, this object will be null too.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQSslConfiguration& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QSslConfiguration::<span class="name">operator==</span> ( const <span class="type">QSslConfiguration</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this <a href="qsslconfiguration.html">QSslConfiguration</a> object is equal to <i>other</i>.</p>
<p>Two <a href="qsslconfiguration.html">QSslConfiguration</a> objects are considered equal if they have the exact same settings and state.</p>
<p><b>See also </b><a href="qsslconfiguration.html#operator-not-eq">operator!=</a>().</p>
<!-- @@@operator== -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      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>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      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>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>