Make it possible to request client certificates.

This commit is contained in:
Jonathan Schleifer 2013-01-19 00:01:38 +01:00
parent 9ce891d19b
commit 380d99c7dc
2 changed files with 17 additions and 0 deletions

View file

@ -223,6 +223,9 @@ locking_callback(int mode, int n, const char *file, int line)
socket: self];
}
if (requestsClientCertificates)
SSL_set_verify(newSocket->ssl, SSL_VERIFY_PEER, NULL);
SSL_set_accept_state(newSocket->ssl);
if (!SSL_use_PrivateKey_file(newSocket->ssl, [privateKeyFile
@ -352,6 +355,16 @@ locking_callback(int mode, int n, const char *file, int line)
OF_GETTER(certificateFile, YES)
}
- (void)setRequestsClientCertificates: (BOOL)enabled
{
requestsClientCertificates = enabled;
}
- (BOOL)requestsClientCertificates
{
return requestsClientCertificates;
}
- (OFDataArray*)channelBindingDataWithType: (OFString*)type
{
size_t length;