]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
Crypto: Add Curve25519 C code to project
authorRoopesh Chander <roop@roopc.net>
Wed, 24 Oct 2018 06:06:20 +0000 (11:36 +0530)
committerRoopesh Chander <roop@roopc.net>
Sat, 27 Oct 2018 09:43:01 +0000 (15:13 +0530)
Signed-off-by: Roopesh Chander <roop@roopc.net>
WireGuard/WireGuard.xcodeproj/project.pbxproj
WireGuard/WireGuard/WireGuard-Bridging-Header.h [new file with mode: 0644]

index 17f8d5b210469ab5e335321b28777607294b66ba..c5b76312908d2619e1bfda05ea3033d34e530ba0 100644 (file)
@@ -10,6 +10,7 @@
                6F628C3D217F09E9003482A3 /* TunnelViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F628C3C217F09E9003482A3 /* TunnelViewModel.swift */; };
                6F628C3F217F3413003482A3 /* DNSServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F628C3E217F3413003482A3 /* DNSServer.swift */; };
                6F628C41217F47DB003482A3 /* TunnelDetailTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F628C40217F47DB003482A3 /* TunnelDetailTableViewController.swift */; };
+               6F6899A62180447E0012E523 /* x25519.c in Sources */ = {isa = PBXBuildFile; fileRef = 6F6899A52180447E0012E523 /* x25519.c */; };
                6F693A562179E556008551C1 /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F693A552179E556008551C1 /* Endpoint.swift */; };
                6F7774E1217181B1006A79B3 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774DF217181B1006A79B3 /* MainViewController.swift */; };
                6F7774E2217181B1006A79B3 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774E0217181B1006A79B3 /* AppDelegate.swift */; };
@@ -27,6 +28,9 @@
                6F628C3C217F09E9003482A3 /* TunnelViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TunnelViewModel.swift; sourceTree = "<group>"; };
                6F628C3E217F3413003482A3 /* DNSServer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DNSServer.swift; sourceTree = "<group>"; };
                6F628C40217F47DB003482A3 /* TunnelDetailTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TunnelDetailTableViewController.swift; sourceTree = "<group>"; };
+               6F689999218043390012E523 /* WireGuard-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WireGuard-Bridging-Header.h"; sourceTree = "<group>"; };
+               6F6899A42180447E0012E523 /* x25519.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = x25519.h; sourceTree = "<group>"; };
+               6F6899A52180447E0012E523 /* x25519.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = x25519.c; sourceTree = "<group>"; };
                6F693A552179E556008551C1 /* Endpoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Endpoint.swift; sourceTree = "<group>"; };
                6F7774DF217181B1006A79B3 /* MainViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
                6F7774E0217181B1006A79B3 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
+               6F6899A32180445A0012E523 /* Crypto */ = {
+                       isa = PBXGroup;
+                       children = (
+                               6F6899A52180447E0012E523 /* x25519.c */,
+                               6F6899A42180447E0012E523 /* x25519.h */,
+                       );
+                       path = Crypto;
+                       sourceTree = "<group>";
+               };
                6F7774DD217181B1006A79B3 /* UI */ = {
                        isa = PBXGroup;
                        children = (
                6FF4AC16211EC46F002C96EB /* WireGuard */ = {
                        isa = PBXGroup;
                        children = (
+                               6F6899A32180445A0012E523 /* Crypto */,
                                6F7774E6217201E0006A79B3 /* Model */,
                                6F7774DD217181B1006A79B3 /* UI */,
                                6F7774ED21722D0C006A79B3 /* VPN */,
                                6FF4AC20211EC472002C96EB /* LaunchScreen.storyboard */,
                                6FF4AC23211EC472002C96EB /* Info.plist */,
                                6FF4AC2B211EC776002C96EB /* Developer.xcconfig */,
+                               6F689999218043390012E523 /* WireGuard-Bridging-Header.h */,
                        );
                        path = WireGuard;
                        sourceTree = "<group>";
                                TargetAttributes = {
                                        6FF4AC13211EC46F002C96EB = {
                                                CreatedOnToolsVersion = 9.4.1;
+                                               LastSwiftMigration = 1000;
                                                SystemCapabilities = {
                                                        com.apple.NetworkExtensions.iOS = {
                                                                enabled = 1;
                                6F7774E421718281006A79B3 /* TunnelsListTableViewController.swift in Sources */,
                                6F7774EF21722D97006A79B3 /* TunnelsManager.swift in Sources */,
                                6F693A562179E556008551C1 /* Endpoint.swift in Sources */,
+                               6F6899A62180447E0012E523 /* x25519.c in Sources */,
                                6F7774E2217181B1006A79B3 /* AppDelegate.swift in Sources */,
                                6F628C3F217F3413003482A3 /* DNSServer.swift in Sources */,
                                6F628C3D217F09E9003482A3 /* TunnelViewModel.swift in Sources */,
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+                               CLANG_ENABLE_MODULES = YES;
                                CODE_SIGN_ENTITLEMENTS = WireGuard/WireGuard.entitlements;
                                CODE_SIGN_STYLE = Automatic;
                                INFOPLIST_FILE = WireGuard/Info.plist;
                                );
                                PRODUCT_BUNDLE_IDENTIFIER = "$(APP_ID)";
                                PRODUCT_NAME = "$(TARGET_NAME)";
+                               SWIFT_OBJC_BRIDGING_HEADER = "WireGuard/WireGuard-Bridging-Header.h";
+                               SWIFT_OPTIMIZATION_LEVEL = "-Onone";
                                SWIFT_VERSION = 4.0;
                                TARGETED_DEVICE_FAMILY = "1,2";
                        };
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+                               CLANG_ENABLE_MODULES = YES;
                                CODE_SIGN_ENTITLEMENTS = WireGuard/WireGuard.entitlements;
                                CODE_SIGN_STYLE = Automatic;
                                INFOPLIST_FILE = WireGuard/Info.plist;
                                );
                                PRODUCT_BUNDLE_IDENTIFIER = "$(APP_ID)";
                                PRODUCT_NAME = "$(TARGET_NAME)";
+                               SWIFT_OBJC_BRIDGING_HEADER = "WireGuard/WireGuard-Bridging-Header.h";
                                SWIFT_VERSION = 4.0;
                                TARGETED_DEVICE_FAMILY = "1,2";
                        };
diff --git a/WireGuard/WireGuard/WireGuard-Bridging-Header.h b/WireGuard/WireGuard/WireGuard-Bridging-Header.h
new file mode 100644 (file)
index 0000000..893b5eb
--- /dev/null
@@ -0,0 +1,5 @@
+//
+//  Use this file to import your target's public headers that you would like to expose to Swift.
+//
+
+#include "x25519.h"