Qt 4.8
Enumerations
QSsl Namespace Reference

The QSsl namespace declares enums common to all SSL classes in QtNetwork. More...

Enumerations

enum  AlternateNameEntryType { EmailEntry, DnsEntry }
 Describes the key types for alternate name entries in QSslCertificate. More...
 
enum  EncodingFormat { Pem, Der }
 Describes supported encoding formats for certificates and keys. More...
 
enum  KeyAlgorithm { Rsa, Dsa }
 Describes the different key algorithms supported by QSslKey. More...
 
enum  KeyType { PrivateKey, PublicKey }
 Describes the two types of keys QSslKey supports. More...
 
enum  SslOption {
  SslOptionDisableEmptyFragments = 0x01, SslOptionDisableSessionTickets = 0x02, SslOptionDisableCompression = 0x04, SslOptionDisableServerNameIndication = 0x08,
  SslOptionDisableLegacyRenegotiation = 0x10
}
 Describes the options that can be used to control the details of SSL behaviour. More...
 
enum  SslProtocol {
  SslV3, SslV2, TlsV1, AnyProtocol,
  TlsV1SslV3, SecureProtocols, UnknownProtocol = -1
}
 Describes the protocol of the cipher. More...
 

Detailed Description

The QSsl namespace declares enums common to all SSL classes in QtNetwork.

Since
4.3
Attention
Module: QtNetwork

Enumeration Type Documentation

◆ AlternateNameEntryType

Describes the key types for alternate name entries in QSslCertificate.

  • EmailEntry An email entry; the entry contains an email address that the certificate is valid for.
  • DnsEntry A DNS host name entry; the entry contains a host name entry that the certificate is valid for. The entry may contain wildcards.
See also
QSslCertificate::alternateSubjectNames()
Enumerator
EmailEntry 
DnsEntry 

Definition at line 71 of file qssl.h.

71  {
72  EmailEntry,
73  DnsEntry
74  };

◆ EncodingFormat

Describes supported encoding formats for certificates and keys.

  • Pem The PEM format.
  • Der The DER format.
Enumerator
Pem 
Der 

Definition at line 61 of file qssl.h.

61  {
62  Pem,
63  Der
64  };
Definition: qssl.h:62
Definition: qssl.h:63

◆ KeyAlgorithm

Describes the different key algorithms supported by QSslKey.

  • Rsa The RSA algorithm.
  • Dsa The DSA algorithm.
Enumerator
Rsa 
Dsa 

Definition at line 66 of file qssl.h.

66  {
67  Rsa,
68  Dsa
69  };
Definition: qssl.h:68
Definition: qssl.h:67

◆ KeyType

Describes the two types of keys QSslKey supports.

  • PrivateKey A private key.
  • PublicKey A public key.
Enumerator
PrivateKey 
PublicKey 

Definition at line 56 of file qssl.h.

56  {
57  PrivateKey,
58  PublicKey
59  };

◆ SslOption

Describes the options that can be used to control the details of SSL behaviour.

These options are generally used to turn features off to work around buggy servers.

  • SslOptionDisableEmptyFragments Disables the insertion of empty fragments into the data when using block ciphers. When enabled, this prevents some attacks (such as the BEAST attack), however it is incompatible with some servers.
  • SslOptionDisableSessionTickets Disables the SSL session ticket extension. This can cause slower connection setup, however some servers are not compatible with the extension.
  • SslOptionDisableCompression Disables the SSL compression extension. When enabled, this allows the data being passed over SSL to be compressed, however some servers are not compatible with this extension.
  • SslOptionDisableServerNameIndication Disables the SSL server name indication extension. When enabled, this tells the server the virtual host being accessed allowing it to respond with the correct certificate.
  • SslOptionDisableLegacyRenegotiation Disables the older insecure mechanism for renegotiating the connection parameters. When enabled, this option can allow connections for legacy servers, but it introduces the possibility that an attacker could inject plaintext into the SSL session.

By default, SslOptionDisableEmptyFragments is turned on since this causes problems with a large number of servers. SslOptionDisableLegacyRenegotiation is also turned on, since it introduces a security risk. SslOptionDisableCompression is turned on to prevent the attack publicised by CRIME. The other options are turned off.

Note: Availability of above options depends on the version of the SSL backend in use.

Enumerator
SslOptionDisableEmptyFragments 
SslOptionDisableSessionTickets 
SslOptionDisableCompression 
SslOptionDisableServerNameIndication 
SslOptionDisableLegacyRenegotiation 

Definition at line 86 of file qssl.h.

◆ SslProtocol

Describes the protocol of the cipher.

  • SslV3 SSLv3
  • SslV2 SSLv2
  • TlsV1 TLSv1
  • UnknownProtocol The cipher's protocol cannot be determined.
  • AnyProtocol The socket understands SSLv2, SSLv3, and TLSv1. This value is used by QSslSocket only.
  • TlsV1SslV3 On the client side, this will send a TLS 1.0 Client Hello, enabling TLSv1 and SSLv3 connections. On the server side, this will enable both SSLv3 and TLSv1 connections.
  • SecureProtocols The default option, using protocols known to be secure; currently behaves like TlsV1SslV3.

Note: most servers using SSL understand both versions (2 and 3), but it is recommended to use the latest version only for security reasons. However, SSL and TLS are not compatible with each other: if you get unexpected handshake failures, verify that you chose the correct setting for your protocol.

Enumerator
SslV3 
SslV2 
TlsV1 
AnyProtocol 
TlsV1SslV3 
SecureProtocols 
UnknownProtocol 

Definition at line 76 of file qssl.h.

76  {
77  SslV3,
78  SslV2,
79  TlsV1, // ### Qt 5: rename to TlsV1_0 or so
81  TlsV1SslV3,
83  UnknownProtocol = -1
84  };