Index: ObjOpenSSL.xcodeproj/project.pbxproj ================================================================== --- ObjOpenSSL.xcodeproj/project.pbxproj +++ ObjOpenSSL.xcodeproj/project.pbxproj @@ -5,18 +5,26 @@ }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ + 4B19F58B14D17250005D52DC /* SSLInvalidCertificateException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B19F58714D17250005D52DC /* SSLInvalidCertificateException.h */; }; + 4B19F58C14D17250005D52DC /* SSLInvalidCertificateException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B19F58814D17250005D52DC /* SSLInvalidCertificateException.m */; }; + 4B19F58D14D17250005D52DC /* X509Certificate.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B19F58914D17250005D52DC /* X509Certificate.h */; }; + 4B19F58E14D17250005D52DC /* X509Certificate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B19F58A14D17250005D52DC /* X509Certificate.m */; }; 4B4F087813A01EEF00B60C3F /* ObjOpenSSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B4F087713A01EEF00B60C3F /* ObjOpenSSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BD0AAEC1341289500445289 /* SSLSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD0AAEA1341289500445289 /* SSLSocket.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BD0AAED1341289500445289 /* SSLSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD0AAEB1341289500445289 /* SSLSocket.m */; }; 4BD0AAEF134128B200445289 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BD0AAEE134128B200445289 /* ObjFW.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 4B1918EA1341272300D82152 /* ObjOpenSSL.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ObjOpenSSL.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 4B19F58714D17250005D52DC /* SSLInvalidCertificateException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SSLInvalidCertificateException.h; path = src/SSLInvalidCertificateException.h; sourceTree = SOURCE_ROOT; }; + 4B19F58814D17250005D52DC /* SSLInvalidCertificateException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SSLInvalidCertificateException.m; path = src/SSLInvalidCertificateException.m; sourceTree = SOURCE_ROOT; }; + 4B19F58914D17250005D52DC /* X509Certificate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = X509Certificate.h; path = src/X509Certificate.h; sourceTree = SOURCE_ROOT; }; + 4B19F58A14D17250005D52DC /* X509Certificate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = X509Certificate.m; path = src/X509Certificate.m; sourceTree = SOURCE_ROOT; }; 4B4F087713A01EEF00B60C3F /* ObjOpenSSL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjOpenSSL.h; path = src/ObjOpenSSL.h; sourceTree = SOURCE_ROOT; }; 4BD0AAE91341286B00445289 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; }; 4BD0AAEA1341289500445289 /* SSLSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SSLSocket.h; path = src/SSLSocket.h; sourceTree = SOURCE_ROOT; }; 4BD0AAEB1341289500445289 /* SSLSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SSLSocket.m; path = src/SSLSocket.m; sourceTree = SOURCE_ROOT; }; 4BD0AAEE134128B200445289 /* ObjFW.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ObjFW.framework; path = Library/Frameworks/ObjFW.framework; sourceTree = SDKROOT; }; @@ -62,12 +70,16 @@ 4B1918F31341272300D82152 /* ObjOpenSSL */ = { isa = PBXGroup; children = ( 4B1918F41341272300D82152 /* Supporting Files */, 4B4F087713A01EEF00B60C3F /* ObjOpenSSL.h */, + 4B19F58714D17250005D52DC /* SSLInvalidCertificateException.h */, + 4B19F58814D17250005D52DC /* SSLInvalidCertificateException.m */, 4BD0AAEA1341289500445289 /* SSLSocket.h */, 4BD0AAEB1341289500445289 /* SSLSocket.m */, + 4B19F58914D17250005D52DC /* X509Certificate.h */, + 4B19F58A14D17250005D52DC /* X509Certificate.m */, ); path = ObjOpenSSL; sourceTree = ""; }; 4B1918F41341272300D82152 /* Supporting Files */ = { @@ -85,10 +97,12 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 4B4F087813A01EEF00B60C3F /* ObjOpenSSL.h in Headers */, 4BD0AAEC1341289500445289 /* SSLSocket.h in Headers */, + 4B19F58B14D17250005D52DC /* SSLInvalidCertificateException.h in Headers */, + 4B19F58D14D17250005D52DC /* X509Certificate.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ @@ -147,10 +161,12 @@ 4B1918E51341272300D82152 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 4BD0AAED1341289500445289 /* SSLSocket.m in Sources */, + 4B19F58C14D17250005D52DC /* SSLInvalidCertificateException.m in Sources */, + 4B19F58E14D17250005D52DC /* X509Certificate.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ @@ -161,11 +177,10 @@ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.6; ONLY_ACTIVE_ARCH = YES; @@ -176,11 +191,10 @@ 4B1918FB1341272300D82152 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.6; SDKROOT = macosx; @@ -195,11 +209,11 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = 4.2; + GCC_VERSION = com.apple.compilers.llvmgcc42; INFOPLIST_FILE = Info.plist; OTHER_CFLAGS = ( "-I/opt/local/include", "-fconstant-string-class=OFConstantString", "-fno-constant-cfstrings", @@ -210,11 +224,10 @@ "-lz", ); PRODUCT_NAME = "$(TARGET_NAME)"; WARNING_CFLAGS = ( "-Wall", - "-Werror", "-Wshorten-64-to-32", "-Wwrite-strings", "-Wcast-align", "-Wpointer-arith", ); @@ -230,11 +243,11 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = 4.2; + GCC_VERSION = com.apple.compilers.llvmgcc42; INFOPLIST_FILE = Info.plist; OTHER_CFLAGS = ( "-I/opt/local/include", "-fconstant-string-class=OFConstantString", "-fno-constant-cfstrings", @@ -245,11 +258,10 @@ "-lz", ); PRODUCT_NAME = "$(TARGET_NAME)"; WARNING_CFLAGS = ( "-Wall", - "-Werror", "-Wshorten-64-to-32", "-Wwrite-strings", "-Wcast-align", "-Wpointer-arith", ); Index: src/SSLInvalidCertificateException.m ================================================================== --- src/SSLInvalidCertificateException.m +++ src/SSLInvalidCertificateException.m @@ -19,10 +19,11 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import "SSLInvalidCertificateException.h" + #import @implementation SSLInvalidCertificateException + exceptionWithClass: (Class)class_ reason: (OFString*)reason_; @@ -65,15 +66,15 @@ { if (description != nil) return description; description = [[OFString alloc] initWithFormat: - @"Invalid certificate, Reason: %@!", reason]; + @"Invalid certificate, Reason: %@!", reason]; return description; } - (OFString*)reason { return reason; } @end Index: src/SSLSocket.h ================================================================== --- src/SSLSocket.h +++ src/SSLSocket.h @@ -37,13 +37,13 @@ @property (copy) OFString *privateKeyFile; @property (copy) OFString *certificateFile; #endif - initWithSocket: (OFTCPSocket*)socket; -- initWithSocket: (OFTCPSocket*)socket - privateKeyFile: (OFString*)privateKeyFile - certificateFile: (OFString*)certificateFile; +- initWithSocket: (OFTCPSocket*)socket + privateKeyFile: (OFString*)privateKeyFile + certificateFile: (OFString*)certificateFile; /* Change the return type */ - (SSLSocket*)accept; - (void)setPrivateKeyFile: (OFString*)file; - (OFString*)privateKeyFile; - (void)setCertificateFile: (OFString*)file; Index: src/SSLSocket.m ================================================================== --- src/SSLSocket.m +++ src/SSLSocket.m @@ -337,11 +337,11 @@ OF_GETTER(certificateFile, YES) } - (OFDataArray*)channelBindingDataWithType: (OFString*)type { - int length; + size_t length; char buffer[64]; OFDataArray *data; if (![type isEqual: @"tls-unique"]) @throw [OFInvalidArgumentException exceptionWithClass: isa