Conform to OFTLSSocket

This also introduces automatic certificate verification and enables it
by default, as required by OFTLSSocket.

There are still TODOs until OFTLSSocket is fully implemented.
This commit is contained in:
Jonathan Schleifer 2015-05-24 21:33:09 +02:00
parent 01b588e4d6
commit eed791dff1
No known key found for this signature in database
GPG key ID: 33E61C63EB4AE7B5
4 changed files with 139 additions and 36 deletions

View file

@ -33,17 +33,19 @@
SSL *_SSL;
OFString *_certificateFile, *_privateKeyFile;
const char *_privateKeyPassphrase;
bool _requestsClientCertificates;
bool _certificateVerificationEnabled;
bool _requestClientCertificatesEnabled;
}
#ifdef OF_HAVE_PROPERTIES
@property bool requestsClientCertificates;
@property (getter=isRequestClientCertificatesEnabled)
bool requestClientCertificatesEnabled;
#endif
- initWithSocket: (OFTCPSocket*)socket;
- (void)SSL_super_close;
- (void)setRequestsClientCertificates: (bool)enabled;
- (bool)requestsClientCertificates;
- (void)setRequestClientCertificatesEnabled: (bool)enabled;
- (bool)isRequestClientCertificatesEnabled;
- (OFDataArray*)channelBindingDataWithType: (OFString*)type;
- (X509Certificate*)peerCertificate;
- (void)verifyPeerCertificate;