On Darwin SSL, add ability to skip peer verification.
This commit is contained in:
		@@ -1 +1 @@
 | 
				
			|||||||
7.3.4
 | 
					7.3.5
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,10 @@
 | 
				
			|||||||
# Changelog
 | 
					# Changelog
 | 
				
			||||||
All notable changes to this project will be documented in this file.
 | 
					All notable changes to this project will be documented in this file.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## [7.3.5] - 2019-11-20
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- On Darwin SSL, add ability to skip peer verification.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## [7.3.4] - 2019-11-20
 | 
					## [7.3.4] - 2019-11-20
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- 32-bits compile fix, courtesy of @fcojavmc
 | 
					- 32-bits compile fix, courtesy of @fcojavmc
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -168,10 +168,32 @@ namespace ix
 | 
				
			|||||||
            SSLSetProtocolVersionMin(_sslContext, kTLSProtocol12);
 | 
					            SSLSetProtocolVersionMin(_sslContext, kTLSProtocol12);
 | 
				
			||||||
            SSLSetPeerDomainName(_sslContext, host.c_str(), host.size());
 | 
					            SSLSetPeerDomainName(_sslContext, host.c_str(), host.size());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (_tlsOptions.isPeerVerifyDisabled())
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                Boolean option(1);
 | 
				
			||||||
 | 
					                SSLSetSessionOption(_sslContext, kSSLSessionOptionBreakOnServerAuth, option);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                do
 | 
					                do
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    status = SSLHandshake(_sslContext);
 | 
					                    status = SSLHandshake(_sslContext);
 | 
				
			||||||
                } while (errSSLWouldBlock == status || errSSLServerAuthCompleted == status);
 | 
					                } while (errSSLWouldBlock == status || errSSLServerAuthCompleted == status);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if (status == errSSLServerAuthCompleted)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    // proceed with the handshake
 | 
				
			||||||
 | 
					                    do
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        status = SSLHandshake(_sslContext);
 | 
				
			||||||
 | 
					                    } while (errSSLWouldBlock == status || errSSLServerAuthCompleted == status);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                do
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    status = SSLHandshake(_sslContext);
 | 
				
			||||||
 | 
					                } while (errSSLWouldBlock == status || errSSLServerAuthCompleted == status);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (noErr != status)
 | 
					        if (noErr != status)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,4 +6,4 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#pragma once
 | 
					#pragma once
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define IX_WEBSOCKET_VERSION "7.3.4"
 | 
					#define IX_WEBSOCKET_VERSION "7.3.5"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user