mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-02-11 00:00:08 +08:00
Declare a class which contains credentials
This commit is contained in:
@@ -13,6 +13,12 @@
|
||||
C93779CF1EAE17F50030A362 /* OpenVPNConfigurationValues.mm in Sources */ = {isa = PBXBuildFile; fileRef = C93779CD1EAE17F50030A362 /* OpenVPNConfigurationValues.mm */; };
|
||||
C93779D01EAE18730030A362 /* OpenVPNConfigurationValues.h in Headers */ = {isa = PBXBuildFile; fileRef = C93779CC1EAE17F50030A362 /* OpenVPNConfigurationValues.h */; };
|
||||
C93779D11EAE18760030A362 /* OpenVPNConfigurationValues.mm in Sources */ = {isa = PBXBuildFile; fileRef = C93779CD1EAE17F50030A362 /* OpenVPNConfigurationValues.mm */; };
|
||||
C93779D51EAE32670030A362 /* OpenVPNCredentials.h in Headers */ = {isa = PBXBuildFile; fileRef = C93779D31EAE32670030A362 /* OpenVPNCredentials.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
C93779D61EAE32670030A362 /* OpenVPNCredentials.h in Headers */ = {isa = PBXBuildFile; fileRef = C93779D31EAE32670030A362 /* OpenVPNCredentials.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
C93779D71EAE32670030A362 /* OpenVPNCredentials.mm in Sources */ = {isa = PBXBuildFile; fileRef = C93779D41EAE32670030A362 /* OpenVPNCredentials.mm */; };
|
||||
C93779D81EAE32670030A362 /* OpenVPNCredentials.mm in Sources */ = {isa = PBXBuildFile; fileRef = C93779D41EAE32670030A362 /* OpenVPNCredentials.mm */; };
|
||||
C93779DB1EAE32880030A362 /* OpenVPNCredentials+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = C93779D91EAE32880030A362 /* OpenVPNCredentials+Internal.h */; };
|
||||
C93779DC1EAE32880030A362 /* OpenVPNCredentials+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = C93779D91EAE32880030A362 /* OpenVPNCredentials+Internal.h */; };
|
||||
C94605E91EAA656B00971516 /* OpenVPNConfigurationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C94605E81EAA656B00971516 /* OpenVPNConfigurationTests.swift */; };
|
||||
C94605EA1EAA65F200971516 /* OpenVPNConfigurationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C94605E81EAA656B00971516 /* OpenVPNConfigurationTests.swift */; };
|
||||
C98467A21EAA559B00272A9A /* local_key_auth.ovpn in Resources */ = {isa = PBXBuildFile; fileRef = C98467A11EAA559B00272A9A /* local_key_auth.ovpn */; };
|
||||
@@ -86,6 +92,9 @@
|
||||
C912BB241E7C3339002B9414 /* NetworkExtension.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NetworkExtension.framework; path = System/Library/Frameworks/NetworkExtension.framework; sourceTree = SDKROOT; };
|
||||
C93779CC1EAE17F50030A362 /* OpenVPNConfigurationValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenVPNConfigurationValues.h; sourceTree = "<group>"; };
|
||||
C93779CD1EAE17F50030A362 /* OpenVPNConfigurationValues.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OpenVPNConfigurationValues.mm; sourceTree = "<group>"; };
|
||||
C93779D31EAE32670030A362 /* OpenVPNCredentials.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenVPNCredentials.h; sourceTree = "<group>"; };
|
||||
C93779D41EAE32670030A362 /* OpenVPNCredentials.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OpenVPNCredentials.mm; sourceTree = "<group>"; };
|
||||
C93779D91EAE32880030A362 /* OpenVPNCredentials+Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OpenVPNCredentials+Internal.h"; sourceTree = "<group>"; };
|
||||
C94605E81EAA656B00971516 /* OpenVPNConfigurationTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenVPNConfigurationTests.swift; sourceTree = "<group>"; };
|
||||
C98467A11EAA559B00272A9A /* local_key_auth.ovpn */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = local_key_auth.ovpn; sourceTree = "<group>"; };
|
||||
C98467A41EAA5B7700272A9A /* OpenVPNConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenVPNConfiguration.h; sourceTree = "<group>"; };
|
||||
@@ -256,6 +265,9 @@
|
||||
C98467A41EAA5B7700272A9A /* OpenVPNConfiguration.h */,
|
||||
C98467AA1EAA5BB500272A9A /* OpenVPNConfiguration+Internal.h */,
|
||||
C98467A51EAA5B7700272A9A /* OpenVPNConfiguration.mm */,
|
||||
C93779D31EAE32670030A362 /* OpenVPNCredentials.h */,
|
||||
C93779D91EAE32880030A362 /* OpenVPNCredentials+Internal.h */,
|
||||
C93779D41EAE32670030A362 /* OpenVPNCredentials.mm */,
|
||||
C9BB477B1E7173C700F3F98C /* OpenVPNAdapter.h */,
|
||||
C9BB477C1E7173C700F3F98C /* OpenVPNAdapter+Internal.h */,
|
||||
C9BB477D1E7173C700F3F98C /* OpenVPNAdapter+Public.h */,
|
||||
@@ -350,7 +362,9 @@
|
||||
C9BB47811E7173C700F3F98C /* OpenVPNAdapter+Public.h in Headers */,
|
||||
C9BB47711E7171A100F3F98C /* OpenVPNError.h in Headers */,
|
||||
C9BB47801E7173C700F3F98C /* OpenVPNAdapter+Internal.h in Headers */,
|
||||
C93779D51EAE32670030A362 /* OpenVPNCredentials.h in Headers */,
|
||||
C9FD921A1E9A667600374FC4 /* ovpncli.hpp in Headers */,
|
||||
C93779DB1EAE32880030A362 /* OpenVPNCredentials+Internal.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -368,7 +382,9 @@
|
||||
C9D2ABE71EA20F99007EDF9D /* OpenVPNAdapter+Public.h in Headers */,
|
||||
C9D2ABE81EA20F99007EDF9D /* OpenVPNError.h in Headers */,
|
||||
C9D2ABE91EA20F99007EDF9D /* OpenVPNAdapter+Internal.h in Headers */,
|
||||
C93779D61EAE32670030A362 /* OpenVPNCredentials.h in Headers */,
|
||||
C9D2ABEA1EA20F99007EDF9D /* ovpncli.hpp in Headers */,
|
||||
C93779DC1EAE32880030A362 /* OpenVPNCredentials+Internal.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -571,6 +587,7 @@
|
||||
C9BB477A1E7171ED00F3F98C /* OpenVPNClient.mm in Sources */,
|
||||
C93779CF1EAE17F50030A362 /* OpenVPNConfigurationValues.mm in Sources */,
|
||||
C9FD921B1E9A667600374FC4 /* ovpncli.cpp in Sources */,
|
||||
C93779D71EAE32670030A362 /* OpenVPNCredentials.mm in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -594,6 +611,7 @@
|
||||
C9D2ABDC1EA20F99007EDF9D /* OpenVPNClient.mm in Sources */,
|
||||
C9D2ABDE1EA20F99007EDF9D /* ovpncli.cpp in Sources */,
|
||||
C93779D11EAE18760030A362 /* OpenVPNConfigurationValues.mm in Sources */,
|
||||
C93779D81EAE32670030A362 /* OpenVPNCredentials.mm in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
19
OpenVPN Adapter/OpenVPNCredentials+Internal.h
Normal file
19
OpenVPN Adapter/OpenVPNCredentials+Internal.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// OpenVPNCredentials+Internal.h
|
||||
// OpenVPN Adapter
|
||||
//
|
||||
// Created by Sergey Abramchuk on 24.04.17.
|
||||
//
|
||||
//
|
||||
|
||||
#import <client/ovpncli.hpp>
|
||||
|
||||
#import "OpenVPNCredentials.h"
|
||||
|
||||
using namespace openvpn;
|
||||
|
||||
@interface OpenVPNCredentials (Internal)
|
||||
|
||||
@property (readonly) ClientAPI::ProvideCreds credentials;
|
||||
|
||||
@end
|
||||
13
OpenVPN Adapter/OpenVPNCredentials.h
Normal file
13
OpenVPN Adapter/OpenVPNCredentials.h
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// OpenVPNCredentials.h
|
||||
// OpenVPN Adapter
|
||||
//
|
||||
// Created by Sergey Abramchuk on 24.04.17.
|
||||
//
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface OpenVPNCredentials : NSObject
|
||||
|
||||
@end
|
||||
32
OpenVPN Adapter/OpenVPNCredentials.mm
Normal file
32
OpenVPN Adapter/OpenVPNCredentials.mm
Normal file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// OpenVPNCredentials.m
|
||||
// OpenVPN Adapter
|
||||
//
|
||||
// Created by Sergey Abramchuk on 24.04.17.
|
||||
//
|
||||
//
|
||||
|
||||
#import "OpenVPNCredentials.h"
|
||||
#import "OpenVPNCredentials+Internal.h"
|
||||
|
||||
using namespace openvpn;
|
||||
|
||||
@interface OpenVPNCredentials () {
|
||||
ClientAPI::ProvideCreds _credentials;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation OpenVPNCredentials (Internal)
|
||||
|
||||
- (ClientAPI::ProvideCreds)credentials {
|
||||
return _credentials;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation OpenVPNCredentials
|
||||
|
||||
|
||||
|
||||
@end
|
||||
@@ -19,5 +19,6 @@ FOUNDATION_EXPORT const unsigned char OpenVPNAdapterVersionString[];
|
||||
#import <OpenVPNAdapter/OpenVPNError.h>
|
||||
#import <OpenVPNAdapter/OpenVPNEvent.h>
|
||||
#import <OpenVPNAdapter/OpenVPNConfiguration.h>
|
||||
#import <OpenVPNAdapter/OpenVPNCredentials.h>
|
||||
#import <OpenVPNAdapter/OpenVPNAdapter.h>
|
||||
#import <OpenVPNAdapter/OpenVPNAdapter+Public.h>
|
||||
|
||||
Reference in New Issue
Block a user