ObjFW
 All Classes Functions Variables
Instance Methods | List of all members
<OFTLSSocket> Protocol Referenceabstract

A protocol that should be implemented by 3rd party libraries implementing TLS. More...

#import <OFTLSSocket.h>

Instance Methods

(void) - setDelegate:
 Sets a delegate for the TLS socket.
 
(id< OFTLSSocketDelegate >) - delegate
 Returns the delegate used by the TLS socket.
 
(void) - setCertificateFile:
 Sets the path to the X.509 certificate file to use.
 
(OFString *) - certificateFile
 Returns the path of the X.509 certificate file used by the TLS socket.
 
(void) - setPrivateKeyFile:
 Sets the path to the PKCS#8 private key file to use.
 
(OFString *) - privateKeyFile
 Returns the path of the PKCS#8 private key file used by the TLS socket.
 
(void) - setPrivateKeyPassphrase:
 Sets the passphrase to decrypt the PKCS#8 private key file.
 
(const char *) - privateKeyPassphrase
 Returns the passphrase to decrypt the PKCS#8 private key file.
 

Detailed Description

A protocol that should be implemented by 3rd party libraries implementing TLS.

Method Documentation

- (OFString*) certificateFile

Returns the path of the X.509 certificate file used by the TLS socket.

Returns
The path of the X.509 certificate file used by the TLS socket
- (id <OFTLSSocketDelegate>) delegate

Returns the delegate used by the TLS socket.

Returns
The delegate used by the TLS socket
- (OFString*) privateKeyFile

Returns the path of the PKCS#8 private key file used by the TLS socket.

Returns
The path of the PKCS#8 private key file used by the TLS socket
- (const char*) privateKeyPassphrase

Returns the passphrase to decrypt the PKCS#8 private key file.

Warning
You should not copy this to insecure memory which is swappable!
Returns
The passphrase to decrypt the PKCS#8 private key file
- (void) setCertificateFile: (OFString *)  certificateFile

Sets the path to the X.509 certificate file to use.

Parameters
certificateFileThe path to the X.509 certificate file
- (void) setDelegate: (id< OFTLSSocketDelegate >)  delegate

Sets a delegate for the TLS socket.

Parameters
delegateThe delegate to use
- (void) setPrivateKeyFile: (OFString *)  privateKeyFile

Sets the path to the PKCS#8 private key file to use.

Parameters
privateKeyFileThe path to the PKCS#8 private key file
- (void) setPrivateKeyPassphrase: (const char *)  privateKeyPassphrase

Sets the passphrase to decrypt the PKCS#8 private key file.

Warning
You have to ensure that this is in secure memory protected from swapping! This is also the reason why this is not an OFString.
Parameters
privateKeyPassphraseThe passphrase to decrypt the PKCS#8 private key file

The documentation for this protocol was generated from the following file: