gdata.tlslite.constants
index
/usr/local/google/home/afshar/src/external-gdata-release/google3/src/gdata/tlslite/constants.py

Constants used in various places.

 
Classes
       
AlertDescription
AlertLevel
CertificateType
CipherSuite
ContentType
Fault
HandshakeType

 
class AlertDescription
    @cvar bad_record_mac: A TLS record failed to decrypt properly.
 
If this occurs during a shared-key or SRP handshake it most likely
indicates a bad password.  It may also indicate an implementation
error, or some tampering with the data in transit.
 
This alert will be signalled by the server if the SRP password is bad.  It
may also be signalled by the server if the SRP username is unknown to the
server, but it doesn't wish to reveal that fact.
 
This alert will be signalled by the client if the shared-key username is
bad.
 
@cvar handshake_failure: A problem occurred while handshaking.
 
This typically indicates a lack of common ciphersuites between client and
server, or some other disagreement (about SRP parameters or key sizes,
for example).
 
@cvar protocol_version: The other party's SSL/TLS version was unacceptable.
 
This indicates that the client and server couldn't agree on which version
of SSL or TLS to use.
 
@cvar user_canceled: The handshake is being cancelled for some reason.
 
  Data and other attributes defined here:
access_denied = 49
bad_certificate = 42
bad_record_mac = 20
certificate_expired = 45
certificate_revoked = 44
certificate_unknown = 46
close_notify = 0
decode_error = 50
decompression_failure = 30
decrypt_error = 51
decryption_failed = 21
export_restriction = 60
handshake_failure = 40
illegal_parameter = 47
insufficient_security = 71
internal_error = 80
missing_srp_username = 121
no_certificate = 41
no_renegotiation = 100
protocol_version = 70
record_overflow = 22
unexpected_message = 10
unknown_ca = 48
unknown_srp_username = 120
unsupported_certificate = 43
untrusted_srp_parameters = 122
user_canceled = 90

 
class AlertLevel
     Data and other attributes defined here:
fatal = 2
warning = 1

 
class CertificateType
     Data and other attributes defined here:
cryptoID = 2
openpgp = 1
x509 = 0

 
class CipherSuite
     Static methods defined here:
getRsaSuites(ciphers)
getSrpRsaSuites(ciphers)
getSrpSuites(ciphers)

Data and other attributes defined here:
TLS_RSA_WITH_3DES_EDE_CBC_SHA = 10
TLS_RSA_WITH_AES_128_CBC_SHA = 47
TLS_RSA_WITH_AES_256_CBC_SHA = 53
TLS_RSA_WITH_RC4_128_SHA = 5
TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA = 81
TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA = 84
TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA = 87
TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA = 80
TLS_SRP_SHA_WITH_AES_128_CBC_SHA = 83
TLS_SRP_SHA_WITH_AES_256_CBC_SHA = 86
aes128Suites = [83, 84, 47]
aes256Suites = [86, 87, 53]
rc4Suites = [5]
rsaSuites = [10, 47, 53, 5]
srpRsaSuites = [81, 84, 87]
srpSuites = [80, 83, 86]
tripleDESSuites = [80, 81, 10]

 
class ContentType
     Data and other attributes defined here:
alert = 21
all = (20, 21, 22, 23)
application_data = 23
change_cipher_spec = 20
handshake = 22

 
class Fault
     Data and other attributes defined here:
badA = 103
badB = 201
badFinished = 300
badIdentifier = 401
badMAC = 301
badPadding = 302
badPassword = 102
badPremasterPadding = 501
badSharedKey = 402
badUsername = 101
badVerifyMessage = 601
clientCertFaults = [601]
clientNoAuthFaults = [501, 502]
clientSharedKeyFaults = [401, 402]
clientSrpFaults = [101, 102, 103]
faultAlerts = {101: (120, 20), 102: (20,), 103: (47,), 300: (51,), 301: (20,), 302: (20,), 401: (40,), 402: (20,), 501: (20,), 502: (20,), ...}
faultNames = {101: 'bad username', 102: 'bad password', 103: 'bad A', 300: 'bad finished message', 301: 'bad MAC', 302: 'bad padding', 401: 'bad identifier', 402: 'bad sharedkey', 501: 'bad premaster padding', 502: 'short premaster secret', ...}
genericFaults = [300, 301, 302]
serverFaults = [201]
shortPremasterSecret = 502

 
class HandshakeType
     Data and other attributes defined here:
certificate = 11
certificate_request = 13
certificate_verify = 15
client_hello = 1
client_key_exchange = 16
finished = 20
hello_request = 0
server_hello = 2
server_hello_done = 14
server_key_exchange = 12