ObjFW
Loading...
Searching...
No Matches
OFTLSStream.h File Reference
import "OFStream.h"
import "OFRunLoop.h"
import "OFX509Certificate.h"

Go to the source code of this file.

Classes

protocol  <OFTLSStreamDelegate>
 
class  OFTLSStream
 A class that provides Transport Layer Security on top of a stream. More...
 

Enumerations

enum  OFTLSStreamErrorCode {
  OFTLSStreamErrorCodeUnknown , OFTLSStreamErrorCodeInitializationFailed , OFTLSStreamErrorCodeCertificateVerificationFailed , OFTLSStreamErrorCodeCertificateIssuerUntrusted ,
  OFTLSStreamErrorCodeCertificateNameMismatch , OFTLSStreamErrorCodeCertificatedExpired , OFTLSStreamErrorCodeCertificateRevoked
}
 An enum representing an error of an OFTLSStream. More...
 

Functions

OFStringOFTLSStreamErrorCodeDescription (OFTLSStreamErrorCode errorCode)
 Returns a string description for the TLS stream error code.
 

Variables

Class OFTLSStreamImplementation
 The implementation for OFTLSStream to use.
 

Enumeration Type Documentation

◆ OFTLSStreamErrorCode

An enum representing an error of an OFTLSStream.

Enumerator
OFTLSStreamErrorCodeUnknown 

An unknown error.

OFTLSStreamErrorCodeInitializationFailed 

Initialization of the TLS context failed.

OFTLSStreamErrorCodeCertificateVerificationFailed 

Failed to verify certificate.

OFTLSStreamErrorCodeCertificateIssuerUntrusted 

The certificate has an untrusted or unknown issuer.

OFTLSStreamErrorCodeCertificateNameMismatch 

The certificate is for a different name.

OFTLSStreamErrorCodeCertificatedExpired 

The certificate has expired or is not yet valid.

OFTLSStreamErrorCodeCertificateRevoked 

The certificate has been revoked.

Function Documentation

◆ OFTLSStreamErrorCodeDescription()

OFString * OFTLSStreamErrorCodeDescription ( OFTLSStreamErrorCode errorCode)
extern

Returns a string description for the TLS stream error code.

Parameters
errorCodeThe error code to return the description for
Returns
A string description for the TLS stream error code

Variable Documentation

◆ OFTLSStreamImplementation

Class OFTLSStreamImplementation
extern

The implementation for OFTLSStream to use.

This can be set to a class that is always used for OFTLSStream. This is useful to either force a specific implementation or to use one that ObjFW does not know about.