Conform to OFTLSSocket.

Still a few FIXMEs / TODOs.
This commit is contained in:
Jonathan Schleifer 2013-03-31 12:04:53 +02:00
parent 89c705d9ed
commit ecbaa8ed20
3 changed files with 64 additions and 72 deletions

View file

@ -24,31 +24,24 @@
#include <openssl/ssl.h>
#import <ObjFW/OFTCPSocket.h>
#import <ObjFW/OFTLSSocket.h>
@class X509Certificate;
@interface SSLSocket: OFTCPSocket
@interface SSLSocket: OFTCPSocket <OFTLSSocket>
{
SSL *_SSL;
OFString *_privateKeyFile, *_certificateFile;
OFString *_certificateFile, *_privateKeyFile;
const char *_privateKeyPassphrase;
bool _requestsClientCertificates;
}
#ifdef OF_HAVE_PROPERTIES
@property (copy) OFString *privateKeyFile, *certificateFile;
@property bool requestsClientCertificates;
#endif
- initWithSocket: (OFTCPSocket*)socket;
- initWithSocket: (OFTCPSocket*)socket
privateKeyFile: (OFString*)privateKeyFile
certificateFile: (OFString*)certificateFile;
- (void)SSL_super_close;
- (SSLSocket*)accept; /* Changes the return type */
- (void)setPrivateKeyFile: (OFString*)file;
- (OFString*)privateKeyFile;
- (void)setCertificateFile: (OFString*)file;
- (OFString*)certificateFile;
- (void)setRequestsClientCertificates: (bool)enabled;
- (bool)requestsClientCertificates;
- (OFDataArray*)channelBindingDataWithType: (OFString*)type;