--- /dev/null
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
--- /dev/null
+Name: csapi-security-libteec
+Summary: Tizen Global Platform Client API for C#
+Version: 1.0.0
+Release: 1
+Group: Development/Libraries
+License: Apache-2.0
+URL: https://www.tizen.org
+Source0: %{name}-%{version}.tar.gz
+Source1: %{name}.manifest
+
+AutoReqProv: no
+ExcludeArch: aarch64
+
+BuildRequires: dotnet-build-tools
+
+# C# API Requires
+BuildRequires: csapi-tizen-nuget
+
+%define Assemblies Tizen.Security.TEEC
+
+%description
+%{summary}
+
+%dotnet_import_sub_packages
+
+%prep
+%setup -q
+cp %{SOURCE1} .
+
+%build
+for ASM in %{Assemblies}; do
+%dotnet_build $ASM
+%dotnet_pack $ASM/$ASM.nuspec %{version}
+done
+
+%install
+for ASM in %{Assemblies}; do
+%dotnet_install $ASM
+echo assembly files: %{dotnet_assembly_files}
+done
+
+%files
+%manifest %{name}.manifest
+%license LICENSE
+%attr(644,root,root) %{dotnet_assembly_files}
--- /dev/null
+PROJ_DIR=$(shell pwd)
+SRCS=\
+ src/Interop/Interop.Libteec.cs \
+ src/Interop/Interop.Types.cs \
+ src/Interop/Interop.Libraries.cs \
+ src/Interop/Interop.Errors.cs \
+ src/Secure/Libteec.cs \
+ src/Secure/Properties/AssemblyInfo.cs \
+ Test.cs
+
+test.exe: ${SRCS}
+ mcs ${SRCS} -out:test.exe
+
+.PHONY: build
+build: test.exe
+
+.PHONY: build-csuml
+build-csuml:
+ (cd ~/csapi/csuml && dotnet restore && dotnet build)
+
+pack: ${SRCS}
+ zip -r csapi-libteec.zip src
+
+csapi-libteec.puml: build-csuml ${SRCS}
+ @echo "create csapi-libteec.puml"
+ (cd ~/csapi/csuml && dotnet run -- ${PROJ_DIR}/filelist.lst) > csapi-libteec.puml
+
+csapi-libteec.png: csapi-libteec.puml
+ java -jar ~/bin/plantuml.jar csapi-libteec.puml
+
+
+# .phony is a target that is not a real file
+.PHONY: diagram diagram-show
+diagram: csapi-libteec.png
+diagram-show: diagram
+ xdg-open csapi-libteec.png
+
+xbuild-hello:
+ xbuild /p:Configuration=Release HelloWorld.csproj
+
--- /dev/null
+using System;
+using System.Runtime.InteropServices;
+using System.Threading;
+using System.Threading.Tasks;
+
+using Tizen.Security.TEEC;
+
+class Test {
+ static void Main() {
+ Guid ta_uuid = new Guid();
+ Context ctx = new Context(null);
+ Session ses = null;
+
+ ctx.OpenSession(ta_uuid);
+ ses.Close();
+
+ CancellationTokenSource token = new CancellationTokenSource();
+ Task<Session> ses_task = ctx.OpenSessionAsync(ta_uuid, token.Token);
+ ses = ses_task.Result;
+ ses.Close();
+
+ IntPtr buf = Marshal.AllocHGlobal(20*1024);
+ SharedMemory shm = ctx.RegisterSharedMemory(buf, 20*1024, SharedMemoryFlags.Input|SharedMemoryFlags.Output);
+ ctx.ReleaseSharedMemory(shm);
+ Marshal.FreeHGlobal(buf);
+
+ shm = ctx.AllocateSharedMemory(10*1024, SharedMemoryFlags.Input);
+ ctx.ReleaseSharedMemory(shm);
+ }
+}
--- /dev/null
+/*
+ * Interop.Errors.cs
+ *
+ * Created on: Apr 4, 2017
+ * Author: k.dynowski
+ */
+
+using System;
+
+internal static partial class Interop
+{
+
+ private const string LogTag = "Tizen.Security.Libteec";
+ internal enum LibteecError : uint
+ {
+ None = 0,
+ NotImplemented = 0xFFFF0009,
+ CommunicationFailed = 0xFFFF000E,
+ };
+
+ internal static void CheckNThrowException(int err, string msg)
+ {
+ switch ((uint)err)
+ {
+ case (uint)LibteecError.None:
+ return ;
+ case (uint)LibteecError.NotImplemented:
+ throw new NotImplementedException(string.Format("[{0}] {1} error=0x{2}",
+ LogTag, msg, err.ToString("X")));
+ case (uint)LibteecError.CommunicationFailed:
+ throw new Exception(string.Format("[{0}] {1} error=0x{2}",
+ LogTag, msg, err.ToString("X")));
+ default:
+ throw new InvalidOperationException(string.Format("[{0}] {1}, error=0x{2}",
+ LogTag, msg, err.ToString("X")));
+
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+internal static partial class Interop
+{
+ internal static partial class Libraries
+ {
+ public const string Libteec = "libteec.so";
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+using System;
+using System.Runtime.InteropServices;
+//using Interop.Liibteec.Types;
+
+internal static partial class Interop
+{
+ internal static partial class Libteec
+ {
+ /// <summary>
+ /// This function initializes a new TEE Context, forming a connection between this Client Application and the
+ /// TEE identified by the string identifier name.
+ /// The Client Application MAY pass name with a value of NULL, which means that the Implementation MUST
+ /// select a default TEE to connect to. The supported name strings, the mapping of these names to a specific
+ /// TEE, and the nature of the default TEE are implementation-defined.
+ /// </summary>
+ //TEEC_Result TEEC_InitializeContext(const char *name, TEEC_Context *context);
+ [DllImport(Libraries.Libteec, EntryPoint = "TEEC_InitializeContext", CallingConvention = CallingConvention.Cdecl)]
+ static public extern int InitializeContext(string name, ref TEEC_Context context);
+
+ /// <summary>
+ /// This function destroys an initialized TEE Context, closing the connection between the Client Application
+ /// and the TEE. The Client Application MUST only call this function when all Sessions inside this TEE
+ /// Context have been closed and all Shared Memory blocks have been released.
+ /// The implementation of this function MUST NOT be able to fail; after this function returns the Client
+ /// Application must be able to consider that the Context has been closed.
+ /// The function implementation MUST do nothing if the value of the context pointer is NULL.
+ /// </summary>
+ //void TEEC_FinalizeContext(TEEC_Context *context);
+ [DllImport(Libraries.Libteec, EntryPoint = "TEEC_FinalizeContext", CallingConvention = CallingConvention.Cdecl)]
+ static public extern void FinalizeContext(ref TEEC_Context context);
+
+ /// <summary>
+ /// This function registers a block of existing Client Application memory as a block of Shared Memory within
+ /// the scope of the specified TEE Context, in accordance with the parameters which have been set by the
+ /// Client Application inside the sharedMem structure.
+ /// The input context MUST point to an initialized TEE Context.
+ /// The input sharedMem MUST point to the Shared Memory structure defining the memory region to register
+ /// </summary>
+ //EEC_Result TEEC_RegisterSharedMemory(TEEC_Context *context, TEEC_SharedMemory *sharedMem);
+ [DllImport(Libraries.Libteec, EntryPoint = "TEEC_RegisterSharedMemory", CallingConvention = CallingConvention.Cdecl)]
+ static public extern int RegisterSharedMemory(ref TEEC_Context context, ref TEEC_SharedMemory sharedMem);
+
+ /// <summary>
+ /// This function allocates a new block of memory as a block of Shared Memory within the scope of the
+ /// specified TEE Context, in accordance with the parameters which have been set by the Client Application
+ /// inside the sharedMem structure.
+ /// The input context MUST point to an initialized TEE Context.
+ /// The input sharedMem MUST point to the Shared Memory structure defining the region to allocate.
+ /// </summary>
+ //TEEC_Result TEEC_AllocateSharedMemory(TEEC_Context *context, TEEC_SharedMemory *sharedMem);
+ [DllImport(Libraries.Libteec, EntryPoint = "TEEC_AllocateSharedMemory", CallingConvention = CallingConvention.Cdecl)]
+ static public extern int AllocateSharedMemory(ref TEEC_Context context, ref TEEC_SharedMemory sharedMem);
+
+ /// <summary>
+ /// This function deregisters or deallocates a previously initialized block of Shared Memory.
+ /// For a memory buffer allocated using AllocateSharedMemory the Implementation MUST free the
+ /// underlying memory and the Client Application MUST NOT access this region after this function has been
+ /// called. In this case the Implementation MUST set the buffer and size fields of the sharedMem
+ /// structure to NULL and 0 respectively before returning.
+ /// For memory registered using RegisterSharedMemory the implementation MUST deregister the
+ /// underlying memory from the TEE, but the memory region will stay available to the Client Application for
+ /// other purposes as the memory is owned by it.
+ /// The implementation MUST do nothing if the value of the sharedMem parameter is NULL.
+ /// </summary>
+ //void TEEC_ReleaseSharedMemory(TEEC_SharedMemory *sharedMem);
+ [DllImport(Libraries.Libteec, EntryPoint = "TEEC_ReleaseSharedMemory", CallingConvention = CallingConvention.Cdecl)]
+ static public extern void ReleaseSharedMemory(ref TEEC_SharedMemory sharedMem);
+
+ /// <summary>
+ /// This function opens a new Session between the Client Application and the specified Trusted Application.
+ /// The Implementation MUST assume that all fields of this session structure are in an undefined state.
+ /// When this function returns TEEC_SUCCESS the Implementation MUST have populated this structure with
+ /// any information necessary for subsequent operations within the Session.
+ /// The target Trusted Application is identified by a UUID passed in the parameter destination.
+ /// </summary>
+ //TEEC_Result TEEC_OpenSession(TEEC_Context *context, TEEC_Session *session, const TEEC_UUID *destination, uint connectionMethod, const void *connectionData, TEEC_Operation *operation, uint *returnOrigin);
+ [DllImport(Libraries.Libteec, EntryPoint = "TEEC_OpenSession", CallingConvention = CallingConvention.Cdecl)]
+ static public extern int OpenSession(ref TEEC_Context context, ref TEEC_Session session, TEEC_UUID destination, uint connectionMethod, byte[] connectionData, ref TEEC_Operation operation, out uint returnOrigin);
+
+ /// <summary>
+ /// This function closes a Session which has been opened with a Trusted Application.
+ /// All Commands within the Session MUST have completed before this function can be called.
+ /// The Implementation MUST do nothing if the input session parameter is NULL.
+ /// The implementation of this function MUST NOT be able to fail; after this function returns the Client
+ /// Application must be able to consider that the Session has been closed.
+ /// </summary>
+ //void TEEC_CloseSession(TEEC_Session *session);
+ [DllImport(Libraries.Libteec, EntryPoint = "TEEC_CloseSession", CallingConvention = CallingConvention.Cdecl)]
+ static public extern void CloseSession(ref TEEC_Session session);
+
+ /// <summary>
+ /// This function invokes a Command within the specified Session.
+ /// The parameter session MUST point to a valid open Session.
+ /// The parameter commandID is an identifier that is used to indicate which of the exposed Trusted
+ /// Application functions should be invoked. The supported command identifier values are defined by the
+ /// Trusted Application‟s protocol.
+ /// </summary>
+ //TEEC_Result TEEC_InvokeCommand(TEEC_Session *session, uint commandID, TEEC_Operation *operation, uint *returnOrigin);
+ [DllImport(Libraries.Libteec, EntryPoint = "TEEC_InvokeCommand", CallingConvention = CallingConvention.Cdecl)]
+ static public extern int InvokeCommand(ref TEEC_Session session, uint commandID, ref TEEC_Operation operation, out uint returnOrigin);
+
+ /// <summary>
+ /// This function requests the cancellation of a pending open Session operation or a Command invocation
+ /// operation. As this is a synchronous API, this function must be called from a thread other than the one
+ /// executing the OpenSession or InvokeCommand function.
+ /// This function just sends a cancellation signal to the TEE and returns immediately; the operation is not
+ /// guaranteed to have been cancelled when this function returns. In addition, the cancellation request is just
+ /// a hint; the TEE or the Trusted Application MAY ignore the cancellation request.
+ /// </summary>
+ //void TEEC_RequestCancellation(TEEC_Operation *operation);
+ [DllImport(Libraries.Libteec, EntryPoint = "TEEC_RequestCancellation", CallingConvention = CallingConvention.Cdecl)]
+ static public extern void RequestCancellation(ref TEEC_Operation operation);
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+
+using System;
+using System.Runtime.InteropServices;
+
+internal static partial class Interop
+{
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct TEEC_Context
+ {
+ public readonly IntPtr imp;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct TEEC_Session
+ {
+ public readonly IntPtr imp;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct TEEC_UUID
+ {
+ public UInt32 timeLow;
+ public UInt16 timeMid;
+ public UInt16 timeHiAndVersion;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
+ public byte[] clockSeqAndNode;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct sTEEC_SharedMemoryImp
+ {
+ public IntPtr context;
+ public IntPtr context_imp;
+ public UInt32 flags;
+ public UInt32 memid;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct TEEC_SharedMemory
+ {
+ public IntPtr buffer;
+ public UInt32 size;
+ public UInt32 flags;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct TEEC_Parameter
+ {
+ public UInt32 a;
+ public UInt32 b;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct TEEC_Operation
+ {
+ public UInt32 started;
+ public UInt32 paramTypes;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
+ public TEEC_Parameter[] paramlist;
+ public IntPtr imp;
+ }
+}
+
--- /dev/null
+/*
+ * AssemblyInfo.cs
+ *
+ * Created on: Apr 6, 2017
+ * Author: k.dynowski
+ */
+
+
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Tizen.Security.Libteec")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Samsung Electronics")]
+[assembly: AssemblyProduct("Tizen.Security.Libteec")]
+[assembly: AssemblyCopyright("Copyright (c) 2017 Samsung Electronics Co., Ltd")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+[assembly: ComVisible(false)]
+
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+
+
--- /dev/null
+<?xml version="1.0"?>
+<package>
+ <metadata>
+ <id>Tizen.Security.TEEC</id>
+ <version>$version$</version>
+ <authors>Tizen Developers</authors>
+ <description>Security TEEC API for Tizen.Net</description>
+ <dependencies>
+ <dependency id="Tizen" version="1.0.0" />
+ </dependencies>
+ </metadata>
+</package>
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Tizen.Security.TEEC
+{
+ /// <summary>
+ /// This type denotes Session Login Method used in OpenSession
+ /// </summary>
+ public class LoginMethod
+ {
+ public const uint Public = 0x00000000; ///< No login data is provided.
+ public const uint User = 0x00000001; ///< Login data about the user running the Client Application process is provided.
+ public const uint Group = 0x00000002; ///< Login data about the group running the Client Application process is provided.
+ public const uint Application = 0x00000003; ///< Login data about the running Client Application itself is provided.
+ }
+
+ /// <summary>
+ /// This type denotes Value parameter
+ /// </summary>
+ public enum ValueType : UInt32
+ {
+ Input = 0x00000001, ///< The Parameter is a ValueType tagged as input.
+ Output = 0x00000002, ///< The Parameter is a ValueType tagged as output.
+ InOut = 0x00000003, ///< The Parameter is a ValueType tagged as both as input and output.
+ }
+
+ /// <summary>
+ /// This type denotes TempMemoryReference parameter
+ /// describing a region of memory which needs to be temporarily registered for the duration of the operation.
+ /// </summary>
+ public enum TempMemoryType : UInt32
+ {
+ Input = 0x00000005, ///< The Parameter is a TempMemoryType and is tagged as input
+ Output = 0x00000006, ///< Same as Input, but the Memory Reference is tagged as output
+ InOut = 0x00000007, ///< A Temporary Memory Reference tagged as both input and output.
+ }
+
+ /// <summary>
+ /// This type denotes SharedMemoryReference parameter
+ /// </summary>
+ public enum RegisteredMemoryType : UInt32
+ {
+ Whole = 0x0000000C, ///< The Parameter is a Registered Memory Reference that refers to the entirety of its parent Shared Memory block.
+ PartialInput = 0x0000000D, ///< A Registered Memory Reference structure that refers to a partial region of its parent Shared Memory block and is tagged as input.
+ PartialOutput = 0x0000000E, ///< A Registered Memory Reference structure that refers to a partial region of its parent Shared Memory block and is tagged as output.
+ PartialInOut = 0x0000000F, ///< A Registered Memory Reference structure that refers to a partial region of its parent Shared Memory block and is tagged as both input and output
+ }
+
+ /// <summary>
+ /// This type denotes SharedMemory access direction
+ /// </summary>
+ [Flags]
+ public enum SharedMemoryFlags : UInt32
+ {
+ Input = 0x00000001, ///< A flag indicates Shared Memory can be read
+ Output = 0x00000002, ///< A flag indicates Shared Memory can be written
+ }
+
+ /// <summary>
+ /// This type denotes a Shared Memory block which has either been registered
+ /// with the implementation or allocated by it.
+ /// </summary>
+ public sealed class SharedMemory
+ {
+ internal Interop.TEEC_SharedMemory shm;
+ internal SharedMemory(Interop.TEEC_SharedMemory shm)
+ {
+ this.shm=shm;
+ }
+ /// <summary>
+ /// This property represents shared memory size in bytes.
+ /// </summary>
+ public UInt32 Size
+ {
+ get { return shm.size; }
+ }
+ /// <summary>
+ /// This property represents start address of shared memory block.
+ /// </summary>
+ public IntPtr Address
+ {
+ get { return shm.buffer; }
+ }
+
+ /// <summary>
+ /// This function makes a copy and is designed for convenient operations on small buffers.
+ /// For large buffers direct address should be used.
+ /// </summary>
+ public void SetData(byte[] data, int dstOffs)
+ {
+ //TODO copy data into shared memory starting at given offset
+ }
+ /// <summary>
+ /// This function makes a copy and is designed for convenient operations on small buffers.
+ /// For large buffers direct address should be used.
+ /// </summary>
+ public void GetData(byte[] data, int srcOffs)
+ {
+ //TODO copy data from shared memory starting at given offset
+ }
+ };
+
+ /// <summary>
+ /// This type defines the payload of either an open Session operation or an invoke Command operation. It is
+ /// also used for cancellation of operations, which may be desirable even if no payload is passed.
+ /// Parameters are used to exchange data between CA and TA
+ /// </summary>
+ public abstract class Parameter
+ {
+ internal Parameter(uint t)
+ {
+ this.NativeType = t;
+ }
+ internal uint NativeType { get; }
+ };
+
+ /// <summary>
+ /// This type defines a template for parameter types.
+ /// </summary>
+ public abstract class BaseParameter<TEnum> : Parameter where TEnum : struct, IComparable, IFormattable, IConvertible // as close to Enum as possible
+ {
+ internal BaseParameter(TEnum t) : base((uint)(object)t)
+ {
+ Type = t;
+ }
+
+ /// <summary>
+ /// This property represents access type to this parameter.
+ /// </summary>
+ public TEnum Type { get; }
+ }
+
+ /// <summary>
+ /// This type defines a temporary memory reference.
+ /// </summary>
+ public sealed class TempMemoryReference : BaseParameter<TempMemoryType>
+ {
+ public TempMemoryReference(IntPtr buffer, uint size, TempMemoryType type) :
+ base(type)
+ {
+ this.Buffer = buffer;
+ this.Size = size;
+ }
+ /// <summary>
+ /// This property represents memory address of buffer.
+ /// </summary>
+ public IntPtr Buffer { get; }
+ /// <summary>
+ /// This property represents size of buffer.
+ /// </summary>
+ public uint Size { get; }
+ };
+
+ /// <summary>
+ /// This type defines a memory reference that uses a pre-registered or pre-allocated Shared Memory block.
+ /// </summary>
+ public sealed class RegisteredMemoryReference : BaseParameter<RegisteredMemoryType>
+ {
+ public RegisteredMemoryReference(SharedMemory parent, uint size, uint offset, RegisteredMemoryType type) :
+ base(type)
+ {
+ this.Parent = parent;
+ this.Size = size;
+ this.Offset = offset;
+ }
+ /// <summary>
+ /// This property represents SharedMemory that is referred to.
+ /// </summary>
+ public SharedMemory Parent { get; }
+ /// <summary>
+ /// This property represents size (in bytes) of SharedMemory.
+ /// </summary>
+ public uint Size { get; }
+ /// <summary>
+ /// This property represents offset (in bytes) from the begin of SharedMemory.
+ /// </summary>
+ public uint Offset { get; }
+ };
+
+ /// <summary>
+ /// This type defines a parameter that is not referencing shared memory, but carries instead small raw data
+ /// passed by value.
+ /// </summary>
+ public sealed class Value : BaseParameter<ValueType>
+ {
+ public Value(uint a, uint b, ValueType type) :
+ base(type)
+ {
+ this.A = a;
+ this.B = b;
+ }
+ /// <summary>
+ /// This property represents unsigned integer A.
+ /// </summary>
+ public uint A { get; }
+ /// <summary>
+ /// This property represents unsigned integer B.
+ /// </summary>
+ public uint B { get; }
+ };
+
+
+ /// <summary>
+ /// This type denotes a TEE Session, the logical container linking a Client Application with a particular Trusted Application.
+ /// </summary>
+ public sealed class Session
+ {
+ private Interop.TEEC_Context context;
+ private Interop.TEEC_Session session;
+
+ internal Session(Interop.TEEC_Context context) {
+ this.context = context;
+ this.session = new Interop.TEEC_Session();
+ }
+
+ ~Session()
+ {
+ Close();
+ }
+
+ internal void Open(Guid destination, uint loginMethod, byte[] connectionData, Parameter[] paramlist)
+ {
+ Interop.TEEC_UUID uuid = new Interop.TEEC_UUID();
+ Interop.TEEC_Operation op = new Interop.TEEC_Operation();
+ uint ro;
+
+ int ret = Interop.Libteec.OpenSession(ref context, ref session, uuid, loginMethod, connectionData, ref op, out ro);
+ //MAYBE map origin of return code to specyfic Exception
+ Interop.CheckNThrowException(ret, string.Format("OpenSession('{0}')", destination));
+ }
+
+ /// <summary>
+ /// This function closes a Session which has been opened with a Trusted Application.
+ /// All Commands within the Session MUST have completed before this function can be called.
+ /// </summary>
+ public void Close() {
+ Interop.Libteec.CloseSession(ref session);
+ //session = null;
+ }
+
+ /// <summary>
+ /// This function invokes a Command within the specified Session.
+ /// The parameter commandID is an identifier that is used to indicate which of the exposed Trusted
+ /// Application functions should be invoked. The supported command identifier values are defined by the
+ /// Trusted Application‟s protocol.
+ /// There can be up to four Parameter objects given in the {paramlist} array
+ /// </summary>
+ /// <param name="commandID">The command</param>
+ /// <param name="paramlist">The array of parameters</param>
+ public void InvokeCommand(uint commandID, Parameter[] paramlist)
+ {
+ Interop.TEEC_Operation op = new Interop.TEEC_Operation();
+ op.started=0;
+ op.paramTypes=0;
+
+ for (int i=0; i < 4; ++i) {
+ Parameter p = paramlist[i];
+ //TODO fill TEEC_Operation struct
+ }
+
+ uint ro;
+ int ret = Interop.Libteec.InvokeCommand(ref session, commandID, ref op, out ro);
+ //MAYBE map origin of return code to specific Exception
+ Interop.CheckNThrowException(ret, string.Format("InvokeCommand({0})", commandID));
+ }
+
+ /// <summary>
+ /// Asynchronous version of InvokeCommand
+ /// </summary>
+ /// <param name="commandID">The command</param>
+ /// <param name="paramlist">The array of parameters</param>
+ /// <param name="token">The token for task manipulation</param>
+ public async Task InvokeCommandAsync(uint commandID, Parameter[] paramlist, CancellationToken token)
+ {
+ await Task.Factory.StartNew(() => InvokeCommand(commandID, paramlist));
+ }
+
+ };
+
+ /// <summary>
+ /// This type denotes a TEE Context, the main logical container linking a Client Application with a particular TEE.
+ /// </summary>
+ public sealed class Context : IDisposable
+ {
+ private Interop.TEEC_Context context;
+
+ /// <summary>
+ /// This function (constructor) initializes a new TEE Context, forming a connection between this Client Application and the
+ /// TEE identified by the string identifier name (empty name denotes default TEE).
+ /// </summary>
+ /// <param name="name">The TEE name</param>
+ public Context(string name)
+ {
+ context = new Interop.TEEC_Context();
+ int ret = Interop.Libteec.InitializeContext(name, ref context);
+ Interop.CheckNThrowException(ret, string.Format("InititalizeContext('{0}')", name));
+ }
+
+ ~Context()
+ {
+ Dispose();
+ }
+
+ /// <summary>
+ /// This function implements IDisposable interface
+ /// </summary>
+ public void Dispose() {
+ Interop.Libteec.FinalizeContext(ref context);
+ //context.imp = null;
+ }
+
+ /// <summary>
+ /// This function opens a new Session between the Client Application and the specified Trusted Application.
+ /// The target Trusted Application is identified by a UUID passed in the parameter destination.
+ /// There can be up to four Parameter objects given in the {paramlist} array
+ /// </summary>
+ /// <param name="destination">The UUID of destination TA</param>
+ /// <param name="loginMethod">The authentication algorithm @see LoginMethod</param>
+ /// <param name="connectionData">The data to be verified by given login method</param>
+ /// <param name="paramlist">The parameters to be passed to TA open-session-callback</param>
+ public Session OpenSession(Guid destination, uint loginMethod, byte[] connectionData, Parameter[] paramlist)
+ {
+ Session ses = new Session(context);
+ ses.Open(destination, loginMethod, connectionData, paramlist);
+ return ses;
+ }
+ /// <summary>
+ /// @see OpenSession(Guid destination, uint connectionMethod, byte[] connectionData, Parameter[] paramlist, CancellationToken token)
+ /// </summary>
+ /// <param name="destination">The UUID of destination TA</param>
+ public Session OpenSession(Guid destination)
+ {
+ Session ses = new Session(context);
+ ses.Open(destination, LoginMethod.Public, null, null);
+ return ses;
+ }
+
+ /// <summary>
+ /// Asynchronous version of OpenSession
+ /// @see OpenSession(Guid destination, uint connectionMethod, byte[] connectionData, Parameter[] paramlist, CancellationToken token)
+ /// </summary>
+ /// <param name="destination">The UUID of destination TA</param>
+ /// <param name="loginMethod">The authentication algorithm @see LoginMethod</param>
+ /// <param name="connectionData">The data to be verified by given login method</param>
+ /// <param name="paramlist">The parameters to be passed to TA open-session-callback</param>
+ /// <param name="token">The token for task manipulation</param>
+ public async Task<Session> OpenSessionAsync(Guid destination, uint loginMethod, byte[] connectionData, Parameter[] paramlist, CancellationToken token)
+ {
+ Task<Session> task = Task<Session>.Factory.StartNew(() =>
+ {
+ return OpenSession(destination, loginMethod, connectionData, paramlist);
+ });
+ return await task;
+ }
+ /// <summary>
+ /// Asynchronous version of OpenSession
+ /// @see OpenSession(Guid destination, uint connectionMethod, byte[] connectionData, Parameter[] paramlist, CancellationToken token)
+ /// </summary>
+ /// <param name="destination">The UUID of destination TA</param>
+ /// <param name="token">The token for task manipulation</param>
+ public async Task<Session> OpenSessionAsync(Guid destination, CancellationToken token)
+ {
+ Task<Session> task = Task<Session>.Factory.StartNew(() =>
+ {
+ return OpenSession(destination);
+ });
+ return await task;
+ }
+
+ /// <summary>
+ /// This function registers a block of existing Client Application memory as a block of Shared Memory within
+ /// the scope of the specified Context, in accordance with the parameters.
+ /// The input {memaddr} MUST point to the shared memory region to register
+ /// </summary>
+ /// <param name="memaddr">The address of shared memory</param>
+ /// <param name="size">The size of shared memory</param>
+ /// <param name="flags">The flags describing access modes (Input and/or Output)</param>
+ public SharedMemory RegisterSharedMemory(IntPtr memaddr, UInt32 size, SharedMemoryFlags flags)
+ {
+ Interop.TEEC_SharedMemory shm = new Interop.TEEC_SharedMemory();
+ shm.buffer = memaddr;
+ shm.size = size;
+ shm.flags = (UInt32)flags;
+ int ret = Interop.Libteec.RegisterSharedMemory(ref context, ref shm);
+ Interop.CheckNThrowException(ret, "RegisterSharedMemory");
+ return new SharedMemory(shm);
+ }
+
+ /// <summary>
+ /// This function allocates a new block of memory as a block of Shared Memory within the scope of the
+ /// specified Context, in accordance with the parameters.
+ /// </summary>
+ /// <param name="size">The size of shared memory</param>
+ /// <param name="flags">The flags describing access modes (Input and/or Output)</param>
+ public SharedMemory AllocateSharedMemory(UInt32 size, SharedMemoryFlags flags)
+ {
+ Interop.TEEC_SharedMemory shm = new Interop.TEEC_SharedMemory();
+ shm.size = size;
+ shm.flags = (UInt32)flags;
+ int ret = Interop.Libteec.AllocateSharedMemory(ref context, ref shm);
+ Interop.CheckNThrowException(ret, "AllocateSharedMemory");
+ return new SharedMemory(shm);
+ }
+
+ /// <summary>
+ /// This function deregisters or deallocates a previously initialized block of Shared Memory.
+ /// For a memory buffer allocated using AllocateSharedMemory the Implementation MUST free the
+ /// underlying memory and the Client Application MUST NOT access this region after this function has been
+ /// called. In this case the Implementation MUST clear the buffer and size fields of the sharedMem
+ /// structure before returning.
+ /// For memory registered using RegisterSharedMemory the implementation MUST deregister the
+ /// underlying memory from the TEE, but the memory region will stay available to the Client Application for
+ /// other purposes as the memory is owned by it.
+ /// </summary>
+ /// <param name="shm">The shared memory object returned by RegisterSharedMemory or AllocateSharedMemory</param>
+ public void ReleaseSharedMemory(SharedMemory shm)
+ {
+ Interop.Libteec.ReleaseSharedMemory(ref shm.shm);
+ }
+ };
+}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+ <ProductVersion>8.0.30703</ProductVersion>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
+ <ProjectTypeGuids>{2F98DAC9-6F16-457B-AED7-D43CAC379341};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\r
+ <ProjectGuid>{4EE6C458-AA49-402C-89A1-5A12B54E6108}</ProjectGuid>\r
+ <OutputType>Library</OutputType>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <RootNamespace>libteec</RootNamespace>\r
+ <AssemblyName>Tizen.Security.TEEC</AssemblyName>\r
+ <FileAlignment>512</FileAlignment>\r
+ <DefaultLanguage>en-US</DefaultLanguage>\r
+ </PropertyGroup>\r
+ <PropertyGroup>\r
+ <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier>\r
+ <TargetFrameworkVersion>v1.3</TargetFrameworkVersion>\r
+ <NuGetTargetMoniker>.NETStandard,Version=v1.3</NuGetTargetMoniker>\r
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
+ <NoStdLib>true</NoStdLib>\r
+ <NoWarn>$(NoWarn);1701</NoWarn>\r
+ <UseVSHostingProcess>false</UseVSHostingProcess>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <OutputPath>bin\Debug\</OutputPath>\r
+ <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>pdbonly</DebugType>\r
+ <Optimize>true</Optimize>\r
+ <OutputPath>bin\Release\</OutputPath>\r
+ <DefineConstants>TRACE</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ </PropertyGroup>\r
+ <ItemGroup>\r
+ <None Include="libteec.project.json" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Compile Include="Tizen.Security.TEEC/Libteec.cs" />\r
+ <Compile Include="Interop/Interop.Errors.cs" />\r
+ <Compile Include="Interop/Interop.Libraries.cs" />\r
+ <Compile Include="Interop/Interop.Libteec.cs" />\r
+ <Compile Include="Interop/Interop.Types.cs" />\r
+ <Compile Include="Properties\AssemblyInfo.cs" />\r
+ </ItemGroup>\r
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.\r
+ Other similar extension points exist, see Microsoft.Common.targets.\r
+ <Target Name="BeforeBuild">\r
+ </Target>\r
+ <Target Name="AfterBuild">\r
+ </Target>\r
+ -->\r
+ <PropertyGroup>\r
+ <!-- https://github.com/dotnet/corefxlab/tree/master/samples/NetCoreSample and\r
+ https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/target-dotnetcore-with-msbuild\r
+ -->\r
+ <!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two\r
+ properties to any folder that exists to skip the GetReferenceAssemblyPaths task (not target) and\r
+ to prevent it from outputting a warning (MSB3644).\r
+ -->\r
+ <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)</_TargetFrameworkDirectories>\r
+ <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)</_FullFrameworkReferenceAssemblyPaths>\r
+ <AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>\r
+ </PropertyGroup>\r
+ <ProjectExtensions>\r
+ <VisualStudio>\r
+ <FlavorProperties GUID="{2F98DAC9-6F16-457B-AED7-D43CAC379341}" Configuration="Debug|Any CPU">\r
+ <ProjectCorporateFlavorCfg />\r
+ </FlavorProperties>\r
+ <FlavorProperties GUID="{2F98DAC9-6F16-457B-AED7-D43CAC379341}" Configuration="Release|Any CPU">\r
+ <ProjectCorporateFlavorCfg />\r
+ </FlavorProperties>\r
+ </VisualStudio>\r
+ </ProjectExtensions>\r
+</Project>\r
--- /dev/null
+{\r
+ "dependencies": {\r
+ "NETStandard.Library": "1.6.0"\r
+ },\r
+ "frameworks": {\r
+ "netstandard1.3": {}\r
+ }\r
+}\r
--- /dev/null
+\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio 14\r
+VisualStudioVersion = 14.0.25420.1\r
+MinimumVisualStudioVersion = 10.0.40219.1\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "libteec", "libteec.csproj", "{4EE6C458-AA49-402C-89A1-5A12B54E6108}"\r
+EndProject\r
+Global\r
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+ Debug|Any CPU = Debug|Any CPU\r
+ Release|Any CPU = Release|Any CPU\r
+ EndGlobalSection\r
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+ {4EE6C458-AA49-402C-89A1-5A12B54E6108}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {4EE6C458-AA49-402C-89A1-5A12B54E6108}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {4EE6C458-AA49-402C-89A1-5A12B54E6108}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {4EE6C458-AA49-402C-89A1-5A12B54E6108}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ EndGlobalSection\r
+ GlobalSection(SolutionProperties) = preSolution\r
+ HideSolutionNode = FALSE\r
+ EndGlobalSection\r
+EndGlobal\r
--- /dev/null
+<Compile Include="*/*.cs"/>