Browse Source

Initial release of Intel SGX for Linux.

This release is used in conjunction with the linux-sgx-driver Intial release:
https://github.com/01org/linux-sgx-driver
commit-id: 0e865ce5e6b297a787bcdc12d98bada8174be6d7

Intel-id: 33399

Signed-off-by: Angie Chinchilla <angie.v.chinchilla@intel.com>
Angie Chinchilla 7 years ago
parent
commit
9441de4c38
100 changed files with 5935 additions and 0 deletions
  1. 202 0
      Linux_SGXEclipsePlugin/build.sh
  2. 52 0
      Linux_SGXEclipsePlugin/build_config/allElements.xml
  3. 307 0
      Linux_SGXEclipsePlugin/build_config/build.properties
  4. 13 0
      Linux_SGXEclipsePlugin/build_config/buildUpdateSite.xml
  5. 66 0
      Linux_SGXEclipsePlugin/build_config/customAssembly.xml
  6. 208 0
      Linux_SGXEclipsePlugin/build_config/customTargets.xml
  7. 28 0
      Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/.project
  8. 15 0
      Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/build.properties
  9. 64 0
      Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/feature.xml
  10. 18 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/.classpath
  11. 39 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/.project
  12. 11 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/META-INF/MANIFEST.MF
  13. 19 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/build.properties
  14. 22 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Adding_SGX_Nature_to_a_Project.htm
  15. 55 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Adding_SGX_Nature_to_a_non_SGX_project.htm
  16. 54 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Adding_an_SGX_Enclave.htm
  17. 39 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Adding_an_SGX_Trusted_Library.htm
  18. 39 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Adding_an_SGX_Untrusted_Module.htm
  19. 25 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Building_and_Running_SGX_Code.htm
  20. 30 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Command_Reference.htm
  21. 31 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Configuring_Intel_Software_Guard_Extensions_Eclipse_Plug-in.htm
  22. 37 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Creating_a_New_C_C_Project_with_SGX_Nature.htm
  23. 27 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Generate_Hash.htm
  24. 39 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Generate_Signed_Enclaves.htm
  25. 23 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Getting_Started.htm
  26. 40 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Installing_Intel_Software_Guard_Extensions_Eclipse_Plugin.htm
  27. 42 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Introducing_Intel_Software_Guard _Extensions_Eclipse_Plugin.htm
  28. 23 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Introducing_Intel_Software_Guard_Extensions.htm
  29. 21 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Introduction.htm
  30. 70 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Legal_Information.htm
  31. 27 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Prerequisites.htm
  32. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/A_Generated_Trusted_Library.png
  33. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_New_Intel_SGX_Enclave_Dialog.png
  34. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_New_SGX_Static_Trusted_Library_Dialog.png
  35. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_Repository_Dialog.png
  36. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_SGX_Nature.png
  37. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_SGX_Untrusted_Module.png
  38. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Configurations_Specific_to_Intel_SGX_Technology.png
  39. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Configure_SGX_Hardware_Release_Mode.png
  40. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Copying_the_Untrusted_Module_to_a_Project.png
  41. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Customization_of_SGX_build_command.png
  42. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Down_Arrow_Button.png
  43. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Enclave_Configuration_Settings.png
  44. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generate_Signed_Enclave_Dialog.png
  45. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generate_Signed_Enclave_Dialog_with_Pre_configurations.png
  46. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generated_Sample_Untrusted_Application.png
  47. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generated_Skeleton_for_an_Enclave.png
  48. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generating_Hash_Completion_Dialog.png
  49. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Import_or_Re_Generate_Enclave_Signing_Key.png
  50. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Intel_SGX_Configurations.png
  51. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Intel_SGX_Tools.png
  52. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Makefile_for_Intel_SGX.png
  53. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/New_Project.png
  54. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Project_Explorer.png
  55. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Project_Menu.png
  56. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/SGX_Preference_Page.png
  57. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Sample_Application.png
  58. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Select_Configuration_File.png
  59. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/The_Location_of_the_Plugin_zip_Archive.png
  60. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/The_Result_of_Running_Samples_Generated_for_Enclaves.png
  61. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Two_StepSigne_Enclave_Generate_Hash.png
  62. BIN
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Two_Step_Sign_Enclave_Menu.png
  63. 22 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/PageLayouts/Default.flpgl
  64. 443 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Stylesheets/intel_css_styles.css
  65. 31 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Running_Samples_Generated_for_Enclaves.htm
  66. 97 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/SGX_Build_Configurations.htm
  67. 30 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/SGX_title.htm
  68. 59 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Two_Steps_Sign_Enclave.htm
  69. 39 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Updating_Enclave_Configuration_Files.htm
  70. 37 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Updating_SGX_Enclave_Signing_Key.htm
  71. 417 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/content.html
  72. 24 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/plugin.xml
  73. 73 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/src/com/intel/sgx/userguide/Activator.java
  74. 90 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/toc.xml
  75. 18 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/.classpath
  76. 39 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/.project
  77. 12 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/.settings/org.eclipse.jdt.core.prefs
  78. 26 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/META-INF/MANIFEST.MF
  79. 15 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/OSGI-INF/l10n/bundle.properties
  80. 24 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/build.properties
  81. 2 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/discovery/test.c
  82. 2 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/discovery/test.cpp
  83. 786 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/plugin.xml
  84. 75 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/Activator.java
  85. 46 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/CConfigurationDataProvider2.java
  86. 37 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/Messages.java
  87. 70 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/SdkPathVariableProvider.java
  88. 38 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/build/SGXSDKCommandLauncher.java
  89. 126 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/AddEnclaveFileDialog.java
  90. 109 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/AddTrustedStaticLibFileDialog.java
  91. 138 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/AddUntrustedModuleDialog.java
  92. 257 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/EnclaveConfigDialog.java
  93. 122 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/RemoveEnclaveFileDialog.java
  94. 222 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/SGXDialogBase.java
  95. 174 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignDialogBase.java
  96. 72 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep1Dialog1.java
  97. 89 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep1Dialog2.java
  98. 105 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep1Dialog3.java
  99. 92 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep2Dialog.java
  100. 191 0
      Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/UpdateSignKeyDialog.java

+ 202 - 0
Linux_SGXEclipsePlugin/build.sh

@@ -0,0 +1,202 @@
+#!/bin/bash
+export PATH=/home/jenkins/jdk/bin/:$PATH
+
+
+# Get the Eclipse launcher and build script to use
+set -x
+set -e
+
+TRUNK_HOME=$(cd $(pwd)/../../ ; pwd)
+#gives you the posibility to overwrite eclipse, if you do not use URL
+[ -n "${ECLIPSE_HOME}" ] || { echo "using default ECLIPSE_HOME=${TRUNK_HOME}/eclipse"; ECLIPSE_HOME=${TRUNK_HOME}/eclipse; }
+
+
+BUILD_RELEASE_ID_PREFIX=Linux_SGX_1.5
+
+if [ "$RELEASE_ID" != "${RELEASE_ID%$BUILD_RELEASE_ID_PREFIX*}" ]; then
+    echo "$BUILD_RELEASE_ID_PREFIX IS in $RELEASE_ID, so it is an triggered build. Change the RELEASE_ID to an accepted form."
+    temp=${RELEASE_ID#$BUILD_RELEASE_ID_PREFIX}
+    RELEASE_ID=v`echo ${temp} |  tr -d _ | tr -d -`
+else
+    echo "$BUILD_RELEASE_ID_PREFIX is NOT in $RELEASE_ID. Keeping the user specified RELEASE_ID."
+fi
+
+function main() {
+  validate-jenkins-parameters
+  cleanupPreBuild
+  checkEnvironment
+  buildPlugin
+  archivePlugin
+}
+
+function validate-jenkins-parameters {
+  validate-parameter "DELETE_CURRENT_ECLIPSE" "$DELETE_CURRENT_ECLIPSE"
+  [[ "ECLIPSE_DOWNLOAD_URL" != "" ]] &&
+      echo "[WARNING] ECLIPSE_DOWNLOAD_URL is not set; assume eclipse archive is already downloaded"
+}
+
+function validate-parameter {
+  local NAME="$1"
+  local VALUE="$2"
+  [[ ! -z "$VALUE" ]] || {
+    echo "Mandatory Jenkins parameter '\$$NAME' not set !"
+    exit 1
+  }
+}
+
+function cleanupPreBuild() {
+  ./clean.sh
+
+  [[ "false" == "${DELETE_CURRENT_ECLIPSE}" ]] || {
+    forceRemoveEclipse
+  }
+}
+
+function forceRemoveEclipse() {
+  pushd ${TRUNK_HOME}
+  rm -fr eclipse
+  popd
+}
+
+function checkEnvironment() {
+  if [ ! -d "${ECLIPSE_HOME}" ]; then
+    echo "Eclipse does not exist"
+    echo "Downloading eclipse"
+
+    getEclipse
+  fi
+
+  if [ -z "$RELEASE_ID" ]; then
+    echo "Mandatory variable RELEASE_ID not defined; exiting"
+    exit
+  fi
+}
+
+function getEclipse() {
+  local eclipseArchiveURL="${ECLIPSE_DOWNLOAD_URL}"
+
+  pushd $TRUNK_HOME
+  cleanupEclipseArchive
+  downloadEclipse "${eclipseArchiveURL}"
+  unzipEclipse
+ installPDE
+  cleanupEclipseArchive
+  popd
+}
+
+function cleanupEclipseArchive() {
+  find . -maxdepth 1 -mindepth 1 -name "*eclipse*.zip*" | xargs rm -f
+}
+
+function downloadEclipse() {
+    local URL="$1"
+    if [[ "$1" != "" ]] ; then
+	echo " wget --no-proxy "$1""
+	wget --no-proxy "$1"
+    else
+	echo "skip downloaded empty url"
+    fi
+
+}
+
+function unzipEclipse() {
+    pwd
+    rm -fr eclipse
+  local eclipseArchiveName="$(find . -maxdepth 1 -mindepth 1 -name "*eclipse*.zip*")"
+  unzip "${eclipseArchiveName}"
+
+  [[ -d eclipse ]] || {
+    echo "Eclipse directory does not exist!"
+    exit
+  }
+
+#  local eclipseFolderName=${eclipseArchiveName%.zip}
+#  local eclipseArchiveName="eclipse"
+#  mv "${eclipseFolderName}" eclipse
+}
+
+function installPDE() {
+echo "~~~~>"
+pwd
+${ECLIPSE_HOME}/eclipse -nosplash \
+  -application org.eclipse.equinox.p2.director \
+  -repository http://download.eclipse.org/eclipse/updates/4.4 \
+  -destination ${ECLIPSE_HOME} \
+  -installIU org.eclipse.pde.source.feature.group \
+  -installIU org.eclipse.pde.feature.group
+}
+
+function buildPlugin() {
+    pwd
+
+  echo "PWD=`pwd`"
+  echo "ECLIPSE_HOME=$ECLIPSE_HOME"
+
+  #BASELOCATION="$PWD/target_platform"
+  BASELOCATION="$ECLIPSE_HOME"
+  BUILDVERSION="$RELEASE_ID"
+  BUILDDIR="$PWD/build_directory"
+  BUILDCONFIG="$PWD/build_config"
+  LAUNCHER=`findFirst "$ECLIPSE_HOME"/plugins/org.eclipse.equinox.launcher_*.jar`
+  BUILDFILE=`findFirst "$ECLIPSE_HOME"/plugins/org.eclipse.pde.build_*/scripts/build.xml`
+
+  # make sure we found valid files
+  if [ ! -f "$LAUNCHER" ]; then
+    echo "Installation Error: Eclipse plugin org.eclipse.equinox.launcher...jar not detected. " \
+         "Found '$LAUNCHER'. Aborting."
+    exit 1
+  fi
+  if [ ! -f "$BUILDFILE" ]; then
+    echo "Installation Error: Eclipse build file org.eclipse.pde.build_.../scripts/build.xml " \
+         "not detected. Found '$BUILDFILE'. Aborting."
+    exit 1
+  fi
+  
+  #
+  # -- Print configuration used and actually execute the build --  
+  #
+  echo "Eclipse configuration found:"
+  echo "  Eclipse Home: $ECLIPSE_HOME"
+  echo "  Launcher:     $LAUNCHER"
+  echo "  Build File:   $BUILDFILE"
+  echo "  Build Config: $BUILDCONFIG"
+  echo "  Base Location: $BASELOCATION"
+  echo "  Build Directory: $BUILDDIR"
+  echo "  Build Version: $BUILDVERSION"
+  echo "  Java:         " $(which java)
+  java -version
+
+#    CURRENT_DIR=$(pwd)
+#    ${ECLIPSE_HOME}/eclipse -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher -metadataRepository file:/${CURRENT_DIR}/build_directory/updatesite/sgx-eclipse-plugin -artifactRepository file:/${CURRENT_DIR}/build_directory/updatesite/featuresAndBundles  -source ${CURRENT_DIR}/build_directory/  -config gtk.linux.x86 -compress -publishArtifacts
+#   cp ./build_directory/updatesite/featuresAndBundles/artifacts.jar ./build_directory/updatesite/sgx-eclipse-plugin/
+   
+  java \
+    -jar $LAUNCHER \
+    -application org.eclipse.ant.core.antRunner \
+    -buildfile $BUILDFILE \
+    -DbuildDirectory=$BUILDDIR \
+    -DbaseLocation=$BASELOCATION \
+    -Dbuilder=$BUILDCONFIG \
+    -DforceContextQualifier=$BUILDVERSION \
+      -v -v -v -v 
+
+}
+
+function findFirst() {
+    echo "enter Find First, $@" 1>&2
+  for i in "$@"; do
+    if [ -f "$i" ]; then
+	echo "found $i" 1>&2
+      echo "$i"
+      return
+    fi
+  done
+}
+
+function archivePlugin() {
+  pushd build_directory/updatesite/sgx-eclipse-plugin
+  zip -r Intel-sgx-eclipse-plugin.zip *
+  popd
+}
+
+main 

+ 52 - 0
Linux_SGXEclipsePlugin/build_config/allElements.xml

@@ -0,0 +1,52 @@
+<project name="allElements Delegator">
+	<property name="defaultAssemblyEnabled" value="true" />
+	
+ 	<!-- ===================================================================== 	-->
+ 	<!-- Run a given ${target} on all elements being built						-->
+ 	<!-- By default ${topLevelElementType} and ${topLevelElementId} should be	--> 
+ 	<!-- defined in the builder's build.properties file.  You can customize by	--> 
+ 	<!-- setting the type/id values directly here.								-->
+	<!-- You can add additional calls to ${genericTargets} to build more top 	-->
+	<!-- level elements.									   					-->
+	<!--																		-->
+	<!-- The top level must exist in the ${buildDirectory}, ${baseLocation} or	-->
+	<!-- ${pluginPath} locations.												-->
+ 	<!-- ===================================================================== 	-->
+ 	<target name="allElementsDelegator">
+ 		<ant antfile="${genericTargets}" target="${target}">
+	 		<property name="type" value="${topLevelElementType}" />
+	 		<property name="id" value="${topLevelElementId}" />
+ 		</ant>
+ 	</target>
+ 
+	<!-- ====================================================================== -->
+	<!--  The default assemble target, this will be called to assemble each		-->	 
+	<!--  config if a custom assemble target is not defined.					-->
+	<!-- The following properties will be defined:								-->
+	<!-- 		config : The configuration being assembled eg "win32.win32.x86"	-->
+	<!-- 		element: The element being assembled eg "org.eclipse.sdk"		-->
+	<!-- 		assembleScriptName: The assemble script to be called			-->
+	<!-- ====================================================================== -->
+	<target name="defaultAssemble">
+		<ant antfile="${assembleScriptName}" dir="${buildDirectory}" />
+	</target>	
+	
+ 	<!-- =====================================================================	-->
+ 	<!-- Custom targets to assemble the built elements for particular 			-->
+ 	<!-- configurations.  These generally call the generated assemble scripts 	-->
+ 	<!-- (named in  ${assembleScriptName}) but may also add pre and post		--> 
+ 	<!-- processing      														-->
+ 	<!-- Add one target for each root element and each configuration for which	--> 
+ 	<!-- custom processing is desired. Replace element.id with the id of the 	-->
+ 	<!-- top level element being built.  A property with a matching name must 	-->
+ 	<!-- be defined for this custom target to be called instead of the 			-->
+ 	<!-- defaultAssemble target above.											-->
+	<!--	Example:  name="assemble.org.eclipse.sdk"							-->
+	<!--	Example:  name="assemble.org.eclipse.sdk.win32.win32.x86"			-->
+ 	<!-- ====================================================================== -->
+	<property name="assemble.element.id[.config.spec]" value="true" />
+ 	<target name="assemble.element.id[.config.spec]">
+ 		<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
+ 	</target>
+	
+</project>

+ 307 - 0
Linux_SGXEclipsePlugin/build_config/build.properties

@@ -0,0 +1,307 @@
+
+###############################################################################
+# Copyright (c) 2003, 2011 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+#     Compuware Corporation - Sebastien Angers <sebastien.angers@compuware.com> 
+#     	- Enabled additional mirror slicingOptions in Headless PDE Build
+#     	- Enabled 'raw' attribute for mirror step in Headless PDE Build
+#     	- https://bugs.eclipse.org/338878
+###############################################################################
+#####################
+# Parameters describing how and where to execute the build.
+# Typical users need only update the following properties:
+#    baseLocation - where things you are building against are installed
+#    bootclasspath - The base jars to compile against (typicaly rt.jar)
+#    configs - the list of {os, ws, arch} configurations to build.  
+#
+# Of course any of the settings here can be overridden by spec'ing 
+# them on the command line (e.g., -DbaseLocation=d:/eclipse
+
+#The type of the top level element we are building,  generally "feature"
+topLevelElementType = feature
+#The id of the top level element we are building
+# the following feature will not be include in the final archive
+topLevelElementId = com.intel.sgx.build.driver
+
+############# PRODUCT/PACKAGING CONTROL #############
+#product=/plugin or feature id/path/to/.product
+#product=com.intel.sgx.feature
+runPackager=false
+
+#Set the name of the archive that will result from the product build.
+#archiveNamePrefix=
+
+# The prefix that will be used in the generated archive.
+archivePrefix=sgx-eclipse-plugin
+
+# The location underwhich all of the build output will be collected.
+collectingFolder=${archivePrefix}
+
+# The list of {os, ws, arch} configurations to build.  This 
+# value is a '&' separated list of ',' separate triples.  For example, 
+#     configs=win32,win32,x86 & linux,motif,x86
+# By default the value is *,*,*
+configs = *, *, *
+#configs=win32, win32, x86 & \
+#	win32,win32,x86_64 & \
+#	win32,win32,wpf & \
+#	linux, gtk, ppc & \
+#	linux, gtk, x86 & \
+#	linux, gtk, x86_64 & \
+#	linux, motif, x86 & \
+#	solaris, motif, sparc & \
+#	solaris, gtk, sparc & \
+#	aix, motif, ppc & \
+#	hpux, motif, ia64_32 & \
+#	macosx, carbon, ppc & \
+#	macosx, carbon, x86 & \
+#	macosx, cocoa, ppc & \
+#	macosx, cocoa, x86 & \
+#	macosx, cocoa, x86_64
+
+# By default PDE creates one archive (result) per entry listed in the configs property.
+# Setting this value to true will cause PDE to only create one output containing all 
+# artifacts for all the platforms listed in the configs property.
+# To control the output format for the group, add a "group, group, group - <format>" entry to the
+# archivesFormat. 
+#groupConfigurations=true
+
+#The format of the archive. By default a zip is created using antZip.
+#The list can only contain the configuration for which the desired format is different than zip.
+#archivesFormat=win32, win32, x86 - antZip& \
+#	linux, gtk, ppc - antZip &\
+#    linux, gtk, x86 - antZip& \
+#	linux, gtk, x86_64 - antZip& \
+# linux, motif, x86 - antZip& \
+#	solaris, motif, sparc - antZip& \
+#	solaris, gtk, sparc - antZip& \
+#	aix, motif, ppc - antZip& \
+#	hpux, motif, PA_RISC - antZip& \
+#	macosx, carbon, ppc - antZip
+
+#Allow cycles involving at most one bundle that needs to be compiled with the rest being binary bundles.
+allowBinaryCycles = true
+
+#Sort bundles depenedencies across all features instead of just within a given feature.
+#flattenDependencies = true
+
+#Parallel compilation, requires flattenedDependencies=true
+#parallelCompilation=true
+#parallelThreadCount=
+#parallelThreadsPerProcessor=
+	
+#Set to true if you want the output to be ready for an update jar (no site.xml generated)
+outputUpdateJars = true
+
+#Set to true for Jnlp generation
+#codebase should be a URL that will be used as the root of all relative URLs in the output.
+#generateJnlp=false
+#jnlp.codebase=<codebase url>
+#jnlp.j2se=<j2se version>
+#jnlp.locale=<a locale>
+#jnlp.generateOfflineAllowed=true or false generate <offlineAllowed/> attribute in the generated features
+#jnlp.configs=${configs}			#uncomment to filter the content of the generated jnlp files based on the configuration being built
+
+#Set to true if you want to sign jars
+#signJars=false
+#sign.alias=<alias>
+#sign.keystore=<keystore location>
+#sign.storepass=<keystore password>
+#sign.keypass=<key password>
+
+#Arguments to send to the zip executable
+zipargs=
+
+#Arguments to send to the tar executable
+tarargs=
+
+#individualSourceBundles=true
+
+#Control the creation of a file containing the version included in each configuration - on by default 
+#generateVersionsLists=false
+
+############ REPO MIRROR OPTIONS CONTROL ############
+# Default values for the slicingOptions and raw attribute of the p2.mirror Ant target used to generate the p2 repo (buildRepo)
+# Note that the default values used by PDE/Build are different from the default values for p2.mirror's slicingOptions and raw attribute
+# See http://help.eclipse.org/topic//org.eclipse.platform.doc.isv/guide/p2_repositorytasks.htm for the details
+# of each setting.
+#p2.mirror.slicing.filter=
+#p2.mirror.slicing.followOnlyFilteredRequirements=false
+#p2.mirror.slicing.followStrict=false
+#p2.mirror.slicing.includeFeatures=true
+#p2.mirror.slicing.includeNonGreedy=false
+#p2.mirror.slicing.includeOptional=true
+#p2.mirror.slicing.platformFilter=
+#p2.mirror.slicing.latestVersionOnly=false
+
+#p2.mirror.raw=false
+
+############## SOURCE BUNDLE CONTROL ################
+# Set this property to have source bundles created and output into build repository.
+# This does NOT put them in the build output (e.g., product) itself.
+# Valid values are: not set, built, all.
+# 		built = only source for bundles that are actually built/compiled in this run are output
+#		all = all available source is collected and output
+#sourceBundleMode=all
+
+# When outputting autogenerated source bundles a feature is created to contain all the automatic
+# source bundles.  Typically this feature is not needed and can be ignored. As such, it is given a default
+# name and version.  These properties can be used to override the defaults.
+#  sourceBundleTemplateFeature - can specify an existing feature which will be augmented to form the generated source feature
+#  sourceBundleFeatureId - will be the id of generated source feature which contains all the generated source bundles, default value
+#                          is sourceBundleTemplateFeature + ".source" if sourceBundleTemplateFeature is specified
+#sourceBundleTemplateFeature=
+#sourceBundleFeatureId=
+#sourceBundleFeatureVersion=
+
+############## BUILD NAMING CONTROL ################
+# The directory into which the build elements are fetched and where
+# the build takes place.
+#buildDirectory=
+
+# Type of build.  Used in naming the build output.  Typically this value is
+# one of I, N, M, S, ...
+buildType=build
+
+# ID of the build.  Used in naming the build output.
+buildId=${forceContextQualifier}
+
+# Label for the build.  Used in naming the build output
+buildLabel=${buildId}
+
+# Timestamp for the build.  Used in naming the build output
+timestamp=007
+
+#The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde.
+#The value will only be applied to plugin or features indicating build.properties, qualifier = context 
+#forceContextQualifier=
+
+#Enable / disable the generation of a suffix for the features that use .qualifier. 
+#The generated suffix is computed according to the content of the feature   
+#generateFeatureVersionSuffix=true
+
+############# BASE CONTROL #############
+# Settings for the base Eclipse components and Java class libraries 
+# against which you are building.
+# Base location for anything the build needs to compile against.  For example,
+# in most RCP app or a plug-in,  the baseLocation should be the location of a previously
+# installed Eclipse against which the application or plug-in code will be compiled and the RCP delta pack.
+
+base=<path/to/parent/of/eclipse>
+#baseLocation=
+
+#Folder containing repositories whose content is needed to compile against
+#repoBaseLocation=${base}/repos
+#Folder where the content of the repositories from ${repoBaseLocation} will be made available as a form suitable to be compiled against
+#transformedRepoLocation=${base}/transformedRepos
+
+#Os/Ws/Arch/nl of the eclipse specified by baseLocation
+baseos=win32
+basews=win32
+basearch=x86
+
+#this property indicates whether you want the set of plug-ins and features to be considered during the build to be limited to the ones reachable from the features / plugins being built
+filteredDependencyCheck=false
+
+#this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons)
+resolution.devMode=false
+
+#pluginPath is a list of locations in which to find plugins and features.  This list is separated by the platform file separator (; or :)
+#a location is one of:  
+#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo
+#- a directory that contains a /plugins or /features subdirectory
+#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml
+#pluginPath=
+
+skipBase=true
+eclipseURL=<url for eclipse download site>
+eclipseBuildId=<Id of Eclipse build to get>
+eclipseBaseURL=${eclipseURL}/eclipse-platform-${eclipseBuildId}-win32.zip
+
+
+############# MAP FILE CONTROL ################
+# This section defines CVS tags to use when fetching the map files from the repository.
+# If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml
+
+skipMaps=true
+mapsRepo=:pserver:anonymous@example.com/path/to/repo
+mapsRoot=path/to/maps
+mapsCheckoutTag=HEAD
+
+#tagMaps=true
+mapsTagTag=v${buildId}
+
+
+############ REPOSITORY CONTROL ###############
+# This section defines properties parameterizing the repositories where plugins, fragments
+# bundles and features are being obtained from. 
+
+# The tags to use when fetching elements to build.
+# By default thebuilder will use whatever is in the maps.  
+# This value takes the form of a comma separated list of repository identifier (like used in the map files) and the 
+# overriding value
+# For example fetchTag=CVS=HEAD, SVN=v20050101
+# fetchTag=HEAD
+skipFetch=true
+
+
+############# JAVA COMPILER OPTIONS ##############
+# The location of the Java jars to compile against.  Typically the rt.jar for your JDK/JRE
+#bootclasspath=${java.home}/lib/rt.jar
+
+# specific JRE locations to compile against. These values are used to compile bundles specifying a 
+# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support
+#CDC-1.0/Foundation-1.0= /path/to/rt.jar
+#CDC-1.1/Foundation-1.1=
+#OSGi/Minimum-1.0=
+#OSGi/Minimum-1.1=
+#JRE-1.1=
+#J2SE-1.2=
+#J2SE-1.3=
+#J2SE-1.4=
+#J2SE-1.5=
+#JavaSE-1.6=
+#PersonalJava-1.1=
+#PersonalJava-1.2=
+#CDC-1.0/PersonalBasis-1.0=
+#CDC-1.0/PersonalJava-1.0=
+#CDC-1.1/PersonalBasis-1.1=
+#CDC-1.1/PersonalJava-1.1=
+
+# Specify the output format of the compiler log when eclipse jdt is used
+logExtension=.log
+
+# Whether or not to include debug info in the output jars
+javacDebugInfo=false 
+
+# Whether or not to fail the build if there are compiler errors
+javacFailOnError=true
+
+# Enable or disable verbose mode of the compiler
+javacVerbose=true
+
+# Extra arguments for the compiler. These are specific to the java compiler being used.
+#compilerArg=
+
+# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
+javacSource=1.6
+
+# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
+javacTarget=1.6
+
+################### CUSTOM PROPERTIES #######################################
+# repository location for update site
+# comment out - this is passed in from command line 
+updateSiteSource=${buildDirectory}/sites
+# where to place update site build
+#updateSiteRoot=${user.home}/www/no_crawl/
+updateSiteRoot=${buildDirectory}/updatesite
+updateSiteFolder=${archivePrefix}
+updateSiteDestination=${updateSiteRoot}/${updateSiteFolder}
+

+ 13 - 0
Linux_SGXEclipsePlugin/build_config/buildUpdateSite.xml

@@ -0,0 +1,13 @@
+<project name="update site">
+  <!-- ========================================================================= -->
+  <!-- Extracts feature zip for update site                                      -->
+  <!-- expected properties:                                                      -->
+  <!--    id - feature id to extract                                             -->
+  <!--    buildDirectory - base directgory where build takes place               -->
+  <!--    buildLabel - build id label                                            -->
+  <!--    updateSiteRoot - where to extract feature zip                          -->
+  <!-- ========================================================================= -->
+  <target name="extractFeature">
+    <unzip src="${buildDirectory}/${buildLabel}/${id}-${buildId}.zip" dest="${updateSiteRoot}"/>
+  </target>
+</project>

+ 66 - 0
Linux_SGXEclipsePlugin/build_config/customAssembly.xml

@@ -0,0 +1,66 @@
+<project name="customAssembly.template" default="noDefault">
+
+	<!-- =====================================================================
+	    
+	    The Following Properties are available in all targets:
+		 - eclipse.base : the base folder everything will be collected into
+		 - eclipse.plugins : the plugins folder
+		 - eclipse.features: the features folder
+		 - archiveFullPath : the full path of the final archive once it is created
+		 
+		 ===================================================================== -->
+		 
+	<!-- =====================================================================  -->
+	<!-- Called after each invocation of the gather.bin.parts target on the     -->
+	<!-- individual plugins and features.                                       -->
+	<!-- Available properties are:                                              -->
+	<!--   projectLocation: location of the project being gathered              -->
+	<!--   projectName: symbolic name with version (org.eclipse.foo_1.0.0.v123) -->
+	<!--   target.folder: the destination, eclipse/plugins or eclipse/features  -->
+	<!--                                                                        -->
+	<!-- The generated pattern is that plugins/features are gathered into the   -->
+	<!-- folder ${target.folder}/${projectName}                                 -->
+	<!-- =====================================================================  -->
+	<target name="gather.bin.parts">
+	</target>
+	
+	<!-- ===================================================================== -->
+	<!-- Called after invoking the gather.bin.parts targets for all plugins    -->
+	<!-- and features. Results exist as folders and have not yet been jarred.  -->
+	<!-- ===================================================================== -->
+	<target name="post.gather.bin.parts">
+ 	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Called just prior to signing a jar                                    -->
+	<!-- In addititon to the properties listed above:						   -->
+	<!--    - source : plugins or features directory                           -->
+	<!--    - elementName: element being signed without .jar                   -->
+	<!--                   (eg "org.eclipse.foo_1.0.0"                         -->
+	<!-- ===================================================================== -->
+	<target name="pre.jarSigning">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Called after all plugins and features have been jarred                -->
+	<!-- (and potentially signed)                                              -->
+	<!-- ===================================================================== -->
+	<target name="post.jarUp">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Called just before the archive file is built                          -->
+	<!-- In addititon to the properties listed above:						   -->
+	<!--    - rootFolder : the folder containing the root files                -->
+	<!-- ===================================================================== -->
+	<target name="pre.archive">
+	</target>
+	
+	<!-- ===================================================================== -->
+	<!-- Default target                                                        -->
+	<!-- ===================================================================== -->
+	<target name="noDefault">
+		<echo message="You must specify a target when invoking this file" />
+	</target>
+
+</project>

+ 208 - 0
Linux_SGXEclipsePlugin/build_config/customTargets.xml

@@ -0,0 +1,208 @@
+<project name="customTargets.template" default="noDefault">
+
+	<!-- ===================================================================== -->
+	<!-- Run a given ${target} on all elements being built -->
+	<!-- Add on <ant> task for each top level element being built. -->
+	<!-- ===================================================================== -->
+	<available property="allElementsFile" file="${builder}/allElements.xml" value="${builder}/allElements.xml"/>
+	<property name="allElementsFile" location="${eclipse.pdebuild.templates}/headless-build/allElements.xml"/>
+    <property name="eclipse.running" value="false"/>
+
+	<import file="${allElementsFile}" />
+	<target name="allElements">
+		<antcall target="allElementsDelegator" />
+	</target>
+	
+	<!-- ===================================================================== -->
+	<!-- ===================================================================== -->
+	<target name="getBaseComponents" depends="checkLocalBase" unless="skipBase">
+		<get src="${eclipseBaseURL}" dest="${buildDirectory}/../temp-base.zip" />
+		<unzip dest="${base}" overwrite="true" src="${buildDirectory}/../temp-base.zip" />
+	</target>
+
+	<target name="checkLocalBase">
+		<available file="${base}" property="skipBase" />
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Check out map files from correct repository -->
+	<!-- Replace values for mapsCheckoutTag as desired. -->
+	<!-- ===================================================================== -->
+	<target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps">
+		<property name="mapsCheckoutTag" value="HEAD" />
+		<cvs cvsRoot="${mapsRepo}" package="${mapsRoot}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" />
+	</target>
+
+	<target name="checkLocalMaps">
+		<available property="skipMaps" file="${buildDirectory}/maps" />
+	</target>
+
+	<target name="tagMapFiles" if="tagMaps">
+		<cvs dest="${buildDirectory}/maps/${mapsRoot}" command="tag ${mapsTagTag}" />
+	</target>
+
+	<!-- ===================================================================== -->
+
+	<target name="clean" unless="noclean">
+		<antcall target="allElements">
+			<param name="target" value="cleanElement" />
+		</antcall>
+	</target>
+
+	<target name="gatherLogs">
+		<mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
+		<antcall target="allElements">
+			<param name="target" value="gatherLogs" />
+		</antcall>
+		<unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
+			<fileset dir="${buildDirectory}/features">
+				<include name="**/*.log.zip" />
+			</fileset>
+		</unzip>
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before setup -->
+	<!-- ===================================================================== -->
+	<target name="preSetup">
+        <eclipse.generateFeature
+            featureId="com.intel.sgx.build.driver"
+            buildDirectory="${buildDirectory}"
+            baseLocation="${baseLocation}"
+            productFile="${product}"
+            verify="false"
+            pluginPath="${pluginPath}"
+            configInfo="${configs}"
+            pluginList="com.intel.sgx,com.intel.sgx.userguide"
+            featureList="com.intel.sgx.feature"
+            includeLaunchers="false"
+        />
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after setup but before starting the build proper -->
+	<!-- ===================================================================== -->
+	<target name="postSetup">
+		<antcall target="getBaseComponents" />
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before fetching the build elements -->
+	<!-- ===================================================================== -->
+	<target name="preFetch">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after fetching the build elements -->
+	<!-- ===================================================================== -->
+	<target name="postFetch">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before the repositories are being processed -->
+	<!-- ===================================================================== -->
+	<target name="preProcessRepos">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after the repositories have been processed -->
+	<!-- ===================================================================== -->
+	<target name="postProcessRepos">
+	</target>
+	
+	<!-- ===================================================================== -->
+	<!-- Steps to do before generating the build scripts. -->
+	<!-- ===================================================================== -->
+	<target name="preGenerate">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after generating the build scripts. -->
+	<!-- ===================================================================== -->
+	<target name="postGenerate">
+		<antcall target="clean" />
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before running the build.xmls for the elements being built. -->
+	<!-- ===================================================================== -->
+	<target name="preProcess">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after running the build.xmls for the elements being built. -->
+	<!-- ===================================================================== -->
+	<target name="postProcess">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before running assemble. -->
+	<!-- ===================================================================== -->
+	<target name="preAssemble">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after  running assemble. -->
+	<!-- ===================================================================== -->
+	<target name="postAssemble">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do before running package. -->
+	<!-- ===================================================================== -->
+	<target name="prePackage">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after  running package. -->
+	<!-- ===================================================================== -->
+	<target name="postPackage">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after the build is done. -->
+	<!-- ===================================================================== -->
+	<target name="postBuild">
+		<antcall target="gatherLogs" />
+    <!-- Added this custom target ! -->
+    <antcall target="generateUpdateSite" />
+  </target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do to test the build results -->
+	<!-- ===================================================================== -->
+	<target name="test">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do to publish the build results -->
+	<!-- ===================================================================== -->
+	<target name="publish">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Default target                                                        -->
+	<!-- ===================================================================== -->
+	<target name="noDefault">
+		<echo message="You must specify a target when invoking this file" />
+	</target>
+
+  <!-- ===================================================================== -->
+  <!-- Custom target:                                                        -->
+  <!-- Steps to do to generate the update site                               -->
+  <!-- ===================================================================== -->
+  <target name="generateUpdateSite">
+    <echo message="Copying update site source ${updateSiteSource} to destination ${updateSiteDestination}"/>
+    <copy file="${updateSiteSource}/site.xml" overwrite="true" todir="${updateSiteDestination}"/>
+    <!-- replace qualifier version references with build label -->
+   
+    <replace file="${updateSiteDestination}/site.xml" token="qualifier" value="${forceContextQualifier}"/>
+  
+    <!-- now extract each features zip to update site -->
+    <antcall target="allElements">
+      <param name="genericTargets" value="${builder}/buildUpdateSite.xml"/>
+      <param name="target" value="extractFeature" />
+    </antcall>
+  </target>
+
+</project>

+ 28 - 0
Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/.project

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--                                                                       -->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--                                                                       -->
+<projectDescription>
+	<name>com.intel.sgx.feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>

+ 15 - 0
Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/build.properties

@@ -0,0 +1,15 @@
+#########################################################################
+# Copyright (c) 2016 Intel Corporation.				        #
+# 								        #
+# All rights reserved. This program and the accompanying materials      #
+# are made available under the terms of the Eclipse Public License v1.0 #
+# which accompanies this distribution, and is available at	        #
+# http://www.eclipse.org/legal/epl-v10.html			        #
+# 								        #
+# Contributors:							        #
+#     Intel Corporation - initial implementation and documentation      #
+#########################################################################
+
+bin.includes = feature.xml,\
+               build.properties
+generate.plugin@com.intel.sgx.source = com.intel.sgx.feature

File diff suppressed because it is too large
+ 64 - 0
Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/feature.xml


+ 18 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/.classpath

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--                                                                       -->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--                                                                       -->
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

+ 39 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/.project

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--                                                                       -->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--                                                                       -->
+<projectDescription>
+	<name>com.intel.sgx.userguide</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

+ 11 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/META-INF/MANIFEST.MF

@@ -0,0 +1,11 @@
+License:  Eclipse Public License Version 1.0 ("EPL")
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: SGX Eclipse Plugin Userguide
+Bundle-SymbolicName: com.intel.sgx.userguide;singleton:=true
+Bundle-Version: 1.0.1.qualifier
+Bundle-Activator: com.intel.sgx.userguide.Activator
+Bundle-Vendor: INTEL
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime
+Bundle-ActivationPolicy: lazy

+ 19 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/build.properties

@@ -0,0 +1,19 @@
+#########################################################################
+# Copyright (c) 2016 Intel Corporation.				        #
+# 								        #
+# All rights reserved. This program and the accompanying materials      #
+# are made available under the terms of the Eclipse Public License v1.0 #
+# which accompanies this distribution, and is available at	        #
+# http://www.eclipse.org/legal/epl-v10.html			        #
+# 								        #
+# Contributors:							        #
+#     Intel Corporation - initial implementation and documentation      #
+#########################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+               META-INF/,\
+               .,\
+               html/,\
+               *.xml

+ 22 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Adding_SGX_Nature_to_a_Project.htm

@@ -0,0 +1,22 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="2" MadCap:lastHeight="383" MadCap:lastWidth="576">
+    <head><title>Adding SGX Nature to a Project</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h2>Adding SGX Nature to a Project</h2>
+        <p>The <i>nature</i> of an Eclipse project is a concept defined by an Eclipse Platform which allows a plug-in to tag a project as a specific kind of project.   Intel(R) Software Guard Extensions  uses an <i>SGX nature</i> to add SGX-specific behavior to projects.  Project natures are defined by plug-ins, and are typically added or removed per-project when the user performs some action defined by the plug-in.</p>
+        <p>To use Intel(R) Software Guard Extensions Eclipse Plug-in in your project, you need to add SGX nature to it.   You may either add SGX nature to a pre-existing C/C++ project or create a project with SGX nature from start.  See <a href="Adding_SGX_Nature_to_a_non_SGX_project.htm">Adding SGX Nature to a non-SGX project</a> and <a href="Creating_a_New_C_C_Project_with_SGX_Nature.htm">Creating a New C/C++ Project with SGX Nature</a> for how to complete these tasks.</p>
+    </body>
+</html>

+ 55 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Adding_SGX_Nature_to_a_non_SGX_project.htm

@@ -0,0 +1,55 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="4" MadCap:lastHeight="1808" MadCap:lastWidth="563">
+    <head><title>Adding SGX Nature to a non-SGX project</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h3>Adding SGX Nature to a non-SGX project</h3>
+        <p>When you have a C/C++ project created without Intel SGX, you cannot use Intel SGX support.  In this case, you need to add SGX nature to this project to use Intel SGX support:</p>
+        <ol>
+            <li>Right-click on the project root <![CDATA[	]]></li>
+            <li>
+                <p>Select <b>Software Guard Extension Tools → Add SGX Nature</b></p>
+                <p>
+                    <img src="Resources/Images/Add_SGX_Nature.png" />
+                </p>
+                <p class="figcap">Add SGX Nature</p>
+            </li>
+        </ol>
+        <p>After you add the SGX nature to your project, you should see:</p>
+        <ul>
+            <li>
+                <p>A subdirectory <code>sgx</code> in the project which contains a  Makefile file.</p>
+                <p>
+                    <img src="Resources/Images/Makefile_for_Intel_SGX.png" />
+                </p>
+                <p class="figcap">Makefile for Intel(R) SGX</p>
+            </li>
+            <li>
+                <p>The Intel SGX tools as shown in the following graphic:</p>
+                <p>
+                    <img src="Resources/Images/Intel_SGX_Tools.png" />
+                </p>
+                <p class="figcap">Intel(R) SGX Tools</p>
+            </li>
+            <li>
+                <p>New configurations specific to SGX technology.  You may see the configurations for the project by clicking to the down arrow of button <img src="Resources/Images/Down_Arrow_Button.png" /> usually found at the top of the Eclipse window:</p>
+                <p>
+                    <img src="Resources/Images/Configurations_Specific_to_Intel_SGX_Technology.png" />
+                </p>
+                <p class="figcap">Configurations Specific to Intel(R) SGX Technology</p>
+            </li>
+        </ul>
+    </body>
+</html>

+ 54 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Adding_an_SGX_Enclave.htm

@@ -0,0 +1,54 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="2003" MadCap:lastWidth="524">
+    <head><title>Adding an SGX Enclave</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h2>Adding an SGX Enclave</h2>
+        <p>After you add the SGX nature to a project, you can start creating a minimal but complete skeleton for a new enclave:</p>
+        <ol>
+            <li>Right-click on the project root in <b>Project Explorer</b>.</li>
+            <li>
+                <p>Open the dialog <b>Add New SGX Enclave</b> by selecting <b>Software Guard Extensions Tools → Add SGX Enclave</b> from the contextual menu.</p>
+                <p>
+                    <img src="Resources/Images/Add_New_Intel_SGX_Enclave_Dialog.png" />
+                </p>
+                <p class="figcap">Add New Intel® SGX Enclave Dialog</p>
+            </li>
+            <li>
+                <p>Choose a name for the enclave in <b>Enclave name</b> field.  This name is used in the process of generation of the skeleton to give unicity to the source files and the name of the resulting executable, so you can add more than one enclave to the same project.</p>
+                <ul>
+                    <li>
+                        <p>If you do not select the <b>Generate sample untrusted application</b> checkbox, the plugin generates only a trusted file and a Makefile fragment to build and compile the trusted part. See the following graphic.   All the code for the enclave, including build Makefile, is put in a directory <code>&lt;root&gt;/sgx/enclave_&lt;name&gt;</code> .   C/C++ code for the enclave proper are in <code>&lt;root&gt;/sgx/enclave_&lt;name&gt;/trusted</code>.</p>
+                        <p>
+                            <img src="Resources/Images/Generated_Skeleton_for_an_Enclave.png" />
+                        </p>
+                        <p class="figcap">Generated Skeleton for an Enclave.  The option to Generate Sample was not Used</p>
+                    </li>
+                    <li>
+                        <p>If you select <b>Generate sample untrusted application</b> checkbox, a simple ready to work sample application is generated, including untrusted stubs and implementation for a sample OCALL and ECALL.</p>
+                        <p>
+                            <img src="Resources/Images/Generated_Sample_Untrusted_Application.png" />
+                        </p>
+                        <p class="figcap">Generated Sample Untrusted Application</p>
+                    </li>
+                </ul>
+            </li>
+        </ol>
+        <div class="NoteCont">
+            <p class="NoteTipHead">NOTE:</p>
+            <p>If you select the <b>Generate sample untrusted application</b> checkbox, ecalls from the untrusted part are not be resolved by Eclipse C/C++ indexer. These functions are marked with a red line. The declaration of these ecalls resides in the unstrusted stub header which is generated during the build proces and is not indexed by Eclipse. To resolve this problem, right-click on project root and select <b>Index → Freshen All Files</b>.</p>
+        </div>
+    </body>
+</html>

+ 39 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Adding_an_SGX_Trusted_Library.htm

@@ -0,0 +1,39 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="4" MadCap:lastHeight="887" MadCap:lastWidth="550">
+    <head><title>Adding an SGX Trusted Library</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h2>Adding an SGX Trusted Library</h2>
+        <p>Trusted Static Libraries helps enclave author  have libraries of shared code to be reused by enclaves, in exactly the same manner as usual static <code>libxxx.a</code> libraries are used to share code between regular non-SGX applications.  The plugin adds a command to generate the skeleton of a trusted shared library.</p>
+        <p>To add a new SGX Trusted Library:</p>
+        <ol>
+            <li>
+                <p>Open <b>Add New SGX Static Trusted Library</b> dialog by right-click on the root of the project and select the appropriate command from <b>Software Guard Extensions Tools</b> menu:</p>
+                <p>
+                    <img src="Resources/Images/Add_New_SGX_Static_Trusted_Library_Dialog.png" />
+                </p>
+                <p class="figcap">Add New SGX Static Trusted Library Dialog</p>
+            </li>
+            <li>
+                <p>Choose a name for the library and click <b>OK</b>. A skeleton for a trusted library is generated in directory <code>&lt;root&gt;/sgx/trustedlib_&lt;name&gt;</code>:</p>
+                <p>
+                    <img src="Resources/Images/A_Generated_Trusted_Library.png" />
+                </p>
+                <p class="figcap">A Generated Trusted Library</p>
+            </li>
+        </ol>
+    </body>
+</html>

+ 39 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Adding_an_SGX_Untrusted_Module.htm

@@ -0,0 +1,39 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="4" MadCap:lastHeight="898" MadCap:lastWidth="550">
+    <head><title>Adding an SGX Untrusted Module</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h2>Adding an SGX Untrusted Module</h2>
+        <p>Add an untrusted module to generate the untrusted stubs so you use an enclave, provided you have access to its <code>.edl</code> file.  The enclave might have been built in the current project or in a different project.</p>
+        <p>To use trusted functionality of an enclave for which its <code>*.edl</code> is known, use the command <b>Add SGX Untrusted Module</b>:</p>
+        <ol>
+            <li>
+                <p>Open dialog <b>Add Sgx Untrusted Module</b> by right-click-ing the project root in <b>Package Explorer</b> and chose the command from <b>Software Guard Extension Tools</b>.</p>
+                <p>
+                    <img src="Resources/Images/Add_SGX_Untrusted_Module.png" />
+                </p>
+                <p class="figcap">Add SGX Untrusted Module</p>
+            </li>
+            <li>
+                <p>Use the <b>Browse</b> button to navigate the file system using a file dialog, and click <b>OK</b>. The untrusted module is copied to <code>&lt;root&gt;/sgx/untrusted_&lt;edl file name&gt;</code>.  The selected <code>*.edl</code> is copied to the project.</p>
+                <p>
+                    <img src="Resources/Images/Copying_the_Untrusted_Module_to_a_Project.png" />
+                </p>
+                <p class="figcap">Copying the Untrusted Module to a Project</p>
+            </li>
+        </ol>
+    </body>
+</html>

+ 25 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Building_and_Running_SGX_Code.htm

@@ -0,0 +1,25 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="4" MadCap:lastHeight="210" MadCap:lastWidth="550">
+    <head><title>Building and Running SGX Code</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h1>Building and Running SGX Code</h1>
+        <p>This section describes the following topics about building and running SGX code:</p>
+        <ul>
+            <li>SGX build configurations</li>
+            <li>Running samples generated for enclaves</li>
+        </ul>&#160;</body>
+</html>

+ 30 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Command_Reference.htm

@@ -0,0 +1,30 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="4" MadCap:lastHeight="1060" MadCap:lastWidth="565">
+    <head><title>Command Reference</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h1>Command Reference</h1>
+        <p>This topic provides the command reference for the following scenarios of using Intel(R) Software Guard Extensions Eclipse* Plug-in:</p>
+        <ul>
+            <li>Adding SGX nature to a project</li>
+            <li>Adding an SGX enclave</li>
+            <li>Adding an SGX trusted library</li>
+            <li>Adding an SGX untrusted module</li>
+            <li>Updating SGX enclave signing key</li>
+            <li>Updating enclave configuration files</li>
+            <li>Two steps sign enclave</li>
+        </ul>
+        <p>All commands brought by Intel(R) Software Guard Extensions Eclipse Plug-in are available by right-clicking on the Project root in Project explorer view in menu <b>Software Guard Extension Tools</b>:</p>&#160;<p><img src="Resources/Images/Project_Explorer.png" /></p><p class="figcap">Project Explorer</p>&#160;</body>
+</html>

+ 31 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Configuring_Intel_Software_Guard_Extensions_Eclipse_Plug-in.htm

@@ -0,0 +1,31 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="690" MadCap:lastWidth="524">
+    <head><title>Configuring Intel(R) Software Guard Extensions Eclipse* Plug-in</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h2>Configuring Intel(R) Software Guard Extensions Eclipse* Plug-in</h2>
+        <p>If you do not install Intel(R) SGX SDK for Linux* OS in the default location, you need to specify the path for Intel SGX SDK  using the following steps:</p>
+        <ol>
+            <li>
+                <p>Go to <b>Window menu -&gt;Preferences</b>. Enter SGX in the filter text field to quickly locate the <b>SGX Preferences</b> page.</p>
+                <p>
+                    <img src="Resources/Images/SGX_Preference_Page.png" />
+                </p>
+                <p class="figcap">SGX Preference Page</p>
+            </li>
+            <li>Enter the path for Intel SGX SDK for Linux OS in the <b>SGX SDK Directory</b> field.</li>
+        </ol>
+    </body>
+</html>

+ 37 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Creating_a_New_C_C_Project_with_SGX_Nature.htm

@@ -0,0 +1,37 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="4" MadCap:lastHeight="1000" MadCap:lastWidth="550">
+    <head><title>Creating a New C/C++ Project with SGX Nature</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h3>Creating a New C/C++ Project with SGX Nature</h3>
+        <p>You can create a new project with SGX nature. To create such a project, follow these steps:</p>
+        <ol>
+            <li>
+                <p>Open a standard Eclipse new project: <b>File menu → Project...</b>  . If you have installed Intel® Software Guard Extensions Eclipse Plug-in,  you can see the category C/C++ with SGX Enabled in the <b>New Project</b> dialog.</p>
+                <p>
+                    <img src="Resources/Images/New_Project.png" />
+                </p>
+                <p class="figcap">New Project</p>
+                <p>This category has 2 sub-categories, <b>SGX C project</b> and <b>SGX C++ project</b>.  These sub-categories are similar to the sub-categories C Project and C++ Project of standard C/C++ category.</p>
+            </li>
+            <li>Select one of the 2 sub-categories, SGX C project or SGX C++ project, and click <b>Next</b>.</li>
+            <li>Complete creating the project using the regular process of creating a standard C or C++ project.</li>
+        </ol>
+        <div class="NoteCont">
+            <p class="NoteTipHead">NOTE:</p>
+            <p>Projects created following the subcategories under <b>C/C++ with SGX Enabled</b> are identical with their standard counterparts, except that they have SGX Nature added.  There is no difference between creating a C or C++ project with SGX enabled, or creating a standard C/C++ project and launch <b>Add SGX nature</b> from it, as described in precedent paragraph.</p>
+        </div>
+    </body>
+</html>

File diff suppressed because it is too large
+ 27 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Generate_Hash.htm


+ 39 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Generate_Signed_Enclaves.htm

@@ -0,0 +1,39 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="4" MadCap:lastHeight="912" MadCap:lastWidth="614">
+    <head><title>Generate Signed Enclaves</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h3>Generate Signed Enclaves</h3>
+        <p>Generating signed enclave is the second step in the 2-Steps signing process.  You should have the following files to complete this step:</p>
+        <ul>
+            <li>The <code>.hex</code> file generated with <b>Generate Hash</b> command</li>
+            <li>The files produced from the external signing facility</li>
+            <li>The signature of the <code>.hex</code> file</li>
+            <li>The public verification key</li>
+        </ul>
+        <p>To generate signed encalves, use the following steps:</p>
+        <ol>
+            <li>
+                <p>Right-click on the project root, and go to <b>Software Guard Extensions Tools menu → Two Step Sign Enclave → Generate Signed Enclave</b>.</p>
+                <p>
+                    <img src="Resources/Images/Generate_Signed_Enclave_Dialog.png" />
+                </p>
+                <p>Generate Signed Enclave Dialog</p>
+            </li>
+            <li>Enter the inputs to all the fields and click <b>OK</b>.</li>
+        </ol>
+    </body>
+</html>

+ 23 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Getting_Started.htm

@@ -0,0 +1,23 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="2" MadCap:lastHeight="345" MadCap:lastWidth="576">
+    <head><title>Getting Started with Intel(R) Software Guard Extensions Eclipse* Plugin</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h1>Getting Started with Intel(R) Software Guard Extensions Eclipse* Plugin</h1>
+        <p>This section contains steps to set up your Intel(R) Software Guard Extensions Eclipse* Plugin on a Linux* system, including necessary softwares, steps to install the product, and steps to configure your preferred product directory.</p>
+        <p>•	Pre-requisites</p>
+        <p>•	Installation Intel(R) Software Guard Extensions Eclipse* Plug-in</p>
+        <p>•	Configuring Intel(R) Software Guard Extensions Eclipse* Plug-in</p>&#160;</body>
+</html>

+ 40 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Installing_Intel_Software_Guard_Extensions_Eclipse_Plugin.htm

@@ -0,0 +1,40 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="6" MadCap:lastHeight="1511" MadCap:lastWidth="681">
+    <head><title>Installing Intel(R) Software Guard Extensions Eclipse* Plug-in</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h2>Installing Intel(R) Software Guard Extensions Eclipse* Plug-in</h2>
+        <p>Install Intel(R) Software Guard Extensions Eclipse* Plug-in as a regular Eclipse Plugin:</p>
+        <ol>
+            <li>Download the zip archive of Intel(R) Software Guard Extensions Eclipse Plug-in from Intel Site</li>
+            <li>
+                <p>Go to <b>Help menu -&gt; Install New Software</b>. Click the <b>Add</b> button for the <b>Work with</b> field to open the <b>Add Repository</b> dialog as shown in the following graphic:</p>
+                <p>
+                    <img src="Resources/Images/Add_Repository_Dialog.png" />
+                </p>
+                <p class="figcap">Add Repository Dialog</p>
+            </li>
+            <li>
+                <p>Enter  <code>SGX Archive</code> in the <b>Name</b> field .  Click the <b>Archive...</b> button and select the location of the downloaded archive as shown in the following graphic:</p>
+                <p>
+                    <img src="Resources/Images/The_Location_of_the_Plugin_zip_Archive.png" />
+                </p>
+                <p class="figcap">The Location of the Plugin zip Archive</p>
+            </li>
+            <li>Press <b>OK</b>  to add the archive as a repository.</li>
+            <li>In the <b>Install</b> dialog, select the <b>Software Guard Extensions Plugin</b> check-box and proceed with the usual steps.</li>
+        </ol>
+    </body>
+</html>

+ 42 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Introducing_Intel_Software_Guard _Extensions_Eclipse_Plugin.htm

@@ -0,0 +1,42 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="4" MadCap:lastHeight="1175" MadCap:lastWidth="804">
+    <head><title>What is Intel(R) Software Guard Extensions?</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h2>Introducing Intel(R) Software Guard Extensions</h2>
+        <p>Intel(R) Software Guard Extensions is a new Intel technology, whose objective is to enable a high level of protection of secrets. It operates by allocating hardware-protected memory where code and data reside. The protected memory area within an application process is called an enclave. Data within the enclave memory can only be accessed by code that resides within that enclave. Enclave code can be invoked by special instructions.</p>
+        <p>An enclave can be built and loaded as a shared object.</p>
+        <p>Throughout this document, Intel(R) SGX refers to Intel(R) Software Guard Extensions.</p>
+        <p>An Intel(R) SGX application design is different from the design of non- Intel(R) SGX application as it specifies dividing the application into two logical parts:</p>
+        <ul>
+            <li><i>Trusted</i> part. The code that accesses the secret resides here and it is called an enclave. More than one enclave can exist in an application.</li>
+            <li><i>Untrusted</i> part. This includes the rest of the modules in the application, that is outside in an enclave.</li>
+        </ul>
+        <p>The trusted components and untrusted components are developed as separate modules.</p>
+        <p>The trusted part or the enclave is implemented in C or C++. It is supplied as a collection of functions and data packaged in the form of a dynamically loaded library, a DLL in Windows* OS and a shared object in Linux* OS. It may be supplied either as a pre-built signed library or as a signed shared library built during compilation of the untrusted component.</p>
+        <p>Enclave functions within an enclave library are wrapped by auto-generated proxy and bridge functions that simplify the mechanism of using the Intel(R) SGX technology by developers.</p>
+        <p>The role of these functions is to handle the following tasks:</p>
+        <ul>
+            <li>Call an enclave function from untrusted code, also called an ECALL (enclave call).</li>
+            <li>Call an untrusted function from within an enclave, also called an OCALL (outside call).</li>
+            <li>Handle interrupts.</li>
+            <li>Handle exceptions.</li>
+        </ul>
+        <p>The proxy and bridge functions are generated by the <code>sgx_edger8r</code> tool provided by Intel(R) SGX SDK. It reads an <i>edl</i> file (Enclave Descriptor Language) which describes the functions that form the <i>trusted</i> and <i>untrusted</i> component boundaries within the application.</p>
+        <p>After the enclave is built, a signed version of it is created using the tool <code>sgx_sign</code> also provided by Intel(R) SGX SDK.  It is this signed version may be loaded and executed in the encrypted memory.</p>
+        <p>Enclaves may have some specific properties which are added as meta-information during the signing process.  The meta-information is stored in one configuration xml file per enclave, whose details may be seen in <i>Intel(R) Software Guard Extensions Evaluation SDK for Linux* OS</i>.</p>
+    </body>
+</html>

+ 23 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Introducing_Intel_Software_Guard_Extensions.htm

@@ -0,0 +1,23 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="2" MadCap:lastHeight="556" MadCap:lastWidth="576">
+    <head><title>What can be done with Linux SGX Eclipse Plugin?</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h2>Introducing Intel(R) Software Guard Extensions Eclipse* Plugin</h2>
+        <p>The Intel(R) Software Guard Extensions Eclipse* Plug-in helps the enclave developer to maintain enclaves and untrusted related code inside Eclipse* C/C++ projects.   To use this support, add SGX nature to the C/C++ project.  See <a href="Adding_SGX_Nature_to_a_Project.htm">Adding SGX Nature to a Project</a> for details.</p>
+        <p>Once the SGX nature is added to a project, you will have access to the SGX commands.  SGX nature adds also a folder called <code>sgx</code> to the root of the project, and a Makefile inside it.   All resources of the project managed by Intel(R) Software Guard Extensions Eclipse Plug-inare located inside this directory.  You can build and run enclaves related code using GNU* Make tool through the Makefile.</p>
+        <p>The plugin is generating minimal but ready-to-work code skeletons, complete with their own Makefile having all the required make targets as to call <code>sgx_edger8r</code> tool to generate the proxies and bridges, compile these source, generate a shared object and finally, to sign the enclave with the <code>sgx_sign</code> tool.  This provide a starting point you may build upon.</p>
+    </body>
+</html>

+ 21 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Introduction.htm

@@ -0,0 +1,21 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="2" MadCap:lastHeight="387" MadCap:lastWidth="576">
+    <head><title>Introduction</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h1>Introduction</h1>
+        <p>This <i>Developer Guide</i> is intended for use by Independent Service Vendors who wish to harden their Linux* applications using Intel(R) SGX Technology, code named Intel(R) Software Guard Extensions. The guide describes the procedure for installation of Intel(R) SGX Plugin for Eclipse* IDE and development of Intel(R) SGX components using the plugin. The Intel(R) SGX Plugin for Eclipse leverages on the Intel(R) Software Guard Extensions Evaluation SDK, which is a collection of APIs, libraries and tools that enable you to develop, build and debug Intel(R) SGX applications in C/C++.</p>
+        <p>To learn more about the Intel(R) Software Guard Extensions Evaluation SDK, see the <i>Intel(R) Software Guard Extensions Evaluation SDK for Linux* OS</i>.</p>&#160;</body>
+</html>

+ 70 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Legal_Information.htm

@@ -0,0 +1,70 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml" MadCap:lastBlockDepth="5" MadCap:lastHeight="1269" MadCap:lastWidth="537" xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd">
+    <head><title xmlns="">Legal Information</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h1>Legal Information</h1>
+        <p>No license (express or implied, by estoppel or otherwise) to any intellectual 
+ property rights is granted by this document.</p>
+        <p>Intel disclaims all express and implied warranties, including without 
+ limitation, the implied warranties of merchantability, fitness for a particular 
+ purpose, and non-infringement, as well as any warranty arising from course 
+ of performance, course of dealing, or usage in trade.</p>
+        <p>This document contains information on products, services and/or processes 
+ in development. &#160;All information provided here is subject to change 
+ without notice. Contact your Intel representative to obtain the latest 
+ forecast, schedule, specifications and roadmaps.</p>
+        <p>The products and services described may contain defects or errors known 
+ as errata which may cause deviations from published specifications. Current 
+ characterized errata are available on request.</p>
+        <p>Intel technologies features and benefits depend on system configuration 
+ and may require enabled hardware, software or service activation. Learn 
+ more at Intel.com, or from the OEM or retailer.</p>
+        <p>Copies of documents which have an order number and are referenced in 
+ this document may be obtained by calling 1-800-548-4725 or by visiting 
+ <a href="http://www.intel.com/design/literature.htm">www.intel.com/design/literature.htm</a>.</p>
+        <p>Intel, the Intel logo, Xeon, and Xeon Phi are trademarks of Intel Corporation 
+ in the U.S. and/or other countries. </p>
+        <table style="border-left-style: solid;border-left-width: 1px;border-right-style: solid;border-right-width: 1px;border-top-style: solid;border-top-width: 1px;border-bottom-style: solid;border-bottom-width: 1px;">
+            <col />
+            <tr>
+                <th>
+                    <p>Optimization Notice</p>
+                </th>
+            </tr>
+            <tr bgcolor="#CCECFF">
+                <td>
+                    <p>Intel's compilers may or may not optimize to the same degree 
+		 for non-Intel microprocessors for optimizations that are not unique 
+		 to Intel microprocessors. These optimizations include SSE2, SSE3, 
+		 and SSSE3 instruction sets and other optimizations. Intel does 
+		 not guarantee the availability, functionality, or effectiveness 
+		 of any optimization on microprocessors not manufactured by Intel. 
+		 Microprocessor-dependent optimizations in this product are intended 
+		 for use with Intel microprocessors. Certain optimizations not 
+		 specific to Intel microarchitecture are reserved for Intel microprocessors. 
+		 Please refer to the applicable product User and Reference Guides 
+		 for more information regarding the specific instruction sets covered 
+		 by this notice.</p>
+                    <p style="text-align: right;">Notice revision #20110804</p>
+                </td>
+            </tr>
+        </table>
+        <p>* Other names and brands may be claimed as the property of others.</p>
+        <p>© 2016 Intel Corporation.</p>
+    </body>
+</html>

+ 27 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Prerequisites.htm

@@ -0,0 +1,27 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="4" MadCap:lastHeight="328" MadCap:lastWidth="550">
+    <head><title>Pre-requisites</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h2>Pre-requisites</h2>
+        <p>To use Intel(R) Software Guard Extensions Eclipse Plug-in, install the following softwares:</p>
+        <ul>
+            <li>Eclipse* Mars 1 with CDT IDE for C/C++ Developpers (version 4.5.1).   To use this version, install Java* Development Kit (JDK) or Java* Runtime Environment (JRE)  version 1.8 or above.</li>
+            <li>gcc/g++ tools</li>
+            <li>Openssl*</li>
+            <li>Intel(R) SGX SDK for Linux* OS</li>
+        </ul>
+    </body>
+</html>

BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/A_Generated_Trusted_Library.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_New_Intel_SGX_Enclave_Dialog.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_New_SGX_Static_Trusted_Library_Dialog.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_Repository_Dialog.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_SGX_Nature.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_SGX_Untrusted_Module.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Configurations_Specific_to_Intel_SGX_Technology.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Configure_SGX_Hardware_Release_Mode.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Copying_the_Untrusted_Module_to_a_Project.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Customization_of_SGX_build_command.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Down_Arrow_Button.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Enclave_Configuration_Settings.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generate_Signed_Enclave_Dialog.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generate_Signed_Enclave_Dialog_with_Pre_configurations.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generated_Sample_Untrusted_Application.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generated_Skeleton_for_an_Enclave.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generating_Hash_Completion_Dialog.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Import_or_Re_Generate_Enclave_Signing_Key.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Intel_SGX_Configurations.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Intel_SGX_Tools.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Makefile_for_Intel_SGX.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/New_Project.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Project_Explorer.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Project_Menu.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/SGX_Preference_Page.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Sample_Application.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Select_Configuration_File.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/The_Location_of_the_Plugin_zip_Archive.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/The_Result_of_Running_Samples_Generated_for_Enclaves.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Two_StepSigne_Enclave_Generate_Hash.png


BIN
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Two_Step_Sign_Enclave_Menu.png


+ 22 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/PageLayouts/Default.flpgl

@@ -0,0 +1,22 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+<?xml version="1.0" encoding="utf-8"?>
+<PageStyles>
+    <Page Name="Normal" Width="800" Height="800" Padding="1in" PageSize="Letter" PaddingLeft="1.50cm" PaddingRight="1cm" PaddingTop="1in" PaddingBottom="1in">
+        <Frame Flow="header" Height="0.5in" Right="0" X="0" Y="-0.75in" ColumnCount="1" Width="6.5in">
+        </Frame>
+        <Frame Flow="footer" Height="0.5in" Right="0" Bottom="0" X="0" Y="9.25in" Width="6.5in">
+        </Frame>
+        <Frame Flow="body" ColumnCount="1" ColumnGap="0.25in" ColumnDivider="Solid 1pt Black" Width="6.5in" Height="9in">
+        </Frame>
+    </Page>
+</PageStyles>

+ 443 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Stylesheets/intel_css_styles.css

@@ -0,0 +1,443 @@
+/*************************************************************************/
+/* Copyright (c) 2016 Intel Corporation.				 */
+/* 									 */
+/* All rights reserved. This program and the accompanying materials	 */
+/* are made available under the terms of the Eclipse Public License v1.0 */
+/* which accompanies this distribution, and is available at		 */
+/* http://www.eclipse.org/legal/epl-v10.html				 */
+/* 									 */
+/* Contributors:							 */
+/*     Intel Corporation - initial implementation and documentation	 */
+/*************************************************************************/
+/*<meta />*/
+
+/*begin-old-version{{*/
+
+body
+{
+	color: #333333;
+	background-color: #ffffff;
+	font-family: "Intel Clear", Verdana, Arial, sans-serif;
+	font-size: 12pt;
+	margin-left: 30px;
+	margin-right: 30px;
+	margin-bottom: 7%;
+	color: #333333;
+	background-color: #ffffff;
+	font-family: "Intel Clear", Verdana, Arial, sans-serif;
+	font-size: 12pt;
+	margin-left: 30px;
+	margin-right: 30px;
+	margin-bottom: 7%;
+}
+
+.RevUpdate
+{
+	background-color: #FFFF99;
+	font-weight: normal;
+	line-height: 100%;
+	background-color: #FFFF99;
+	font-weight: normal;
+	line-height: 100%;
+}
+
+.NonStdFortran
+{
+	color: #007F00;
+	color: #007F00;
+}
+
+body.OH_VSIP_body
+{
+	margin-left: 30px;
+	margin-left: 30px;
+}
+
+DIV.OH_outerContent
+{
+	border: 0px none #FFFFFF;
+	border: 0px none #ffffff;
+}
+
+h1
+{
+	color: #0071c5;
+	font-size: 15pt;
+	font-weight: normal;
+	padding-bottom: 1px;
+	margin-left: 0pt;
+	margin-bottom: 0px;
+	color: #0071c5;
+	font-size: 15pt;
+	font-weight: normal;
+	padding-bottom: 1px;
+	margin-left: 0pt;
+	margin-bottom: 0px;
+}
+
+h1.firsttitle
+{
+	font-weight: normal;
+	border-bottom: 0 none;
+	margin-left: 0;
+	font-size: 18pt;
+	border-bottom: 1px solid #0071c5;
+	line-height: 100%;
+	padding-bottom: 10px;
+	margin-bottom: 20px;
+	margin-top: 20px;
+	font-weight: normal;
+	border-bottom: 0 none;
+	margin-left: 0;
+	font-size: 18pt;
+	border-bottom: 1px solid #0071c5;
+	line-height: 100%;
+	padding-bottom: 10px;
+	margin-bottom: 20px;
+	margin-top: 20px;
+}
+
+h2
+{
+	color: #0071c5;
+	margin-top: 15pt;
+	margin-bottom: 5pt;
+	font-size: 12pt;
+	color: #0071c5;
+	margin-top: 15pt;
+	margin-bottom: 5pt;
+	font-size: 12pt;
+}
+
+h3
+{
+	color: #333333;
+	font-weight: bold;
+	margin-top: 15pt;
+	margin-bottom: 5pt;
+	font-size: 11pt;
+	color: #333333;
+	font-weight: bold;
+	margin-top: 15pt;
+	margin-bottom: 5pt;
+	font-size: 11pt;
+}
+
+h4
+{
+	color: #0071c5;
+	margin-top: 12pt;
+	margin-bottom: 5pt;
+	padding-left: 0px;
+	font-size: 12pt;
+	color: #0071c5;
+	margin-top: 12pt;
+	margin-bottom: 5pt;
+	padding-left: 0px;
+	font-size: 12pt;
+}
+
+h5
+{
+	color: #0071c5;
+	margin-top: 12pt;
+	margin-bottom: 5pt;
+	padding-left: 0px;
+	font-size: 12pt;
+	color: #0071c5;
+	margin-top: 12pt;
+	margin-bottom: 5pt;
+	padding-left: 0px;
+	font-size: 12pt;
+}
+
+h6
+{
+	color: #0071c5;
+	margin-top: 12pt;
+	margin-bottom: 5pt;
+	padding-left: 0px;
+	font-size: 12pt;
+	color: #0071c5;
+	margin-top: 12pt;
+	margin-bottom: 5pt;
+	padding-left: 0px;
+	font-size: 12pt;
+}
+
+.relinfo
+{
+	padding-left: 30px;
+	padding-left: 30px;
+}
+
+.tablecap
+{
+	color: #0071c5;
+}
+
+caption
+{
+	font-size: 12pt;
+	font-weight: bold;
+	text-align: left;
+	font-size: 12pt;
+	font-weight: bold;
+	text-align: left;
+}
+
+.figcap
+{
+	margin-left: 24px;
+	font-size: 12pt;
+	font-weight: bold;
+	text-align: center;
+	margin-left: 24px;
+	font-size: 12pt;
+	font-weight: bold;
+	text-align: center;
+}
+
+.sectiontitle
+{
+	padding-left: 0px;
+	padding-left: 0px;
+}
+
+.linklist
+{
+	padding-left: 0px;
+	padding-left: 0px;
+}
+
+h1.topictitle1
+{
+	color: #0071c5;
+	font-size: 18pt;
+	margin-left: 0pt;
+	margin-bottom: 15px;
+	color: #0071c5;
+	font-size: 18pt;
+	margin-left: 0pt;
+	margin-bottom: 15px;
+}
+
+#header_text
+{
+	color: #0071C5;
+	text-align: right;
+	color: #0071C5;
+	text-align: right;
+}
+
+.titlepage
+{
+	margin-right: 15%;
+	margin-right: 15%;
+}
+
+.familylinks
+{
+	margin-top: 1em;
+	margin-top: 1em;
+}
+
+a.start
+{
+	font-size: 18pt;
+	text-decoration: underline;
+	font-size: 18pt;
+	text-decoration: underline;
+}
+
+a.underlined
+{
+	text-decoration: underline;
+	text-decoration: underline;
+}
+
+.shortdesc
+{
+	font-size: inherit;
+	padding-left: inherit;
+	line-height: 16pt;
+	margin-top: 0px;
+	margin-bottom: 0.5em;
+	font-size: inherit;
+	padding-left: inherit;
+	line-height: 16pt;
+	margin-top: 0px;
+	margin-bottom: 0.5em;
+}
+
+.shortdesc-it
+{
+	font-style: italic;
+	font-style: italic;
+}
+
+p
+{
+	font-size: inherit;
+	margin-left: 0px;
+	line-height: 120%;
+	margin-top: 0;
+	margin-bottom: 10px;
+	font-size: inherit;
+	margin-left: 0px;
+	line-height: 120%;
+	margin-top: 0;
+	margin-bottom: 10px;
+}
+
+.p
+{
+	font-size: inherit;
+	margin-left: 0px;
+	line-height: 170%;
+	margin-top: 0;
+	margin-bottom: 5pt;
+	padding-left: 0pt;
+	font-size: inherit;
+	margin-left: 0px;
+	line-height: 170%;
+	margin-top: 0;
+	margin-bottom: 5pt;
+	padding-left: 0pt;
+}
+
+table
+{
+	margin-bottom: 5pt;
+	border-collapse: collapse;
+	margin-left: 0px;
+	margin-top: 0.3em;
+	font-size: 12pt;
+	margin-bottom: 5pt;
+	border-collapse: collapse;
+	margin-left: 0px;
+	margin-top: 0.3em;
+	font-size: 12pt;
+}
+
+tr
+{
+	vertical-align: top;
+	vertical-align: top;
+}
+
+DIV.Note
+{
+	margin-top: 20pt;
+	margin-bottom: 20pt;
+	margin-right: 0.46cm;
+	padding-left: 5px;
+	border-top-style: solid;
+	border-top-width: 1px;
+	border-bottom-style: solid;
+	border-bottom-width: 1px;
+}
+
+p.NoteTipHead
+{
+	font-weight: bold;
+	font-style: italic;
+	margin-top: 9pt;
+	margin-bottom: 3pt;
+	line-height: 15pt;
+	margin-left: 0.202cm;
+	font-family: "Verdana", "sans-serif";
+	font-size: 9pt;
+	text-transform: uppercase;
+	text-align: justify;
+}
+
+MadCap|xref
+{
+	color: #0860a8;
+	mc-format: '{paratext}';
+	text-decoration: none;
+}
+
+div.NoteCont
+{
+	border-bottom-style: solid;
+	border-bottom-width: 1px;
+	border-top-style: solid;
+	border-top-width: 1px;
+}
+
+p.figcap
+{
+	text-align: left;
+}
+
+th
+{
+	text-align: left;
+}
+
+a:link
+{
+	color: #0071c5;
+	text-decoration: none;
+	color: #0071c5;
+	text-decoration: none;
+}
+
+a:visited
+{
+	color: #0071c5;
+	text-decoration: none;
+	color: #0071c5;
+	text-decoration: none;
+}
+
+a:hover
+{
+	color: #00aeef;
+	text-decoration: underline;
+	color: #00aeef;
+	text-decoration: underline;
+}
+
+a:active
+{
+	color: #0071c5;
+	text-decoration: underline;
+	color: #0071c5;
+	text-decoration: underline;
+}
+
+a.start:visited
+{
+	color: #0071c5;
+	text-decoration: underline;
+	color: #0071c5;
+	text-decoration: underline;
+}
+
+a.start:active
+{
+	color: #0071c5;
+	text-decoration: underline;
+	color: #0071c5;
+	text-decoration: underline;
+}
+
+a.underlined:visited
+{
+	color: #0071c5;
+	text-decoration: underline;
+	color: #0071c5;
+	text-decoration: underline;
+}
+
+a.underlined:active
+{
+	color: #0071c5;
+	text-decoration: underline;
+	color: #0071c5;
+	text-decoration: underline;
+}
+

+ 31 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Running_Samples_Generated_for_Enclaves.htm

@@ -0,0 +1,31 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="2" MadCap:lastHeight="1123" MadCap:lastWidth="672">
+    <head><title>Running Samples Generated for Enclaves</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h2>Running Samples Generated for Enclaves</h2>
+        <p>Intel(R) Software Guard Extensions Eclipse* Plugin provides an option to generate a sample application together with the enclave code when the enclave is created.  After the project is build, the sample application is built also and ready to run.  You can see the sample application named sample in the enclave directory in Project Explorer.  You can run this sample as a local C/C++ application as shown in the following figure:</p>
+        <p>
+            <img src="Resources/Images/Sample_Application.png" />
+        </p>
+        <p class="figcap">Sample Application</p>
+        <p>See the result of the execution in Eclipse console window as shown below:</p>
+        <p>
+            <img src="Resources/Images/The_Result_of_Running_Samples_Generated_for_Enclaves.png" />
+        </p>
+        <p class="figcap">The Result of Running Samples Generated for Enclaves</p>
+    </body>
+</html>

+ 97 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/SGX_Build_Configurations.htm

@@ -0,0 +1,97 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="5" MadCap:lastHeight="2892" MadCap:lastWidth="554">
+    <head><title>SGX Build Configurations</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h2>SGX Build Configurations</h2>
+        <p>There are usually two types of builds that a regular non-SGX project defines:</p>
+        <ul>
+            <li>Debug</li>
+            <li>Release</li>
+        </ul>
+        <p>SGX-enabled projects add to this picture support to build and test SGX-enabled application on non-SGX platforms (or emulator) using simulation libraries. This approach doubles the set of build types, creating four possible combinations.  For these combinations, you need to use different sets of compilation and  linking flags and link different libraries.</p>
+        <p>The non-debug hardware build is meant to give production code, so it requires the maximum attention when signed. The Two Steps Sign schema is required for production enclaves, which involves an external signing facility, not part of Intel SGX SDK.  The other configurations are not meant for production but they have to be signed too.  The simplest and more convenient Single Step schema is used for them.</p>
+        <p>Again for testing purpose, you might want to experiment with a non-production enclave built with release compilation and linking flags, on a real hardware SGX-enabled platform. That would be an enclave built exactly as a production enclave, except for the sign process which would be Single Step. To support the construction of such enclave, there is a hardware non-debug build configuration dubbed <i>Prerelease</i>.</p>
+        <p>So there are five SGX related configurations when SGX Nature is added to a project:</p>
+        <p>
+            <img src="Resources/Images/Intel_SGX_Configurations.png" />
+        </p>
+        <p>Intel(R) SGX Configurations</p>
+        <p>The following table resumes the existing SGX configurations and relate them with compilation/linking flags (debug/non-debug) and signing scheme (single vs. two steps):</p>
+        <p class="tablecap">Intel(R) SGX Configurations</p>
+        <table style="width: 100%;border-left-style: solid;border-left-width: 1px;border-right-style: solid;border-right-width: 1px;border-top-style: solid;border-top-width: 1px;border-bottom-style: solid;border-bottom-width: 1px;">
+            <col />
+            <col />
+            <col />
+            <col />
+            <tbody>
+                <tr>
+                    <th>Configuration Name</th>
+                    <th>Simulation?</th>
+                    <th>Debug?</th>
+                    <th>Signing Schema</th>
+                </tr>
+                <tr>
+                    <td>SGX Hardware Debug</td>
+                    <td>Hardware</td>
+                    <td>Debug</td>
+                    <td>Single Step</td>
+                </tr>
+                <tr>
+                    <td>SGX Hardware Pre-release</td>
+                    <td>Hardware</td>
+                    <td>Non-debug</td>
+                    <td>Single Step</td>
+                </tr>
+                <tr>
+                    <td>SGX Hardware Release</td>
+                    <td>Hardware</td>
+                    <td>Non-debug</td>
+                    <td>Two Step</td>
+                </tr>
+                <tr>
+                    <td>SGX Simulation</td>
+                    <td>Simulation</td>
+                    <td>Non-debug</td>
+                    <td>Single Step</td>
+                </tr>
+                <tr>
+                    <td>SGX Simulation</td>
+                    <td>Debug	Simulation</td>
+                    <td>Debug</td>
+                    <td>Single step</td>
+                </tr>
+            </tbody>
+        </table>
+        <p>Intel® Software Guard Extensions Eclipse Plug-in uses standard GNU* make tool to build the trusted and the untrusted code, using the generated file <code>sgx/Makefile</code>.</p>
+        <p>This fact does not impose any restriction on the build tool chosen for the hosting project. Intel® Software Guard Extensions Eclipse* Plug-in uses its own build configurations which do not interfere with the configurations that you might have in your project.</p>
+        <p>When SGX configurations are selected, by default only code under <code>&lt;root&gt;/sgx</code> directory get built.</p>
+        <p>You can customize SGX configurations as any other Eclipse build configurations from the project properties dialog. For example:</p>
+        <ol>
+            <li>Right-click in Project Explorer Properties → C/C++ Build</li>
+            <li>Uncheck the Use default build command checkbox.</li>
+        </ol>
+        <p>Then you can customize and integrate SGX build process.  You can use Makefile instead of <code>sgx/Makefile</code> in the example shown in the following figure:</p>
+        <p>
+            <img src="Resources/Images/Customization_of_SGX_build_command.png" />
+        </p>
+        <p class="figcap">Customization of SGX Build Command			</p>
+        <p>The build process is done using standard Eclipse interface for build, by example from the main <b>Project</b> menu:			</p>
+        <p>
+            <img src="Resources/Images/Project_Menu.png" />
+        </p>
+        <p class="figcap">Project Menu			</p>
+    </body>
+</html>

+ 30 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/SGX_title.htm

@@ -0,0 +1,30 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="2" MadCap:lastHeight="391" MadCap:lastWidth="576">
+    <head><title>Intel(R) Software Guard Extensions</title>
+        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h1 class="firsttitle">Intel(R) Software Guard Extensions</h1>
+        <h2>Developer Reference</h2>
+        <p>Intel(R) Software Guard Extensions (Intel(R) SGX) is an Intel technology for a
+pplication developers seeking to protect select code and data from disclosure or 
+modification. Intel(R) SGX makes such protections possible through the use of 
+enclaves. Enclaves are protected areas of execution. Application code can be put 
+into an enclave through special instructions and software made available to 
+developers by the Intel(R) SGX SDK.</p>
+        <p><a href="Legal_Information.htm">Legal Information</a>
+        </p>
+    </body>
+</html>

+ 59 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Two_Steps_Sign_Enclave.htm

@@ -0,0 +1,59 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="4" MadCap:lastHeight="1991" MadCap:lastWidth="680">
+    <head><title>Two Steps Sign Enclave</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h2>Two Steps Sign Enclave</h2>
+        <p>To help you develop enclaves, Intel(R) Software Guard Extensions Eclipse Plug-in generates all required structure including:</p>
+        <ul>
+            <li>c/c++ files and header files</li>
+            <li><code>.edl</code> file</li>
+            <li><code>*.config.xml</code> file</li>
+            <li>a sample Makefile</li>
+            <li>a sample signing key</li>
+        </ul>
+        <p>While these structure might be appropriate for development and debugging, you need a 2-step process to integrate your own signing schema for generating  production enclaves.</p>
+        <ol>
+            <li>Generate hash: the signer tool generates signing material from the unsigned compiled enclave and from the configuration file for the enclave.  The signed material comes as an opaque sequence of bytes which are put in a file with extension <code>.hex</code>. This file is used with the external signing facility.  You come back with a signature for the <code>.hex</code> file plus the public key of your signing facility, and proceed to Step 2.</li>
+            <li>Generate signed enclaves : the signer tool generates the final signed enclave.</li>
+        </ol>
+        <p>To complete this task, provide the following input parameters:</p>
+        <ul>
+            <li>The unsigned enclave</li>
+            <li>The configuration file</li>
+            <li>The output file produced when you generate hash (the <code>.hex</code> file)</li>
+            <li>The files produced by the external signing facility: the signature of the .hex file and public key for it</li>
+            <li>The plugin checks if the input parameters are consistent:</li>
+            <li>The <code>.hex</code> file matches the unsigned enclave and the configuration file,</li>
+            <li>The signed material is verified with the public key</li>
+        </ul>
+        <p>If the parameters are consistenet, the production signed enclave is produced.</p>
+        <div class="NoteCont">
+            <p class="NoteTipHead">NOTE:</p>
+            <p>If you generate signed enclave right after generating hash, you can only enter the parameters specific for generating signed enclave.</p>
+        </div>
+        <p>To use the two-step signing function, activate the configuration <b>SGX Hardware Release mode</b>. When this configuration is active, the compilation does not produce a signed enclave, as in the other SGX configurations; the process only produces unsigned enclaves.</p>
+        <p>
+            <img src="Resources/Images/Configure_SGX_Hardware_Release_Mode.png" />
+        </p>
+        <p class="figcap">Configure SGX Hardware Release Mode</p>
+        <p>When you configure the plugin in the <b>SGX Hardware Release Mode</b>, you can see the <b>Generate Hash</b> and <b>Generate Signed Enclave</b> options through <b>Software Guard Extension Tools-&gt;Two Step Sign Enclave</b>.</p>
+        <p>
+            <img src="Resources/Images/Two_Step_Sign_Enclave_Menu.png" />
+        </p>
+        <p class="figcap">Two Step Sign Enclave Menu</p>
+    </body>
+</html>

+ 39 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Updating_Enclave_Configuration_Files.htm

@@ -0,0 +1,39 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="4" MadCap:lastHeight="987" MadCap:lastWidth="550">
+    <head><title>Updating Enclave Configuration Files</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h2>Updating Enclave Configuration Files</h2>
+        <p>A configuration file is an important part in the definition of an enclave.  Intel(R) SGX SDK signer tool requires such *.xml configuration file as necessary input.</p>
+        <p>To update this configuration file, use the <b>Update Config</b> command:</p>
+        <ol>
+            <li>
+                <p>Right-click on the root project,  <b>Software Extension Guards Tools-&gt;Select Config File</b>.</p>
+                <p>
+                    <img src="Resources/Images/Select_Configuration_File.png" />
+                </p>
+                <p class="figcap">Select Configuration File</p>
+            </li>
+            <li>
+                <p>Click <b>OK</b> or double-click the selected configuration file to open the <b>Enclave Configuration Settings</b> dialog.</p>
+                <p>
+                    <img src="Resources/Images/Enclave_Configuration_Settings.png" />
+                </p>
+                <p class="figcap">Enclave Configuration Settings</p>
+                <p>For details on the meaning of the fields, see <i>Intel(R) Software Guard Extensions Developer Guide</i>.</p>
+            </li>
+        </ol>
+    </body>
+</html>

+ 37 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Updating_SGX_Enclave_Signing_Key.htm

@@ -0,0 +1,37 @@
+<!--------------------------------------------------------------------------->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--------------------------------------------------------------------------->
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="4" MadCap:lastHeight="1043" MadCap:lastWidth="652">
+    <head><title>Updating SGX Enclave Signing Key</title>
+        <link href="Resources/Stylesheets/intel_css_styles.css" rel="stylesheet" type="text/css" />
+    </head>
+    <body>
+        <h2>Updating SGX Enclave Signing Key</h2>
+        <p>All skeletons enclave samples produced by the plugin contain a sample signing key.  You might want to import another sign key that you already have, or generate a new one.   Use the command <b>Update SGX Enclave Signing Key</b> to complete this task.</p>
+        <ol>
+            <li>Choose  <b>Update SGX Enclave Signing Key</b> by right-click on the project in <b>Project Explorer -&gt; Software Guard Extension Tools</b> menu. The <b>Import or (Re)Generate Enclave Signing Key</b> dialog appears.</li>
+            <li>In the <b>Import or (Re)Generate Enclave Signing Key</b> dialog, click <b>Select</b> to open a file dialog to select the output key.</li>
+            <li>
+                <p>Click <b>Improt Key</b> to update a selected signing key by copying another existing key  or click <b>Generate Key</b> to update the selected signing key by generating a new key. In both cases, the new signature key is put into the file in text field <b>Enclave Signing Key</b>.</p>
+                <p>
+                    <img src="Resources/Images/Import_or_Re_Generate_Enclave_Signing_Key.png" />
+                </p>
+                <p class="figcap">Import or (Re)Generate Enclave Signing Key</p>
+            </li>
+            <li>Click <b>OK</b> to update the enclave signing key.</li>
+        </ol>
+        <p>Under the hood, a new key is generated using openssl*, which needs to be installed on the machine:</p>
+        <p><code>openssl genrsa -out ../../../encl1_private.pem.key.pem -3 3072</code>
+        </p>
+        <p><![CDATA[	]]></p>
+    </body>
+</html>

File diff suppressed because it is too large
+ 417 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/content.html


+ 24 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/plugin.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--                                                                       -->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--                                                                       -->
+<?eclipse version="3.4"?>
+<plugin>
+
+   <extension
+         point="org.eclipse.help.toc">
+      <toc
+            file="toc.xml"
+            primary="true">
+      </toc>
+   </extension>
+
+</plugin>

+ 73 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/src/com/intel/sgx/userguide/Activator.java

@@ -0,0 +1,73 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+package com.intel.sgx.userguide;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "com.intel.sgx.userguide"; //$NON-NLS-1$
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+	/**
+	 * Returns an image descriptor for the image file at the given
+	 * plug-in relative path
+	 *
+	 * @param path the path
+	 * @return the image descriptor
+	 */
+	public static ImageDescriptor getImageDescriptor(String path) {
+		return imageDescriptorFromPlugin(PLUGIN_ID, path);
+	}
+}

+ 90 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/toc.xml

@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--                                                                       -->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--                                                                       -->
+<toc     label="Intel(R) SGX Plugin* Developer Guide"
+    topic="html/content.html#SGX_title" >
+  <topic
+    label="Legal Information"
+    href="html/content.html#Legal_Information" />
+  <topic
+    label="Introduction"
+    href="html/content.html#Introduction">
+    <topic
+      label="Introducing Intel(R) SGX"
+      href="html/content.html#Introducing_Intel_Software_Guard _Extensions_Eclipse_Plugin" />
+    <topic
+      label="Introducing Intel(R) SGX Plugin"
+      href="html/content.html#Introducing_Intel_Software_Guard_Extensions" />
+  </topic>
+  <topic
+    label="Getting Started with Intel(R) SGX Plugin"
+    href="html/content.html#Getting_Started">
+    <topic
+      label="Pre-requisites"
+      href="html/content.html#Prerequisites" />
+    <topic
+      label="Installing Intel(R) SGX Plugin"
+      href="html/content.html#Installing_Intel_Software_Guard_Extensions_Eclipse_Plugin" />
+    <topic
+      label="Configuring Intel(R) SGX Plugin"
+      href="html/content.html#Configuring_Intel_Software_Guard_Extensions_Eclipse_Plugin" />
+  </topic>
+  <topic
+    label="Command Reference"
+    href="html/content.html#Command_Reference">
+    <topic
+      label="Adding SGX Nature to a Project"
+      href="html/content.html#Adding_SGX_Nature_to_a_Project">
+      <topic
+        label="Adding SGX Nature to a non-SGX project"
+        href="html/content.html#Adding_SGX_Nature_to_a_non_SGX_project" />
+      <topic
+        label="Creating a New C/C++ Project with SGX Nature"
+        href="html/content.html#Creating_a_New_C_C_Project_with_SGX_Nature" />
+    </topic>
+    <topic
+      label="Adding an SGX Enclave"
+      href="html/content.html#Adding_an_SGX_Enclave" />
+    <topic
+      label="Adding an SGX Trusted Library"
+      href="html/content.html#Adding_an_SGX_Trusted_Library" />
+    <topic
+      label="Adding an SGX Untrusted Module"
+      href="html/content.html#Adding_an_SGX_Untrusted_Module" />
+    <topic
+      label="Updating SGX Enclave Signing Key"
+      href="html/content.html#Updating_SGX_Enclave_Signing_Key" />
+    <topic
+      label="Updating Enclave Configuration Files"
+      href="html/content.html#Updating_Enclave_Configuration_Files" />
+    <topic
+      label="Two Steps Sign Enclave"
+      href="html/content.html#Two_Steps_Sign_Enclave">
+      <topic
+        label="Generate Hash"
+        href="html/content.html#Generate_Hash" />
+      <topic
+        label="Generate Signed Enclaves"
+        href="html/content.html#Generate_Signed_Enclaves" />
+    </topic>
+  </topic>
+  <topic
+    label="Building and Running SGX Code"
+    href="html/content.html#Building_and_Running_SGX_Code">
+    <topic
+      label="SGX Build Configurations"
+      href="html/content.html#SGX_Build_Configurations" />
+    <topic
+      label="Running Samples Generated for Enclaves"
+      href="html/content.html#Running_Samples_Generated_for_Enclaves" />
+  </topic>
+</toc>

+ 18 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/.classpath

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--                                                                       -->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--                                                                       -->
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

+ 39 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/.project

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--                                                                       -->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--                                                                       -->
+<projectDescription>
+	<name>com.intel.sgx</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

+ 12 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/.settings/org.eclipse.jdt.core.prefs

@@ -0,0 +1,12 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8

+ 26 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/META-INF/MANIFEST.MF

@@ -0,0 +1,26 @@
+License:  Eclipse Public License Version 1.0 ("EPL")
+bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: com.intel.sgx;singleton:=true
+Bundle-Version: 1.0.1.qualifier
+Bundle-Activator: com.intel.sgx.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.cdt.core;bundle-version="5.11.0",
+ org.eclipse.core.runtime;bundle-version="3.11.1",
+ org.eclipse.ui;bundle-version="3.107.0",
+ org.eclipse.cdt.managedbuilder.ui;bundle-version="8.2.2",
+ org.eclipse.cdt.managedbuilder.core;bundle-version="8.3.0",
+ org.eclipse.core.resources;bundle-version="3.10.1",
+ org.eclipse.cdt.ui;bundle-version="5.11.0",
+ org.eclipse.core.expressions;bundle-version="3.5.0",
+ org.eclipse.ui.ide;bundle-version="3.11.0"
+Bundle-ActivationPolicy: lazy
+Export-Package: com.intel.sgx,
+ com.intel.sgx.build,
+ com.intel.sgx.dialogs,
+ com.intel.sgx.discovery,
+ com.intel.sgx.handlers,
+ com.intel.sgx.natures,
+ com.intel.sgx.preferences,
+ com.intel.sgx.templates
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8

+ 15 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/OSGI-INF/l10n/bundle.properties

@@ -0,0 +1,15 @@
+#########################################################################
+# Copyright (c) 2016 Intel Corporation.				        #
+# 								        #
+# All rights reserved. This program and the accompanying materials      #
+# are made available under the terms of the Eclipse Public License v1.0 #
+# which accompanies this distribution, and is available at	        #
+# http://www.eclipse.org/legal/epl-v10.html			        #
+# 								        #
+# Contributors:							        #
+#     Intel Corporation - initial implementation and documentation      #
+#########################################################################
+
+
+Bundle-Vendor = Intel Corporation
+Bundle-Name = SGX(R) Linux Eclipse Plugin

+ 24 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/build.properties

@@ -0,0 +1,24 @@
+#########################################################################
+# Copyright (c) 2016 Intel Corporation.				        #
+# 								        #
+# All rights reserved. This program and the accompanying materials      #
+# are made available under the terms of the Eclipse Public License v1.0 #
+# which accompanies this distribution, and is available at	        #
+# http://www.eclipse.org/legal/epl-v10.html			        #
+# 								        #
+# Contributors:							        #
+#     Intel Corporation - initial implementation and documentation      #
+#########################################################################
+
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               templates/,\
+               discovery/,\
+               build.properties,\
+               OSGI-INF/,\
+               OSGI-INF/l10n/bundle.properties
+jre.compilation.profile = JavaSE-1.8

+ 2 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/discovery/test.c

@@ -0,0 +1,2 @@
+
+

+ 2 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/discovery/test.cpp

@@ -0,0 +1,2 @@
+
+

+ 786 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/plugin.xml

@@ -0,0 +1,786 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--                                                                       -->
+<!-- Copyright (c) 2016 Intel Corporation.				   -->
+<!-- 									   -->
+<!-- All rights reserved. This program and the accompanying materials	   -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at		   -->
+<!-- http://www.eclipse.org/legal/epl-v10.html				   -->
+<!-- 									   -->
+<!-- Contributors:							   -->
+<!--     Intel Corporation - initial implementation and documentation	   -->
+<!--                                                                       -->
+<?eclipse version="3.4"?>
+<plugin>
+  <extension id="com.intel.sgx.sgxbuilderdefinitions" name="Software Guard Extensions Builder Definition"
+	     point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
+    <toolChain configurationEnvironmentSupplier="com.linux.ide.eclipse.ndk.internal.build.NdkEnvSupplier"
+	       id="com.intel.sgx.SGXtoolChain" isAbstract="false" name="SGX GCC"
+	       supportsManagedBuild="false">
+      <builder cleanBuildTarget="clean" command="make"
+	       commandLauncher="com.intel.sgx.build.SGXSDKCommandLauncher" id="com.intel.sgx.sgxbuilder"
+	       isAbstract="false" isVariableCaseSensitive="false"
+	       name="Software Guard Extensions Linux Builder">
+      </builder>
+      <targetPlatform binaryParser="org.eclipse.cdt.core.ELF"
+		      id="com.intel.sgx.targetEnclave" isAbstract="false">
+      </targetPlatform>
+      <tool id="com.intel.sgx.compiler" isAbstract="false" name="SGX GCC Compiler"
+	    natureFilter="both">
+	<option browseType="directory" id="com.intel.sgx.option.includePath"
+		isAbstract="false" resourceFilter="all" valueType="includePath">
+	</option>
+	<inputType id="com.intel.sgx.inputType"
+		   scannerConfigDiscoveryProfileId="com.intel.sgx.SGXPerProjectProfile"
+		   sources="c,cpp">
+	</inputType>
+      </tool>
+    </toolChain>
+
+
+
+    <configuration id="com.intel.sgx.configuration.Sim.Debug" name="SGX Simulation Debug">
+         <toolChain id="com.intel.sgx.toolChain.Sim.Debug" isAbstract="false"
+		     name="SGX GCC" superClass="com.intel.sgx.SGXtoolChain">
+             <builder arguments="SGX_DEBUG=1 SGX_MODE=SIM -f sgx/Makefile" command="make"
+		         id="com.intel.sgx.builder2" isAbstract="false"
+        		 isVariableCaseSensitive="false" name="Software Guard Extensions Linux Builder"
+		         superClass="com.intel.sgx.sgxbuilder">
+        	</builder>
+          </toolChain>
+    </configuration>
+
+    <configuration id="com.intel.sgx.configuration.HW.Debug" name="SGX Hardware Debug">
+         <toolChain id="com.intel.sgx.toolChain.HW.Debug" isAbstract="false"
+		     name="SGX GCC" superClass="com.intel.sgx.SGXtoolChain">
+        	<builder arguments="SGX_DEBUG=1 SGX_MODE=HW -f sgx/Makefile" command="make"
+	        	 id="com.intel.sgx.builder1" isAbstract="false"
+		         isVariableCaseSensitive="false" name="Software Guard Extensions Linux Builder"
+        		 superClass="com.intel.sgx.sgxbuilder">
+	        </builder>
+         </toolChain>
+    </configuration>
+
+   <configuration id="com.intel.sgx.configuration.Sim.Release" name="SGX Simulation">
+        <toolChain id="com.intel.sgx.toolChain.Sim.Release" isAbstract="false"
+   	     name="SGX GCC" superClass="com.intel.sgx.SGXtoolChain">
+            <builder arguments="SGX_DEBUG=0 SGX_MODE=SIM -f sgx/Makefile" command="make"
+   	         id="com.intel.sgx.builder3" isAbstract="false"
+       		 isVariableCaseSensitive="false" name="Software Guard Extensions Linux Builder"
+   	         superClass="com.intel.sgx.sgxbuilder">
+       	</builder>
+         </toolChain>
+   </configuration>
+                                                                                               
+   <configuration id="com.intel.sgx.configuration.HW.Prerelease" name="SGX Hardware Prerelease">
+        <toolChain id="com.intel.sgx.toolChain.HW.Prerelease" isAbstract="false"
+   	     name="SGX GCC" superClass="com.intel.sgx.SGXtoolChain">
+       	<builder arguments="SGX_PRERELEASE=1 SGX_MODE=HW -f sgx/Makefile" command="make"
+           	 id="com.intel.sgx.builder5" isAbstract="false"
+   	         isVariableCaseSensitive="false" name="Software Guard Extensions Linux Builder"
+       		 superClass="com.intel.sgx.sgxbuilder">
+           </builder>
+        </toolChain>
+   </configuration>
+
+   <configuration id="com.intel.sgx.configuration.HW.Release" name="SGX Hardware Release">
+        <toolChain id="com.intel.sgx.toolChain.HW.Release" isAbstract="false"
+   	     name="SGX GCC" superClass="com.intel.sgx.SGXtoolChain">
+       	<builder arguments="SGX_DEBUG=0 SGX_MODE=HW -f sgx/Makefile" command="make"
+           	 id="com.intel.sgx.builder6" isAbstract="false"
+   	         isVariableCaseSensitive="false" name="Software Guard Extensions Linux Builder"
+       		 superClass="com.intel.sgx.sgxbuilder">
+           </builder>
+        </toolChain>
+   </configuration>
+
+</extension>
+<extension id="com.intel.sgx.SGXPerProjectProfile" name="SGX Per Project Profile"
+	   point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile">
+  <scannerInfoCollector
+      class="com.intel.sgx.discovery.SGXSDKScannerInfoCollector" scope="project">
+  </scannerInfoCollector>
+</extension>
+<extension id="com.intel.sgx.commands" name="SGX Commands"
+	   point="org.eclipse.ui.commands">
+  <category id="com.intel.sgx.category.enclaveIF" name="SGX Untrusted Enclave Interface">
+  </category>
+  <category id="com.intel.sgx.category.trustedIF" name="SGX Trusted Enclave Interface">
+  </category>
+  <command categoryId="com.intel.sgx.category.enclaveIF" id="com.intel.sgx.command.addEnclave"
+	   name="Add SGX Enclave">
+    <commandParameter id="com.intel.sgx.commandParameter3"
+		      name="name" optional="true">
+    </commandParameter>
+  </command>
+  <command categoryId="com.intel.sgx.category.enclaveIF" id="com.intel.sgx.command.addTrustedStaticLib"
+	   name="Add SGX Trusted Static Library">
+    <commandParameter id="com.intel.sgx.commandParameter3"
+		      name="name" optional="true">
+    </commandParameter>
+  </command>
+  <command categoryId="com.intel.sgx.category.enclaveIF" id="com.intel.sgx.command.removeEnclave"
+	   name="Remove SGX Enclave">
+  </command>
+  <command categoryId="com.intel.sgx.category.enclaveIF" id="com.intel.sgx.command.addUntrustedModule"
+	   name="Add SGX Untrusted Module">
+  </command>
+  <command categoryId="com.intel.sgx.category.enclaveIF" id="com.intel.sgx.command.addSGXNature"
+	   name="Add SGX Nature">
+  </command>
+  <command categoryId="com.intel.sgx.category.enclaveIF" id="com.intel.sgx.command.updateSigningKey"
+	   name="Update SGX Enclave Signing Key">
+  </command>
+  <command categoryId="com.intel.sgx.category.enclaveIF"
+	   id="com.intel.sgx.command.enclaveConfigHandler" name="Update Config">
+  </command>
+  <command categoryId="com.intel.sgx.category.enclaveIF"
+	   id="com.intel.sgx.command.twoStepSignStep1" name="Generate Hash">
+  </command>
+  <command categoryId="com.intel.sgx.category.enclaveIF"
+	   id="com.intel.sgx.command.twoStepSignStep2" name="Generate Signed Enclave">
+  </command>
+</extension>
+<extension point="org.eclipse.ui.menus">
+  <menuContribution allPopups="false"
+		    locationURI="popup:org.eclipse.ui.popup.any?after=additions">
+    <menu label="Software Guard Extension Tools">
+      	<visibleWhen checkEnabled="false">
+	  <with variable="selection">
+	    <test property="com.intel.sgx.testers.sgxNatureAdded"
+		  value="true"
+		  forcePluginActivation="true"
+/>
+	  </with>
+	</visibleWhen>
+      <command commandId="com.intel.sgx.command.addSGXNature"
+	       style="push">
+	<visibleWhen checkEnabled="false">
+	  <with variable="selection">
+	    <iterate operator="or">
+	      <adapt type="org.eclipse.core.resources.IProject">
+		<not>
+		  <test property="org.eclipse.core.resources.projectNature"
+			value="com.intel.sgx.sgxnature">
+		  </test>
+		</not>
+		<test property="org.eclipse.core.resources.projectNature"
+		      value="org.eclipse.cdt.core.cnature">
+		</test>
+	      </adapt>
+	    </iterate>
+	  </with>
+	</visibleWhen>
+      </command>
+      <command commandId="com.intel.sgx.command.addEnclave" style="push">
+		<visibleWhen checkEnabled="false">
+	  	<with variable="selection">
+	    	<iterate operator="or">
+	      <adapt type="org.eclipse.core.resources.IProject">
+		<test property="org.eclipse.core.resources.projectNature"
+		      value="com.intel.sgx.sgxnature">
+		</test>
+	      </adapt>
+	    </iterate>
+	  </with>
+	</visibleWhen>
+      </command>
+      <command commandId="com.intel.sgx.command.addTrustedStaticLib" style="push">
+		<visibleWhen checkEnabled="false">
+	  	<with variable="selection">
+	    	<iterate operator="or">
+	      <adapt type="org.eclipse.core.resources.IProject">
+		<test property="org.eclipse.core.resources.projectNature"
+		      value="com.intel.sgx.sgxnature">
+		</test>
+	      </adapt>
+	    </iterate>
+	  </with>
+	</visibleWhen>
+      </command>
+      <command commandId="com.intel.sgx.command.addUntrustedModule" style="push">
+	<visibleWhen checkEnabled="false">
+	  <with variable="selection">
+	    <iterate operator="or">
+	      <adapt type="org.eclipse.core.resources.IProject">
+		<test property="org.eclipse.core.resources.projectNature"
+		      value="com.intel.sgx.sgxnature">
+		</test>
+	      </adapt>
+	    </iterate>
+	  </with>
+	</visibleWhen>
+      </command>
+      <command commandId="com.intel.sgx.command.updateSigningKey"
+	       style="push">
+	<visibleWhen checkEnabled="false">
+	  <with variable="selection">
+	    <iterate operator="or">
+	      <adapt type="org.eclipse.core.resources.IProject">
+		<test property="org.eclipse.core.resources.projectNature"
+		      value="com.intel.sgx.sgxnature">
+		</test>
+	      </adapt>
+	    </iterate>
+	  </with>
+	</visibleWhen>
+      </command>
+
+      <command commandId="com.intel.sgx.command.enclaveConfigHandler"
+	       style="push">
+	<visibleWhen checkEnabled="false">
+	  <with variable="selection">
+	    <iterate operator="or">
+	      <adapt type="org.eclipse.core.resources.IProject">
+		<test property="org.eclipse.core.resources.projectNature"
+		      value="com.intel.sgx.sgxnature">
+		</test>
+	      </adapt>
+	    </iterate>
+	  </with>
+	</visibleWhen>
+      </command>
+
+      <menu label="Two Step Sign Enclave">
+	<visibleWhen checkEnabled="false">
+	  <with variable="selection">
+	    <test property="com.intel.sgx.testers.twoStepsActive"
+		  value="true"
+		  forcePluginActivation="true"
+/>
+	  </with>
+	</visibleWhen>
+	<command commandId="com.intel.sgx.command.twoStepSignStep1"
+		 style="push">
+	  <!-- <visibleWhen checkEnabled="false"> -->
+	  <!--   <with variable="selection"> -->
+	  <!--     <iterate operator="or"> -->
+	  <!-- 	<adapt type="org.eclipse.core.resources.IProject"> -->
+	  <!-- 	  <test property="org.eclipse.core.resources.projectNature" -->
+	  <!-- 		value="com.intel.sgx.sgxccnature"> -->
+	  <!-- 	  </test> -->
+	  <!-- 	</adapt> -->
+	  <!--     </iterate> -->
+	  <!--   </with> -->
+	  <!-- </visibleWhen> -->
+	</command>
+	<command commandId="com.intel.sgx.command.twoStepSignStep2"
+		 style="push">
+	  <!-- <visibleWhen checkEnabled="false"> -->
+	  <!--   <with variable="selection"> -->
+	  <!--     <iterate operator="or"> -->
+	  <!-- 	<adapt type="org.eclipse.core.resources.IProject"> -->
+	  <!-- 	  <test property="org.eclipse.core.resources.projectNature" -->
+	  <!-- 		value="com.intel.sgx.sgxccnature"> -->
+	  <!-- 	  </test> -->
+	  <!-- 	</adapt> -->
+	  <!--     </iterate> -->
+	  <!--   </with> -->
+	  <!-- </visibleWhen> -->
+	</command>	
+      </menu>
+
+    </menu>
+    <menu label="Software Guard Extension Options">
+      <visibleWhen checkEnabled="false">
+	<with variable="selection">
+	  <iterate ifEmpty="false" operator="or">
+	    <adapt type="org.eclipse.core.resources.IProject">
+	      <test property="org.eclipse.core.resources.projectNature"
+		    value="com.intel.sgx.sgxccnature">
+	      </test>
+	    </adapt>
+	  </iterate>
+	</with>
+      </visibleWhen>
+      <command commandId="com.intel.sgx.command.updateSigningKey"
+	       style="push">
+	<visibleWhen checkEnabled="false">
+	  <with variable="selection">
+	    <iterate operator="or">
+	      <adapt type="org.eclipse.core.resources.IProject">
+		<test property="org.eclipse.core.resources.projectNature"
+		      value="com.intel.sgx.sgxccnature">
+		</test>
+	      </adapt>
+	    </iterate>
+	  </with>
+	</visibleWhen>
+      </command>
+      <command commandId="com.intel.sgx.command.enclaveConfigHandler"
+	       style="push">
+	<visibleWhen checkEnabled="false">
+	  <with variable="selection">
+	    <iterate operator="or">
+	      <adapt type="org.eclipse.core.resources.IProject">
+		<test property="org.eclipse.core.resources.projectNature"
+		      value="com.intel.sgx.sgxccnature">
+		</test>
+	      </adapt>
+	    </iterate>
+	  </with>
+	</visibleWhen>
+      </command>
+      <menu label="Two Step Sign Enclave">
+	<visibleWhen checkEnabled="false">
+	  <with variable="selection">
+	    <iterate ifEmpty="false" operator="or">
+	      <adapt type="org.eclipse.core.resources.IProject">
+		<test property="org.eclipse.core.resources.projectNature"
+		      value="com.intel.sgx.sgxccnature">
+		</test>
+	      </adapt>
+	    </iterate>
+	  </with>
+	</visibleWhen>
+	<command commandId="com.intel.sgx.command.twoStepSignStep1"
+		 style="push">
+	  <visibleWhen checkEnabled="false">
+	    <with variable="selection">
+	      <iterate operator="or">
+		<adapt type="org.eclipse.core.resources.IProject">
+		  <test property="org.eclipse.core.resources.projectNature"
+			value="com.intel.sgx.sgxccnature">
+		  </test>
+		</adapt>
+	      </iterate>
+	    </with>
+	  </visibleWhen>
+	</command>
+	<command commandId="com.intel.sgx.command.twoStepSignStep2"
+		 style="push">
+	  <visibleWhen checkEnabled="false">
+	    <with variable="selection">
+	      <iterate operator="or">
+		<adapt type="org.eclipse.core.resources.IProject">
+		  <test property="org.eclipse.core.resources.projectNature"
+			value="com.intel.sgx.sgxnature">
+		  </test>
+		</adapt>
+	      </iterate>
+	    </with>
+	  </visibleWhen>
+	</command>	
+      </menu>
+    </menu>
+  </menuContribution>
+</extension>
+<extension point="org.eclipse.ui.preferencePages">
+  <page class="com.intel.sgx.preferences.SGXPreferencePage" id="com.intel.sgx.preferences.SGXPreferencePage"
+	name="SGX Preferences">
+  </page>
+</extension>
+<extension point="org.eclipse.core.runtime.preferences">
+  <initializer class="com.intel.sgx.preferences.PreferenceInitializer">
+  </initializer>
+</extension>
+<extension point="org.eclipse.ui.handlers">
+  <handler class="com.intel.sgx.handlers.AddEnclave" commandId="com.intel.sgx.command.addEnclave">
+    <activeWhen>
+      <with variable="selection">
+	<!--<iterate operator="or"> <adapt type="org.eclipse.core.resources.IProject"> 
+	    <and> <test property="org.eclipse.core.resources.projectNature" value="org.eclipse.cdt.core.cnature"> 
+	    </test> <test property="org.eclipse.core.resources.projectNature" value="com.linux.ide.eclipse.adt.LinuxNature"> 
+	    </test> </and> <test property="org.eclipse.core.resources.projectNature" 
+	    value="com.intel.sgx.sgxnature"> </test> </adapt> </iterate> -->
+	<iterate operator="or">
+	  <instanceof value="org.eclipse.core.resources.IProject">
+	  </instanceof>
+	</iterate>
+      </with>
+    </activeWhen>
+    <enabledWhen>
+      <with variable="selection">
+	<!--<iterate operator="or"> <adapt type="org.eclipse.core.resources.IProject"> 
+	    <and> <test property="org.eclipse.core.resources.projectNature" value="org.eclipse.cdt.core.cnature"> 
+	    </test> <test property="org.eclipse.core.resources.projectNature" value="com.linux.ide.eclipse.adt.LinuxNature"> 
+	    </test> </and> <test property="org.eclipse.core.resources.projectNature" 
+	    value="com.intel.sgx.sgxnature"> </test> </adapt> </iterate> -->
+	<iterate operator="or">
+	  <instanceof value="org.eclipse.core.resources.IProject">
+	  </instanceof>
+	</iterate>
+      </with>
+    </enabledWhen>
+  </handler>
+<handler class="com.intel.sgx.handlers.AddTrustedStaticLib" commandId="com.intel.sgx.command.addTrustedStaticLib">
+    <activeWhen>
+      <with variable="selection">
+	<!--<iterate operator="or"> <adapt type="org.eclipse.core.resources.IProject"> 
+	    <and> <test property="org.eclipse.core.resources.projectNature" value="org.eclipse.cdt.core.cnature"> 
+	    </test> <test property="org.eclipse.core.resources.projectNature" value="com.linux.ide.eclipse.adt.LinuxNature"> 
+	    </test> </and> <test property="org.eclipse.core.resources.projectNature" 
+	    value="com.intel.sgx.sgxnature"> </test> </adapt> </iterate> -->
+	<iterate operator="or">
+	  <instanceof value="org.eclipse.core.resources.IProject">
+	  </instanceof>
+	</iterate>
+      </with>
+    </activeWhen>
+    <enabledWhen>
+      <with variable="selection">
+	<!--<iterate operator="or"> <adapt type="org.eclipse.core.resources.IProject"> 
+	    <and> <test property="org.eclipse.core.resources.projectNature" value="org.eclipse.cdt.core.cnature"> 
+	    </test> <test property="org.eclipse.core.resources.projectNature" value="com.linux.ide.eclipse.adt.LinuxNature"> 
+	    </test> </and> <test property="org.eclipse.core.resources.projectNature" 
+	    value="com.intel.sgx.sgxnature"> </test> </adapt> </iterate> -->
+	<iterate operator="or">
+	  <instanceof value="org.eclipse.core.resources.IProject">
+	  </instanceof>
+	</iterate>
+      </with>
+    </enabledWhen>
+  </handler>
+  <handler class="com.intel.sgx.handlers.RemoveEnclave"
+	   commandId="com.intel.sgx.command.removeEnclave">
+    <activeWhen>
+      <with variable="selection">
+	<!--<iterate operator="or"> <adapt type="org.eclipse.core.resources.IProject"> 
+	    <and> <test property="org.eclipse.core.resources.projectNature" value="org.eclipse.cdt.core.cnature"> 
+	    </test> <test property="org.eclipse.core.resources.projectNature" value="com.linux.ide.eclipse.adt.LinuxNature"> 
+	    </test> </and> <test property="org.eclipse.core.resources.projectNature" 
+	    value="com.intel.sgx.sgxnature"> </test> </adapt> </iterate> -->
+	<iterate operator="or">
+	  <instanceof value="org.eclipse.core.resources.IProject">
+	  </instanceof>
+	</iterate>
+      </with>
+    </activeWhen>
+    <enabledWhen>
+      <with variable="selection">
+	<!--<iterate operator="or"> <adapt type="org.eclipse.core.resources.IProject"> 
+	    <and> <test property="org.eclipse.core.resources.projectNature" value="org.eclipse.cdt.core.cnature"> 
+	    </test> <test property="org.eclipse.core.resources.projectNature" value="com.linux.ide.eclipse.adt.LinuxNature"> 
+	    </test> </and> <test property="org.eclipse.core.resources.projectNature" 
+	    value="com.intel.sgx.sgxnature"> </test> </adapt> </iterate> -->
+	<iterate operator="or">
+	  <instanceof value="org.eclipse.core.resources.IProject">
+	  </instanceof>
+	</iterate>
+      </with>
+    </enabledWhen>
+  </handler>
+  <handler class="com.intel.sgx.handlers.AddUntrustedModule" commandId="com.intel.sgx.command.addUntrustedModule">
+    <activeWhen>
+      <with variable="selection">
+	<!--<iterate operator="or"> <adapt type="org.eclipse.core.resources.IProject"> 
+	    <and> <test property="org.eclipse.core.resources.projectNature" value="org.eclipse.cdt.core.cnature"> 
+	    </test> <test property="org.eclipse.core.resources.projectNature" value="com.linux.ide.eclipse.adt.LinuxNature"> 
+	    </test> </and> <test property="org.eclipse.core.resources.projectNature" 
+	    value="com.intel.sgx.sgxnature"> </test> </adapt> </iterate> -->
+	<iterate operator="or">
+	  <instanceof value="org.eclipse.core.resources.IProject">
+	  </instanceof>
+	</iterate>
+      </with>
+    </activeWhen>
+    <enabledWhen>
+      <with variable="selection">
+	<!--<iterate operator="or"> <adapt type="org.eclipse.core.resources.IProject"> 
+	    <and> <test property="org.eclipse.core.resources.projectNature" value="org.eclipse.cdt.core.cnature"> 
+	    </test> <test property="org.eclipse.core.resources.projectNature" value="com.linux.ide.eclipse.adt.LinuxNature"> 
+	    </test> </and> <test property="org.eclipse.core.resources.projectNature" 
+	    value="com.intel.sgx.sgxnature"> </test> </adapt> </iterate> -->
+	<iterate operator="or">
+	  <instanceof value="org.eclipse.core.resources.IProject">
+	  </instanceof>
+	</iterate>
+      </with>
+    </enabledWhen>
+  </handler>
+  <handler class="com.intel.sgx.handlers.AddSGXNature"
+	   commandId="com.intel.sgx.command.addSGXNature">
+    <activeWhen>
+      <with variable="selection">
+	<iterate operator="or">
+	  <instanceof value="org.eclipse.core.resources.IProject">
+	  </instanceof>
+	</iterate>
+      </with>
+    </activeWhen>
+    <enabledWhen>
+      <with variable="selection">
+	<iterate operator="or">
+	  <instanceof value="org.eclipse.core.resources.IProject">
+	  </instanceof>
+	</iterate>
+      </with>
+    </enabledWhen>
+  </handler>
+  <handler class="com.intel.sgx.handlers.UpdateSigningKey"
+	   commandId="com.intel.sgx.command.updateSigningKey">
+    <activeWhen>
+      <with variable="selection">
+	<iterate operator="or">
+	  <adapt type="org.eclipse.core.resources.IProject">
+	    <and>
+	      <test property="org.eclipse.core.resources.projectNature"
+		    value="com.intel.sgx.sgxnature">
+	      </test>
+	    </and>
+	  </adapt>
+	</iterate>
+      </with>
+    </activeWhen>
+    <enabledWhen>
+      <with variable="selection">
+	<iterate operator="or">
+	  <adapt type="org.eclipse.core.resources.IProject">
+	    <and>
+	      <test property="org.eclipse.core.resources.projectNature"
+		    value="com.intel.sgx.sgxnature">
+	      </test>
+	    </and>
+	  </adapt>
+	</iterate>
+      </with>
+    </enabledWhen>
+  </handler>
+  <handler class="com.intel.sgx.handlers.EnclaveConfigHandler"
+	   commandId="com.intel.sgx.command.enclaveConfigHandler">
+    <activeWhen>
+      <with variable="selection">
+	<iterate operator="or">
+	  <adapt type="org.eclipse.core.resources.IProject">
+	    <and>
+	      <test property="org.eclipse.core.resources.projectNature"
+		    value="com.intel.sgx.sgxnature">
+	      </test>
+	    </and>
+	  </adapt>
+	</iterate>
+      </with>
+    </activeWhen>
+    <enabledWhen>
+      <with variable="selection">
+	<iterate operator="or">
+	  <adapt type="org.eclipse.core.resources.IProject">
+	    <and>
+	      <test property="org.eclipse.core.resources.projectNature"
+		    value="com.intel.sgx.sgxnature">
+	      </test>
+	    </and>
+	  </adapt>
+	</iterate>
+      </with>
+    </enabledWhen>
+  </handler>
+  <handler class="com.intel.sgx.handlers.TwoStepSignStep1"
+	   commandId="com.intel.sgx.command.twoStepSignStep1">
+    <activeWhen>
+      <with variable="selection">
+    	<iterate operator="or">
+    	  <adapt type="org.eclipse.core.resources.IProject">
+    	    <and>
+    	      <test property="org.eclipse.core.resources.projectNature"
+    		    value="com.intel.sgx.sgxnature">
+    	      </test>
+    	    </and>
+    	  </adapt>
+    	</iterate>
+      </with>
+    </activeWhen>
+    <enabledWhen>
+      <with variable="selection">
+	<iterate operator="or">
+	  <adapt type="org.eclipse.core.resources.IProject">
+	    <and>
+	      <test property="org.eclipse.core.resources.projectNature"
+		    value="com.intel.sgx.sgxnature">
+	      </test>
+	    </and>
+	  </adapt>
+	</iterate>
+      </with>
+    </enabledWhen>
+  </handler>
+  <handler class="com.intel.sgx.handlers.TwoStepSignStep2"
+	   commandId="com.intel.sgx.command.twoStepSignStep2">
+    <activeWhen>
+      <with variable="selection">
+	<iterate operator="or">
+	  <adapt type="org.eclipse.core.resources.IProject">
+	    <and>
+	      <test property="org.eclipse.core.resources.projectNature"
+		    value="com.intel.sgx.sgxnature">
+	      </test>
+	    </and>
+	  </adapt>
+	</iterate>
+      </with>
+    </activeWhen>
+    <enabledWhen>
+      <with variable="selection">
+	<iterate operator="or">
+	  <adapt type="org.eclipse.core.resources.IProject">
+	    <and>
+	      <test property="org.eclipse.core.resources.projectNature"
+		    value="com.intel.sgx.sgxnature">
+	      </test>
+	    </and>
+	  </adapt>
+	</iterate>
+      </with>
+    </enabledWhen>
+  </handler>
+  <!--<handler class="com.intel.sgx.handlers.RemoveSGXNature" commandId="com.intel.sgx.command.removeSGXNature"> 
+      <activeWhen> <with variable="selection"> <iterate operator="or"> <instanceof 
+      value="org.eclipse.core.resources.IProject"> </instanceof> </iterate> </with> 
+      </activeWhen> <enabledWhen> <with variable="selection"> <iterate operator="or"> 
+      <instanceof value="org.eclipse.core.resources.IProject"> </instanceof> </iterate> 
+      </with> </enabledWhen> </handler> -->
+</extension>
+<extension id="com.intel.sgx.templates" point="org.eclipse.cdt.core.templates">
+
+  <template id="com.intel.sgx.SGXEnclaveCWithSample"    location="templates/SGXtemplates/c/with_sample/enclavetemplate.xml"   projectType="none">
+  </template>
+
+  <template id="com.intel.sgx.SGXEnclaveCMinimal"       location="templates/SGXtemplates/c/minimal/enclavetemplate.xml"       projectType="none">
+  </template>
+
+  <template id="com.intel.sgx.SGXEnclaveC++WithSample"  location="templates/SGXtemplates/c++/with_sample/enclavetemplate.xml" projectType="none">
+  </template>
+
+  <template id="com.intel.sgx.SGXEnclaveC++Minimal"     location="templates/SGXtemplates/c++/minimal/enclavetemplate.xml"     projectType="none">
+  </template>
+
+
+
+  <template id="com.intel.sgx.SGXTrustedStaticCMinimal"      location="templates/SGXtemplates/c/minimal/trustedstatictemplate.xml"       projectType="none">
+  </template>
+
+  <template id="com.intel.sgx.SGXTrustedStaticC++Minimal"    location="templates/SGXtemplates/c++/minimal/trustedstatictemplate.xml"     projectType="none">
+  </template>
+
+
+      <template
+            id="com.intel.sgx.templates.HelloWorldCCProject"
+            filterPattern=".*g.*"
+            location="templates/SGXtemplates/ctemplate.xml"
+	    projectType="my.build.property"
+
+>
+      </template>
+
+  <template filterPattern=".*" id="com.intel.sgx.SGXCPPProject"
+	    isCategory="false" location="templates/SGXtemplates/cxxtemplate.xml"
+	    projectType="none"
+>
+  </template>
+
+
+  <template id="com.intel.sgx.SGXUntrustedModuleCMinimal"      location="templates/SGXtemplates/c/minimal/untrusted_module_template.xml"       projectType="none">
+  </template>
+  <template id="com.intel.sgx.SGXUntrustedModuleC++Minimal"    location="templates/SGXtemplates/c++/minimal/untrusted_module_template.xml"     projectType="none">
+  </template>
+
+
+
+  <template id="com.intel.sgx.AddSGXNature" location="templates/SGXtemplates/common/addnaturetemplate.xml"
+	    projectType="Software Guard Extensions Project">
+  </template>
+
+  <template id="com.intel.sgx.SGXEnclaveConfig" location="templates/SGXtemplates/configtemplate.xml"
+	    projectType="none">
+  </template>
+  <!--<template id="com.intel.sgx.template1" isCategory="false" location="templates/template.xml" 
+      pagesAfterTemplateSelectionProvider="com.intel.sgx.handlers.templatepagesafter" 
+      projectType="com.intel.sgx.SGXProjectType"> </template> -->
+</extension>
+<extension point="org.eclipse.cdt.core.templateProcessTypes">
+  <processType name="CreateNativeFolders"
+	       processRunner="com.intel.sgx.templates.CreateNativeFolders">
+    <simple name="projectName">
+    </simple>
+    <simpleArray name="sourceFolders">
+    </simpleArray>
+    <simpleArray name="outputFolders">
+    </simpleArray>
+  </processType>
+  <processType name="SetCCNature" processRunner="com.intel.sgx.templates.SetCCNature">
+    <simple name="projectName" />
+  </processType>
+  <processType name="SetStaticCCNature" processRunner="com.intel.sgx.templates.SetStaticCCNature">
+    <simple name="projectName" />
+  </processType>
+</extension>
+<extension point="org.eclipse.core.resources.variableResolvers">
+  <variableResolver class="com.intel.sgx.SdkPathVariableProvider"
+		    variable="SGXSdkDirPath">
+  </variableResolver>
+</extension>
+<extension id="id2"
+	   point="org.eclipse.cdt.core.CConfigurationDataProvider">
+  <provider class="com.intel.sgx.CConfigurationDataProvider2"
+	    natures="org.eclipse.cdt.core.cnature">
+  </provider>
+</extension>
+<extension id="sgxnature" name="SGX Nature"
+	   point="org.eclipse.core.resources.natures">
+  <runtime>
+    <run class="com.intel.sgx.natures.SGXNature" />
+  </runtime>
+</extension>
+<extension id="sgxccnature" name="SGX CCNature"
+	   point="org.eclipse.core.resources.natures">
+  <runtime>
+    <run class="com.intel.sgx.natures.SGXCCNature" />
+  </runtime>
+</extension>
+<extension id="sgxstaticccnature" name="SGX StaticCCNature"
+	   point="org.eclipse.core.resources.natures">
+  <runtime>
+    <run class="com.intel.sgx.natures.SGXStaticCCNature" />
+  </runtime>
+</extension>
+<extension point="org.eclipse.core.expressions.propertyTesters"> 
+  <propertyTester class="com.intel.sgx.testers.SGXPropertyTester"
+		  id="com.intel.sgx.testers.SGXPropertyTester" 
+		  properties="sgxNatureAdded,twoStepsActive"
+		  type="java.lang.Object"
+		  namespace="com.intel.sgx.testers" 
+    > 
+  </propertyTester>
+</extension>
+
+
+<extension point="org.eclipse.ui.newWizards"> 
+  <category
+      id = "com.intel.sgx.wizzards"
+
+name="C/C++ projects with SGX Enabled">
+  </category>
+
+  <wizard
+      canFinishEarly="false"
+      category="com.intel.sgx.wizzards"
+      class="com.intel.sgx.wizards.SGXCProjectWizard"
+      finalPerspective="org.eclipse.cdt.ui.CPerspective"
+      hasPages="true"
+      icon="templates/newmngc_app.gif"
+      id="com.intel.sgx.wizards.SGXCProjectWizard"
+      name="C Project"
+      project="true">
+    <description>
+      An C project, with SGX Commands and Configurations
+    </description>
+  </wizard>
+
+  <wizard
+      canFinishEarly="false"
+      category="com.intel.sgx.wizzards"
+      class="com.intel.sgx.wizards.SGXCCProjectWizard"
+      finalPerspective="org.eclipse.cdt.ui.CPerspective"
+      hasPages="true"
+      id="com.intel.sgx.wizards.SGXCDProjectWizard"
+      icon="templates/newmngcc_app.gif"
+      name="C++ Project"
+      project="true">
+    <description>
+      An C++ project, with SGX Commands and Configurations
+    </description>
+  </wizard>
+  
+</extension> 
+
+</plugin>

+ 75 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/Activator.java

@@ -0,0 +1,75 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+package com.intel.sgx;
+
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+	public static final String PLUGIN_ID = "com.intel.sgx";//$NON-NLS-1$
+
+	private static Activator plugin;
+	
+	public Activator() {
+	}
+
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+	}
+
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+	public static ImageDescriptor getImageDescriptor(String path) {
+		return imageDescriptorFromPlugin(PLUGIN_ID, path);
+	}
+
+	public static void log(Exception e) {
+		plugin.getLog().log(newStatus(e));
+	}
+
+	public static IStatus newStatus(Exception e) {
+		return new Status(IStatus.ERROR, PLUGIN_ID, e.getMessage(), e);
+	}
+
+	public static URL findFile(Path path) {
+		return FileLocator.find(plugin.getBundle(), path, null);
+	}
+	
+	public static Bundle getBundle(String id){
+		for(Bundle bundle : plugin.getBundle().getBundleContext().getBundles()){
+			if(bundle.getSymbolicName().equals(id))
+				return bundle;
+		}
+		return null;
+	}
+}

+ 46 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/CConfigurationDataProvider2.java

@@ -0,0 +1,46 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+
+package com.intel.sgx;
+
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
+import org.eclipse.cdt.core.settings.model.extension.CConfigurationDataProvider;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+public class CConfigurationDataProvider2 extends CConfigurationDataProvider {
+
+	public CConfigurationDataProvider2() {
+	}
+
+	@Override
+	public CConfigurationData loadConfiguration(ICConfigurationDescription des,
+			IProgressMonitor monitor) throws CoreException {
+		return null;
+	}
+
+	@Override
+	public CConfigurationData createConfiguration(
+			ICConfigurationDescription des,
+			ICConfigurationDescription baseDescription,
+			CConfigurationData baseData, boolean clone, IProgressMonitor monitor)
+			throws CoreException {
+		return null;
+	}
+
+	@Override
+	public void removeConfiguration(ICConfigurationDescription des,
+			CConfigurationData data, IProgressMonitor monitor) {
+	}
+}

+ 37 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/Messages.java

@@ -0,0 +1,37 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+
+package com.intel.sgx;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+	private static final String BUNDLE_NAME = "com.intel.sgx.messages";//$NON-NLS-1$
+	
+	/*
+	 * TODO - These Strings can be used all through the package to control what messages are displayed.
+	 * 		  Todo here is to identify any message that needs to be made configurable.   
+	 */
+	public static String CreateNativeFolders_No_folders;
+	public static String CreateNativeFolders_Missing_project_name;
+	public static String CreateNativeFolders_Project_does_not_exist;
+	
+	static{
+		//Bundle initialization.
+		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+	
+	private Messages(){
+	}
+}

+ 70 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/SdkPathVariableProvider.java

@@ -0,0 +1,70 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+
+package com.intel.sgx;
+import java.io.File;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.variableresolvers.PathVariableResolver;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.preference.IPreferenceStore;
+
+import com.intel.sgx.preferences.PreferenceConstants;
+import com.intel.sgx.preferences.SGXPreferencePage;
+
+public class SdkPathVariableProvider extends PathVariableResolver {
+
+	public SdkPathVariableProvider() {
+		super();
+	}
+
+	@Override
+	public String[] getVariableNames(String variable, IResource resource) {
+		String variableNames[] = {"SGX_SDK_DIR_PATH"};
+		return (variableNames);
+	}
+	
+	@Override
+	public String getValue(String variable, IResource resource) {
+		if(variable.equals("SGX_SDK_DIR_PATH")) {		
+			IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+			String SDKPath = store.getString(PreferenceConstants.SDK_PATH);
+			IPath SDKCanonicalPath= new Path(SDKPath);
+			return(SDKCanonicalPath.append("Include").toOSString());
+		}					
+		return null;
+	}
+	
+	public static String getSGXSdkLocation() {
+        return Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.SDK_PATH);
+    }
+	
+	public static boolean isSGXSdkLocationValid() {
+        String location = getSGXSdkLocation();
+        if (location.length() == 0)
+            return false;
+
+        return isValidSGXSdkLocation(location);
+    }
+
+    public static boolean isValidSGXSdkLocation(String location) {
+    	File dir = new File(location);
+        if (!dir.isDirectory())
+            return false;
+        
+        return new PreferenceConstants.SGXSDK64Descriptor(dir).getSignerPath().canExecute()
+        		|| new PreferenceConstants.SGXSDK32Descriptor(dir).getSignerPath().canExecute();
+    }
+
+}

+ 38 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/build/SGXSDKCommandLauncher.java

@@ -0,0 +1,38 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+
+/**
+ * This class follows the same solution provided in the NDK_PLUGIN for NDKCommandLauncher.
+ */
+package com.intel.sgx.build;
+
+import org.eclipse.cdt.core.CommandLauncher;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+import com.intel.sgx.SdkPathVariableProvider;
+/**
+ * This launches the sgx-ndk-build.
+ */
+public class SGXSDKCommandLauncher extends CommandLauncher {
+
+    @Override
+    public Process execute(IPath commandPath, String[] args, String[] env, IPath changeToDirectory,
+            IProgressMonitor monitor)
+            throws CoreException {
+    	
+        return super.execute(commandPath, args, env, changeToDirectory, monitor);
+    }
+}

+ 126 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/AddEnclaveFileDialog.java

@@ -0,0 +1,126 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+
+package com.intel.sgx.dialogs;
+
+import javax.swing.JOptionPane;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+import com.intel.sgx.handlers.AddEnclave;
+
+public class AddEnclaveFileDialog extends SGXDialogBase {
+
+	private Text fileNameField;
+	private AddEnclave addHandler;
+	private boolean generateApp = true;
+	
+	public AddEnclaveFileDialog(Shell shell, AddEnclave addHandler) {
+		super(shell);
+		this.addHandler = addHandler;
+		this.shell = shell;
+		// setShellStyle(SWT.RESIZE | SWT.TITLE);
+	}
+	
+	public boolean generateApp()
+	{
+		return generateApp;
+	}
+	
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		Composite composite = (Composite) super.createDialogArea(parent);
+		final GridLayout gridLayout = new GridLayout(1,false);
+		composite.setLayout(gridLayout);
+		
+		final Group container = new Group(composite, SWT.NONE);
+		container.setLayout(new GridLayout(3,false));
+		GridData innergrid1 = new GridData(GridData.FILL_HORIZONTAL);
+		innergrid1.horizontalSpan = 3;
+		container.setLayoutData(innergrid1);
+		
+		addLabel(container, "Enter the name of the Enclave. Make sure the name is unique within the hosting application.");
+			
+		final Label fileNameLabel = new Label(container, SWT.NONE);
+		fileNameLabel.setText("Enclave name:");
+		fileNameLabel.setLayoutData(new GridData(GridData.BEGINNING,GridData.CENTER, false, false));
+
+		fileNameField = new Text(container,SWT.SINGLE | SWT.BORDER);
+		GridData textGridData1 = new GridData(GridData.FILL_HORIZONTAL);
+		textGridData1.minimumWidth = 400;
+		textGridData1.grabExcessHorizontalSpace = true;
+		fileNameField.setLayoutData(textGridData1);
+
+        Button generateUntrustedApp = new Button(container, SWT.CHECK);
+        generateUntrustedApp.setText("Generate sample untrusted application?");
+        generateUntrustedApp.setLayoutData(new GridData(GridData.BEGINNING, GridData.END, false, false, 3, 1));
+        generateUntrustedApp.setSelection(true);
+        
+        generateUntrustedApp.addSelectionListener(new SelectionAdapter() {
+
+            @Override
+            public void widgetSelected(SelectionEvent event) {
+                Button btn = (Button) event.getSource();
+                generateApp = btn.getSelection();
+            }
+        });
+        
+        container.layout();
+        composite.layout();
+		return composite;
+	}
+
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText("Add New SGX Enclave Dialog");
+		newShell.layout();
+	}
+	
+	@Override
+	protected
+	void okPressed() {
+		addHandler.edlFilename = fileNameField.getText();
+		if(!fileNameField.getText().isEmpty() 
+				){
+				if(Character.isDigit(fileNameField.getText().charAt(0)))
+				{
+				JOptionPane.showMessageDialog(null, "Enclave names starting with digits are not allowed.", "Error",
+						JOptionPane.ERROR_MESSAGE);
+				}
+				else
+				super.okPressed();
+		}
+	}
+	
+	@Override
+	protected Point getInitialSize(){
+		return new Point(675,200);
+	}
+	
+	public String getFileName() {
+		return fileNameField.getText();
+	}
+}

+ 109 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/AddTrustedStaticLibFileDialog.java

@@ -0,0 +1,109 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+
+package com.intel.sgx.dialogs;
+
+import javax.swing.JOptionPane;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+import com.intel.sgx.handlers.AddTrustedStaticLib;
+
+public class AddTrustedStaticLibFileDialog extends SGXDialogBase  {
+
+	private Text fileNameField;
+	private AddTrustedStaticLib addHandler;
+	private boolean generateApp = false;
+
+	public AddTrustedStaticLibFileDialog(Shell shell, AddTrustedStaticLib addHandler) {
+		super(shell);
+		this.addHandler = addHandler;
+		this.shell = shell;
+		// setShellStyle(SWT.RESIZE | SWT.TITLE);
+	}
+
+	public boolean generateApp()
+	{
+		return generateApp;
+	}
+
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		Composite composite = (Composite) super.createDialogArea(parent);
+		final GridLayout gridLayout = new GridLayout(1,false);
+		composite.setLayout(gridLayout);
+
+		final Group container = new Group(composite, SWT.NONE);
+		container.setLayout(new GridLayout(3,false));
+		GridData innergrid1 = new GridData(GridData.FILL_HORIZONTAL);
+		innergrid1.horizontalSpan = 3;
+		container.setLayoutData(innergrid1);
+
+		addLabel(container, "Enter the name of the Static Trusted Library.");
+		addLabel(container, "Make sure the name is unique within the hosting application.");
+
+		final Label fileNameLabel = new Label(container, SWT.NONE);
+		fileNameLabel.setText("Static Trusted Library Name:");
+		fileNameLabel.setLayoutData(new GridData(GridData.BEGINNING,GridData.CENTER, false, false));
+
+		fileNameField = new Text(container,SWT.SINGLE | SWT.BORDER);
+		GridData textGridData1 = new GridData(GridData.FILL_HORIZONTAL);
+		textGridData1.minimumWidth = 400;
+		textGridData1.grabExcessHorizontalSpace = true;
+		fileNameField.setLayoutData(textGridData1);
+
+		composite.layout();
+
+		return composite;
+	}
+
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText("Add New SGX Static Trusted Library Dialog");
+	}
+
+	@Override
+	protected
+	void okPressed(){
+		addHandler.edlFilename = fileNameField.getText();
+		if(!fileNameField.getText().isEmpty() 
+				){
+			if(Character.isDigit(fileNameField.getText().charAt(0)))
+			{
+				JOptionPane.showMessageDialog(null, "Enclave names starting with digits are not allowed.", "Error",
+						JOptionPane.ERROR_MESSAGE);
+			}
+			else
+				super.okPressed();
+		}
+	}
+
+	@Override
+	protected Point getInitialSize(){
+		return new Point(675,200);
+	}
+
+	public String getFileName() {
+		return fileNameField.getText();
+	}
+}

+ 138 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/AddUntrustedModuleDialog.java

@@ -0,0 +1,138 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+
+package com.intel.sgx.dialogs;
+
+import java.io.File;
+
+import javax.swing.JOptionPane;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+import com.intel.sgx.handlers.AddUntrustedModule;
+
+public class AddUntrustedModuleDialog extends Dialog {
+
+	private Text fileNameField,makeFilePathField;
+	private Shell shell;
+	private AddUntrustedModule addHandler;
+	private boolean generateApp = false;
+	
+	public AddUntrustedModuleDialog(Shell shell, AddUntrustedModule addHandler) {
+		super(shell);
+		this.addHandler = addHandler;
+		this.shell = shell;
+		//setShellStyle(SWT.RESIZE | SWT.TITLE);
+	}
+	
+	public boolean generateApp()
+	{
+		return generateApp;
+	}
+	
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		Composite composite = (Composite) super.createDialogArea(parent);
+		final GridLayout gridLayout = new GridLayout(1,false);
+		composite.setLayout(gridLayout);
+		
+		final Group container = new Group(composite, SWT.NONE);
+		container.setLayout(new GridLayout(3,false));
+		GridData innergrid1 = new GridData(GridData.FILL_HORIZONTAL);
+		innergrid1.horizontalSpan = 3;
+		container.setLayoutData(innergrid1);
+		
+		final Label messageLabel = new Label(container, SWT.NONE);
+		messageLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1));
+		messageLabel.setText("Enter the path to the Enclave Descriptor file (*.edl) of the enclave to host.");
+		
+		
+		final Label fileNameLabel = new Label(container, SWT.NONE);
+		fileNameLabel.setText("Filename:");
+		fileNameLabel.setLayoutData(new GridData(GridData.BEGINNING,GridData.CENTER, false, false));
+		
+		
+		fileNameField = new Text(container,SWT.SINGLE | SWT.BORDER);
+		GridData textGridData1 = new GridData(GridData.FILL_HORIZONTAL);
+		textGridData1.minimumWidth = 400;
+		textGridData1.grabExcessHorizontalSpace = true;
+		fileNameField.setLayoutData(textGridData1);
+
+		final Button browseButton = new Button(container, SWT.PUSH);
+		browseButton.setText("Browse");
+		GridData buttonGridData1 = new GridData(GridData.END);
+		buttonGridData1.horizontalAlignment = SWT.RIGHT;
+		buttonGridData1.horizontalSpan = 1;
+		buttonGridData1.minimumWidth = 120;
+		browseButton.setLayoutData(buttonGridData1);
+		browseButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent event) {
+				String result = null;
+                shell = new Shell();
+				FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+				dialog.setFilterExtensions(new String [] {"*.edl"});
+				dialog.setFilterPath("");
+				result = dialog.open();
+				fileNameField.setText(result);
+			}
+			
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}		
+		});
+		
+		return composite;
+	}
+
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText("Add SGX Untrusted Module.");
+	}
+	
+	@Override
+	protected
+	void okPressed(){
+		addHandler.edlFilename = fileNameField.getText();
+		if(!fileNameField.getText().isEmpty()) 
+				if((new File(fileNameField.getText())).isFile())
+					super.okPressed();
+				else
+					JOptionPane.showMessageDialog(null, "EDL file does not exist.", "Error",
+							JOptionPane.ERROR_MESSAGE);
+	}
+	
+	@Override
+	protected Point getInitialSize(){
+		return new Point(675,200);
+	}
+	
+	public String getFileName() {
+		return fileNameField.getText();
+	}
+}

+ 257 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/EnclaveConfigDialog.java

@@ -0,0 +1,257 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+
+package com.intel.sgx.dialogs;
+
+import org.eclipse.jface.preference.JFacePreferences;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+import com.intel.sgx.handlers.EnclaveConfigHandler;
+
+public class EnclaveConfigDialog extends SGXDialogBase {
+
+	@SuppressWarnings("unused")
+	private Shell shell;
+	private EnclaveConfigHandler enclaveConfig;
+	private Label statusLabel;
+	private Text prodID;
+	private Text isvSvn;
+	private Text threadStackSize;
+	private Text globalHeapSize;
+	private Text tcsNum;
+	private Combo tcsPolicy;
+	private Button disableDebug;
+	
+	public EnclaveConfigDialog(Shell parentshell,EnclaveConfigHandler enclaveConfigHandler) {
+		super(parentshell);
+		this.shell = parentshell;
+		this.enclaveConfig = enclaveConfigHandler;
+		setShellStyle(SWT.RESIZE | SWT.TITLE);
+	}
+	
+	@Override
+	protected Control createDialogArea(Composite parent) {
+
+		Composite container = (Composite) super.createDialogArea(parent);
+		final GridLayout gridLayout = new GridLayout(3,false);
+		container.setLayout(gridLayout);
+		
+		final Group groupLabel1 = new Group(container, SWT.None);
+		groupLabel1.setLayout(new GridLayout(3,false));
+		GridData innergrid1 = new GridData(GridData.FILL_HORIZONTAL);
+		innergrid1.horizontalSpan = 3;
+		groupLabel1.setLayoutData(innergrid1);
+		
+		Label warningLabel = new Label(groupLabel1,SWT.BEGINNING | SWT.WRAP);
+		warningLabel.setText("Note: Use this Menu to change the Enclave settings.");
+		
+		statusLabel = new Label(container,SWT.BEGINNING | SWT.WRAP);
+		GridData statusGrid = new GridData(GridData.FILL_HORIZONTAL);
+		statusGrid.horizontalSpan = 3;
+		statusLabel.setLayoutData(statusGrid);
+		statusLabel.setText("");
+		statusLabel.setForeground(JFaceResources.getColorRegistry().get(JFacePreferences.ERROR_COLOR));
+
+		final Group groupLabel2 = new Group(container, SWT.None);
+		groupLabel2.setLayout(new GridLayout(3,false));
+		groupLabel2.setText("Modify the Enclave Settings here...");
+		GridData innergrid = new GridData(GridData.FILL_HORIZONTAL);
+		innergrid.horizontalSpan = 3;
+		groupLabel2.setLayoutData(innergrid);
+		
+		final Label messageLabel0 = new Label(groupLabel2, SWT.NONE);
+		messageLabel0.setText("Product ID:");
+		messageLabel0.setLayoutData(new GridData(GridData.BEGINNING));
+			
+		prodID = new Text(groupLabel2, SWT.SINGLE | SWT.BORDER);
+		GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
+		gridData.horizontalSpan = 2;
+		gridData.widthHint = 400;		
+		prodID.setLayoutData(gridData);
+		prodID.setText(enclaveConfig.prodId);
+		prodID.addModifyListener(new ModifyListener() {
+			@Override
+			public void modifyText(ModifyEvent modifyEvent) {
+				statusLabel.setText("");
+				enclaveConfig.prodId = prodID.getText();
+			}
+		});
+		
+		final Label messageLabel1 = new Label(groupLabel2, SWT.NONE);
+		messageLabel1.setText("ISV SVN:");
+		messageLabel1.setLayoutData(new GridData(GridData.BEGINNING));
+			
+		isvSvn = new Text(groupLabel2, SWT.SINGLE | SWT.BORDER);		
+		isvSvn.setLayoutData(gridData);
+		isvSvn.setText(enclaveConfig.isvSvn);
+		isvSvn.addModifyListener(new ModifyListener() {
+			@Override
+			public void modifyText(ModifyEvent modifyEvent) {
+				statusLabel.setText("");
+				enclaveConfig.isvSvn = isvSvn.getText();
+			}
+		});
+		
+		final Label messageLabel2 = new Label(groupLabel2, SWT.NONE);
+		messageLabel2.setText("Thread Stack Size:");
+		messageLabel2.setLayoutData(new GridData(GridData.BEGINNING));
+		
+		threadStackSize = new Text(groupLabel2, SWT.SINGLE | SWT.BORDER);
+		threadStackSize.setLayoutData(gridData);
+		threadStackSize.setText(enclaveConfig.threadStackSize);
+		threadStackSize.addModifyListener(new ModifyListener() {
+			@Override
+			public void modifyText(ModifyEvent modifyEvent) {
+				enclaveConfig.threadStackSize = threadStackSize.getText();
+				if(!(threadStackSize.getText().matches("0x[0-9a-fA-F]{1,}000")))
+				{
+					statusLabel.setText("Error: The Thread Stack Size value must be Page Aligned.");
+				}
+				else
+				{
+					if(!(enclaveConfig.globalHeapSize.matches("0x[0-9a-fA-F]{1,}000")))
+						statusLabel.setText("Error: The Global Heap Size value must be Page Aligned.");
+					else
+						statusLabel.setText("");
+				}
+			}
+		});
+		
+		final Label messageLabel3 = new Label(groupLabel2, SWT.NONE);
+		messageLabel3.setText("Global Heap Size:");
+		messageLabel3.setLayoutData(new GridData(GridData.BEGINNING));
+		
+		globalHeapSize = new Text(groupLabel2, SWT.SINGLE | SWT.BORDER);
+		globalHeapSize.setLayoutData(gridData);
+		globalHeapSize.setText(enclaveConfig.globalHeapSize);
+		globalHeapSize.addModifyListener(new ModifyListener() {
+			@Override
+			public void modifyText(ModifyEvent modifyEvent) {
+				enclaveConfig.globalHeapSize = globalHeapSize.getText();
+				if(!(globalHeapSize.getText().matches("0x[0-9a-fA-F]{1,}000")))
+				{
+					statusLabel.setText("Error: The Global Heap Size value must be Page Aligned.");
+				}
+				else
+				{
+					if(!(enclaveConfig.threadStackSize.matches("0x[0-9a-fA-F]{1,}000")))
+						statusLabel.setText("Error: The Thread Stack Size value must be Page Aligned.");
+					else
+						statusLabel.setText("");
+					
+				}
+			}
+		});
+		
+		final Label messageLabel4 = new Label(groupLabel2, SWT.NONE);
+		messageLabel4.setText("TCS Number:");
+		messageLabel4.setLayoutData(new GridData(GridData.BEGINNING));
+		
+		tcsNum = new Text(groupLabel2, SWT.SINGLE | SWT.BORDER);	
+		tcsNum.setLayoutData(gridData);
+		tcsNum.setText(enclaveConfig.tcsNum);
+		tcsNum.addModifyListener(new ModifyListener() {
+			@Override
+			public void modifyText(ModifyEvent modifyEvent) {
+				statusLabel.setText("");
+				enclaveConfig.tcsNum = tcsNum.getText();
+			}
+		});
+		
+		final Label messageLabel5 = new Label(groupLabel2, SWT.NONE);
+		messageLabel5.setText("TCS Policy:");
+		messageLabel5.setLayoutData(new GridData(GridData.BEGINNING));
+		
+		final String[] items = {"Unbound","Bound"};
+		tcsPolicy = new Combo(groupLabel2, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER);
+		tcsPolicy.setItems(items);
+		String item = items[Integer.parseInt(enclaveConfig.tcsPolicy)];
+		int index = tcsPolicy.indexOf(item);
+		tcsPolicy.select(index < 0 ? 0 : index);
+		tcsPolicy.setLayoutData(gridData);
+		tcsPolicy.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e){
+				statusLabel.setText("");
+				enclaveConfig.tcsPolicy = (tcsPolicy.getSelectionIndex() == 0 ? "0" : "1");
+			}
+		});
+		
+		
+		final Label messageLabel6 = new Label(groupLabel2, SWT.NONE);
+		messageLabel6.setText("Disable Debug:");
+		messageLabel6.setLayoutData(new GridData(GridData.BEGINNING));
+		
+		disableDebug = new Button(groupLabel2,SWT.CHECK);
+		GridData gridData1 = new GridData(GridData.FILL_HORIZONTAL);
+		disableDebug.setLayoutData(gridData1);
+		disableDebug.setSelection(enclaveConfig.disableDebug.equals("1")?true:false);
+		disableDebug.addSelectionListener(new SelectionAdapter(){
+			public void widgetSelected(SelectionEvent e){
+				statusLabel.setText("");
+				enclaveConfig.disableDebug = disableDebug.getSelection()?"1":"0";
+			}
+		});
+		
+		if(statusLabel.getText() != null){
+			statusLabel.setVisible(true);
+		}
+		else{
+			statusLabel.setVisible(false);
+		}
+				
+		return container;
+	}
+	
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText("Enclave Configuration Settings:");
+	}
+	
+	@Override
+	protected Point getInitialSize(){
+		return new Point(450,400);
+	}
+	
+	@Override
+	protected
+	void okPressed(){
+		enclaveConfig.prodId = this.prodID.getText();
+		enclaveConfig.isvSvn = this.isvSvn.getText();
+		enclaveConfig.threadStackSize = this.threadStackSize.getText();
+		enclaveConfig.globalHeapSize = this.globalHeapSize.getText();
+		enclaveConfig.tcsNum =  this.tcsNum.getText();
+		enclaveConfig.tcsPolicy = this.tcsPolicy.getSelectionIndex() == 0 ? "0" : "1";
+		enclaveConfig.disableDebug = disableDebug.getSelection()?"1":"0";
+
+		
+		if((statusLabel.getText() == "") && (enclaveConfig.globalHeapSize.matches("0x[0-9a-fA-F]{1,}000")) && (enclaveConfig.threadStackSize.matches("0x[0-9a-fA-F]{1,}000")))
+			super.okPressed();
+	}
+}

+ 122 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/RemoveEnclaveFileDialog.java

@@ -0,0 +1,122 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+
+package com.intel.sgx.dialogs;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.DirectoryDialog;
+//import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+import com.intel.sgx.handlers.RemoveEnclave;
+
+public class RemoveEnclaveFileDialog extends Dialog{
+
+	private Text fileNameField;
+	private Shell shell;
+	private RemoveEnclave removeHandler;
+	
+	public RemoveEnclaveFileDialog(Shell shell, RemoveEnclave removeHandler) {
+		super(shell);
+		this.removeHandler = removeHandler;
+		this.shell = shell;
+		setShellStyle(SWT.RESIZE | SWT.TITLE);
+	}
+	
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		Composite composite = (Composite) super.createDialogArea(parent);
+		final GridLayout gridLayout = new GridLayout(1,false);
+		composite.setLayout(gridLayout);
+		
+		final Group container = new Group(composite, SWT.None);
+		container.setLayout(new GridLayout(3,false));
+		GridData innergrid1 = new GridData(GridData.FILL_HORIZONTAL);
+		innergrid1.horizontalSpan = 3;
+		container.setLayoutData(innergrid1);
+		container.setText("Path to Enclave directory:");
+		
+		final Label messageLabel = new Label(container, SWT.NONE);
+		messageLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1));
+		messageLabel.setText("Enter the name of the Enclave Or Navigate to the Enclave folder to be removed from the host.");
+			
+		final Label fileNameLabel = new Label(container, SWT.NONE);
+		fileNameLabel.setLayoutData(new GridData(GridData.BEGINNING,GridData.CENTER, false, false));
+		fileNameLabel.setText("Enclave Name:");
+		
+		fileNameField = new Text(container, SWT.SINGLE | SWT.BORDER);
+		GridData textGridData1 = new GridData(GridData.FILL_HORIZONTAL);
+		textGridData1.minimumWidth = 400;
+		textGridData1.grabExcessHorizontalSpace = true;
+		fileNameField.setLayoutData(textGridData1);
+
+		final Button browseButton = new Button(container, SWT.PUSH);
+		browseButton.setText("Browse");
+		GridData buttonGridData1 = new GridData(GridData.END);
+		buttonGridData1.horizontalAlignment = SWT.RIGHT;
+		buttonGridData1.horizontalSpan = 1;
+		buttonGridData1.minimumWidth = 120;
+		browseButton.setLayoutData(buttonGridData1);
+		browseButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent event) {
+				String result = fileNameField.getText();
+
+				DirectoryDialog dialog = new DirectoryDialog(shell, SWT.OPEN);
+				dialog.setMessage("Select the Enclave Directory to remove.");
+				dialog.setFilterPath("");
+				result = dialog.open();
+				fileNameField.setText(result);
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}	
+		});
+
+		return container;
+	}
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText("Remove an Imported Enclave");
+	}
+	
+	@Override
+	protected void okPressed(){
+		removeHandler.edlFilename = fileNameField.getText();
+		if(!fileNameField.getText().isEmpty())
+			super.okPressed();
+	}
+	
+	@Override
+	protected Point getInitialSize(){
+		return new Point(675,205);
+	}
+	
+	public String getFileName() {
+		return fileNameField.getText();
+	}
+}

+ 222 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/SGXDialogBase.java

@@ -0,0 +1,222 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+
+package com.intel.sgx.dialogs;
+
+import java.io.InputStream;
+import java.util.Scanner;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.FilteredResourcesSelectionDialog;
+
+import com.intel.sgx.Activator;
+
+public abstract class SGXDialogBase extends Dialog {
+
+	protected Shell shell;
+	public Text configFileField;
+	public static FilteredResourcesSelectionDialog dialogForConfig(Shell shell) {
+		// final IContainer container = ResourcesPlugin.getWorkspace().getRoot();
+		
+		final IContainer container = SGXDialogBase.getCurrentProject();
+
+		FilteredResourcesSelectionDialog d = new FilteredResourcesSelectionDialog(
+				shell, false, container, IResource.FILE) {
+			{
+				setInitialPattern("**");
+			}
+
+			@Override
+			protected IStatus validateItem(Object item) {
+				// return Status.OK_STATUS;
+				IFile f = (IFile) item;
+				if (f.getParent() instanceof IProject) {
+					return new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+							"The selected resource has to be part of the source folder");
+				}
+				
+				
+				return super.validateItem(item);
+			}
+
+			protected ItemsFilter createFilter() {
+				return new ResourceFilter(container, true, IResource.FILE) {
+
+					@Override
+					public boolean matchItem(Object item) {
+						return isConfigFile(item);
+					}
+
+					private boolean isConfigFile(Object item) {
+						if (!(item.toString().endsWith(".xml") && super
+								.matchItem(item))) {
+							return false;
+						}
+						try {
+							IFile iFile = (IFile) item;
+							return streamContainsString(iFile.getContents(),
+									"<EnclaveConfiguration>");
+						} catch (Throwable e) {
+							return false;
+						}
+					}
+
+				};
+
+			}
+
+			public boolean streamContainsString(InputStream is,
+					String searchString) {
+				Scanner streamScanner = new Scanner(is);
+				if (streamScanner.findWithinHorizon(searchString, 0) != null) {
+					return true;
+				} else {
+					return false;
+				}
+			}
+
+		};
+		return d;
+	}
+
+
+	
+	protected SelectionListener configFileSelectionListener = new SelectionListener() {
+				@Override
+				public void widgetSelected(SelectionEvent event) {
+		
+					FilteredResourcesSelectionDialog d = dialogForConfig(shell);
+					d.setTitle("Select Config File");
+					if (d.open() == Dialog.OK) {
+						IFile target = (IFile) d.getResult()[0];
+						configFileField.setText(target.getLocation().toOSString());
+					}
+					;
+				}
+		
+				@Override
+				public void widgetDefaultSelected(SelectionEvent arg0) {
+					// TODO Auto-generated method stub
+		
+				}
+				
+			};
+
+	public SGXDialogBase(Shell parentShell) {
+		super(parentShell);
+	}
+
+	public SGXDialogBase(IShellProvider parentShell) {
+		super(parentShell);
+	}
+
+	protected Text addGroup(Composite composite, String title, String subtitle,
+			String label, String selectButtonLabel, SelectionListener selectionListener) {
+				final Group container = new Group(composite, SWT.None);
+				container.setLayout(new GridLayout(3, false));
+				GridData innergrid1 = new GridData(GridData.FILL_HORIZONTAL);
+				innergrid1.horizontalSpan = 3;
+				container.setLayoutData(innergrid1);
+				container.setText(title);
+			
+				final Label messageLabel = new Label(container, SWT.NONE);
+				messageLabel.setLayoutData(new GridData(GridData.BEGINNING,
+						GridData.CENTER, false, false, 3, 1));
+				messageLabel.setText(subtitle);
+			
+				final Label messageLabel1 = new Label(container, SWT.NONE);
+				messageLabel1.setText(label);
+				messageLabel1.setLayoutData(new GridData(GridData.BEGINNING));
+			
+				Text directoryNameField = new Text(container, SWT.SINGLE | SWT.BORDER);
+				GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
+				gridData.horizontalSpan = 1;
+				gridData.widthHint = 400;
+				directoryNameField.setLayoutData(gridData);
+			
+				final Button selectButton = new Button(container, SWT.PUSH);
+				selectButton.setText(selectButtonLabel);
+				GridData buttonGridData = new GridData(GridData.END);
+				buttonGridData.horizontalAlignment = SWT.RIGHT;
+				buttonGridData.horizontalSpan = 1;
+				buttonGridData.minimumWidth = 120;
+				selectButton.setLayoutData(buttonGridData);
+				selectButton.addSelectionListener(selectionListener);
+				return directoryNameField;
+			}
+
+	
+	public IPath getCurrentProjectPath() {
+		IProject project = getCurrentProject();
+		
+		IPath path = null;
+		if (project != null) {
+			path = project.getLocation();
+		}
+		return path;
+	}
+
+	static public IProject getCurrentProject() {
+		IProject project = null;
+
+		
+		IWorkbenchWindow window = PlatformUI.getWorkbench()
+				.getActiveWorkbenchWindow();
+		if (window != null) {
+			IStructuredSelection selection = (IStructuredSelection) window
+					.getSelectionService().getSelection();
+			Object firstElement = selection.getFirstElement();
+			if (firstElement instanceof IAdaptable) {
+				project = (IProject) ((IAdaptable) firstElement)
+						.getAdapter(IProject.class);
+			}
+		}
+		return project;
+	}
+	
+	@Override
+	protected void configureShell(Shell newShell){
+		super.configureShell(newShell);
+	}
+
+	protected void addLabel(final Group container, String labelText) {
+		final Label messageLabel = new Label(container, SWT.NONE);
+		messageLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1));
+		messageLabel.setText(labelText);
+	}
+
+}

+ 174 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignDialogBase.java

@@ -0,0 +1,174 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+
+package com.intel.sgx.dialogs;
+
+import java.io.File;
+import java.util.Scanner;
+
+import javax.swing.JOptionPane;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+public abstract class TwoStepSignDialogBase extends SGXDialogBase {
+
+	public Text enclaveFileField;
+	public Text hashFileField;
+	public Text externalSignPublicKeyFileField;
+	public Text externalSignedHashFileField;
+	public Text outputSignedEnclaveFileField;
+
+	public TwoStepSignDialogBase(Shell parentShell) {
+		super(parentShell);
+		setShellStyle(SWT.RESIZE | SWT.TITLE);
+		this.shell = TwoStepSignDialogBase.this.getParentShell();
+		 
+	}
+
+	// for each field, a corresponding listener
+	protected SelectionListener enclaveFileSelectionListener = new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent event) {
+				String result = enclaveFileField.getText();
+				FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+				
+	
+	
+				dialog.setFilterExtensions(new String[]{"*.so"} );
+				dialog.setFilterPath(getCurrentProjectPath().toOSString());
+	
+				if (result != null && !result.isEmpty()) {
+					dialog.setFilterPath(new File(result).getParent());
+				} else {
+					dialog.setFilterPath(getCurrentProjectPath().toOSString());
+				}
+	
+				result = dialog.open();
+	
+				enclaveFileField.setText(result);
+	
+				hashFileField.setText(result + ".hex");
+
+				if (outputSignedEnclaveFileField != null){
+					String outputSignedEnclavePath =  result;
+					if(outputSignedEnclavePath.endsWith(".so"))
+					{
+						outputSignedEnclavePath = 
+								outputSignedEnclavePath.substring(0,outputSignedEnclavePath.length() - ".so".length());
+						outputSignedEnclaveFileField.setText(outputSignedEnclavePath+".signed.so");
+					}
+						
+				}
+
+				
+				
+			}
+	
+			@Override
+			public void widgetDefaultSelected(SelectionEvent arg0) {
+			}
+		};
+
+		protected SelectionListener hashFileSelectionListener = new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent event) {
+				String result = hashFileField.getText();
+				
+				FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+				
+				if (result != null && !result.isEmpty()) {
+					dialog.setFilterPath(new File(result).getParent());
+				} else {
+					dialog.setFilterPath(getCurrentProjectPath().toOSString());
+				}
+				
+				result = dialog.open();
+	
+				hashFileField.setText(result);
+			}
+	
+			@Override
+			public void widgetDefaultSelected(SelectionEvent arg0) {
+			}
+	
+		};
+		
+	protected SelectionListener publicKeyLocationSelectionListener = new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent event) {
+				String result = externalSignPublicKeyFileField.getText();
+				FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+				dialog.setFilterExtensions(new String [] {"*.pem", "*"});
+				dialog.setFilterPath(getCurrentProjectPath().toOSString());
+				result = dialog.open();
+				externalSignPublicKeyFileField.setText(result);
+			}
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}		
+		};
+		
+	protected SelectionListener externalSignedHashFileSelectionListener = new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent event) {
+				String result = externalSignedHashFileField.getText();
+				FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+				dialog.setFilterPath(getCurrentProjectPath().toOSString());
+				result = dialog.open();
+				externalSignedHashFileField.setText(result);
+			}
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}		
+		};
+		
+		protected SelectionListener outputSignedEnclaveListener = new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent event) {
+				String result = outputSignedEnclaveFileField.getText();
+				FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+	
+	
+				dialog.setFilterExtensions(new String[]{"*.so", } );
+				dialog.setFilterPath(getCurrentProjectPath().toOSString());
+	
+				if (result != null && !result.isEmpty()) {
+					dialog.setFilterPath(new File(result).getParent());
+				} else {
+					dialog.setFilterPath(getCurrentProjectPath().toOSString());
+				}
+	
+				result = dialog.open();
+	
+				outputSignedEnclaveFileField.setText(result);
+	
+			}
+	
+			@Override
+			public void widgetDefaultSelected(SelectionEvent arg0) {
+			}
+		};
+
+		
+		@Override
+		protected void configureShell(Shell newShell) {
+			super.configureShell(newShell);
+		}
+		
+
+}

+ 72 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep1Dialog1.java

@@ -0,0 +1,72 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+
+package com.intel.sgx.dialogs;
+
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+import com.intel.sgx.handlers.TwoStepSignHandlerBase;
+
+public class TwoStepSignStep1Dialog1 extends TwoStepSignDialogBase {
+
+	final private TwoStepSignHandlerBase handler;
+
+	public TwoStepSignStep1Dialog1(Shell parentShell, TwoStepSignHandlerBase handler) {
+		super(parentShell);
+		this.handler = handler;
+	}
+
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		Composite composite = (Composite) super.createDialogArea(parent);
+		final GridLayout gridLayout = new GridLayout(1, false);
+		composite.setLayout(gridLayout);
+
+		enclaveFileField = addGroup(composite, "Unsigned Enclave Path:",
+				"Select Enclave for which to generate the Hash.",
+				"Enclave Path:", "Select Enclave", enclaveFileSelectionListener);
+
+		hashFileField = addGroup(composite, "Generate Hash:",
+				"Select Location to Output Hash File.", "Hash File Location:",
+				"Select File Path", hashFileSelectionListener);
+
+		configFileField = addGroup(composite, "Configuration File:",
+				"Select Input Configuration XML File.  ",
+				"Configuration File:", "Select Config",
+				configFileSelectionListener);
+
+		composite.pack(true);
+		return composite;
+	}
+
+	@Override
+	protected void okPressed() {
+		handler.enclaveFile = enclaveFileField.getText();
+		handler.hashFile = hashFileField.getText();
+		handler.configFile = configFileField.getText();
+		
+		super.okPressed();
+	}
+
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText("Two Step Enclave Sign - Generate Hash");
+	}
+	
+	
+
+}

+ 89 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep1Dialog2.java

@@ -0,0 +1,89 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+
+package com.intel.sgx.dialogs;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+
+public class TwoStepSignStep1Dialog2 extends TwoStepSignDialogBase {
+
+	final private String hashFile;
+
+	public TwoStepSignStep1Dialog2(Shell parentShell, String hashFile) {
+		super(parentShell);
+		this.hashFile = hashFile;
+	}
+
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		Composite composite = (Composite) super.createDialogArea(parent);
+		final GridLayout gridLayout = new GridLayout(1,false);
+		composite.setLayout(gridLayout);
+		
+		addGroup1(composite);
+		addGroup3(composite);
+		
+		
+		return composite;
+	}
+
+	private void addGroup1(Composite composite) {
+		final Group container = new Group(composite, SWT.None);
+		container.setLayout(new GridLayout(3,false));
+		GridData innergrid1 = new GridData(GridData.FILL_HORIZONTAL);
+	innergrid1.horizontalSpan = 3;
+		container.setLayoutData(innergrid1);
+		container.setText("Hash File:");
+		
+		final Label messageLabel = new Label(container, SWT.NONE);
+		messageLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1));
+		messageLabel.setText("Hash File Generated at Location:");
+		
+		final Label messageLabel1 = new Label(container, SWT.NONE);
+		messageLabel1.setText(hashFile);
+
+		messageLabel1.setLayoutData(new GridData(GridData.BEGINNING));
+	}
+
+	private void addGroup3(Composite composite) {
+		final Group container3 = new Group(composite, SWT.None);
+		container3.setLayout(new GridLayout(3,false));
+		GridData innergrid3 = new GridData(GridData.FILL_HORIZONTAL);
+		innergrid3.horizontalSpan = 3;
+		container3.setLayoutData(innergrid3);
+		container3.setText("Generate Signed Enclave (Step-2):");
+		
+		final Label messageLabel4 = new Label(container3, SWT.NONE);
+		messageLabel4.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1));
+		messageLabel4.setText("To Generate Signed Enclave Now: Click OK");
+		
+		final Label messageLabel5 = new Label(container3, SWT.NONE);
+		messageLabel5.setLayoutData(new GridData(GridData.CENTER, GridData.END, false, false, 3, 1));
+		messageLabel5.setText("To Generate Signed Enclave Later: Click Cancel");
+	}
+
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText("Two Step Enclave Sign - Generate Hash");
+	}
+	
+	
+}

+ 105 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep1Dialog3.java

@@ -0,0 +1,105 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+
+package com.intel.sgx.dialogs;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+
+import com.intel.sgx.handlers.TwoStepSignHandlerBase;
+
+public class TwoStepSignStep1Dialog3 extends TwoStepSignDialogBase {
+	
+	final private TwoStepSignHandlerBase handler;
+
+	public TwoStepSignStep1Dialog3(Shell parentShell, TwoStepSignHandlerBase handler) {
+		super(parentShell);
+		this.handler = handler;
+	}
+
+	protected Control createDialogArea(Composite parent) {
+		Composite composite = (Composite) super.createDialogArea(parent);
+		final GridLayout gridLayout = new GridLayout(1, false);
+		composite.setLayout(gridLayout);
+
+		addInfoGroup(composite);
+
+		externalSignPublicKeyFileField = addGroup(composite, "Public Key:",
+				"Select the Public Key file obtained from signing facility",
+				"Public Key:", "Select", publicKeyLocationSelectionListener);
+
+		externalSignedHashFileField = addGroup(composite, "Signature:",
+				"Select the Signature file obtained from signing facility.", 
+				"Signature:",
+				"Select", externalSignedHashFileSelectionListener);
+
+		
+		outputSignedEnclaveFileField = addGroup(composite, "Signed Enclave:",
+				"Select where to save the output Signed Enclave.", 
+				"Signed Enclave:",
+				"Select", outputSignedEnclaveListener);
+
+		return composite;
+	}
+	
+	protected void addInfoGroup(Composite composite) {
+		final Group container = new Group(composite, SWT.None);
+		container.setLayout(new GridLayout(3,false));
+		GridData innergrid1 = new GridData(GridData.FILL_HORIZONTAL);
+		innergrid1.horizontalSpan = 3;
+		container.setLayoutData(innergrid1);
+		container.setText("Hash and Enclave:");
+
+		
+		addInfoKeyValue(container, "Enclave File:", handler.enclaveFile);
+		addInfoKeyValue(container, "Config File:", handler.configFile);
+		addInfoKeyValue(container, "Hash File:", handler.hashFile);
+	}
+
+	private void addInfoKeyValue(final Group container, String key,
+			String value) {
+		final Label messageLabel2 = new Label(container, SWT.NONE);
+		messageLabel2.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1));
+		messageLabel2.setText(key);
+		
+		final Label messageLabel3 = new Label(container, SWT.NONE);
+		messageLabel3.setText(value);
+		messageLabel3.setLayoutData(new GridData(GridData.BEGINNING));
+	}
+
+	@Override
+	protected void okPressed() {
+		handler.externalSignPublicKeyFile = externalSignPublicKeyFileField.getText();
+		handler.externallySignedHashFile = externalSignedHashFileField.getText(); 
+		handler.outputSignedEnclaveFile = outputSignedEnclaveFileField.getText();
+		super.okPressed();
+	}
+	
+	
+	
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText("Two Step Enclave Sign - Generate Signed Enclave");
+	}
+	
+
+
+
+}

+ 92 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep2Dialog.java

@@ -0,0 +1,92 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+
+package com.intel.sgx.dialogs;
+
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+import com.intel.sgx.handlers.TwoStepSignHandlerBase;
+import com.intel.sgx.handlers.TwoStepSignStep2;
+
+public class TwoStepSignStep2Dialog extends TwoStepSignDialogBase{
+
+	final private TwoStepSignHandlerBase handler;
+
+
+	public TwoStepSignStep2Dialog(Shell parentShell, TwoStepSignHandlerBase handler) {
+		super(parentShell);
+		this.handler = handler;
+	}
+
+	
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		Composite composite = (Composite) super.createDialogArea(parent);
+		final GridLayout gridLayout = new GridLayout(1,false);
+		composite.setLayout(gridLayout);
+		
+		
+		
+		enclaveFileField= addGroup(composite, "Enclave:",
+				"Select the unsigned enclave file",
+				"Unsigned Enclave File:", "Select", enclaveFileSelectionListener);
+		
+		configFileField = addGroup(composite, "Configuration File:",
+				"Select Input Configuration XML File.  ",
+				"Configuration File:", "Select Config",
+				configFileSelectionListener);
+
+		hashFileField= addGroup(composite, "Hash:",
+				"Select the Hash file obtained from previous step",
+				"Hash File:", "Select", hashFileSelectionListener);
+
+		externalSignPublicKeyFileField= addGroup(composite, "Public Key:",
+				"Select the Public Key file obtained from external signing facility",
+				"Public Key:", "Select", publicKeyLocationSelectionListener);
+		
+		externalSignedHashFileField = addGroup(composite, "Signature:",
+				"Select the Signature file obtained from signing facility.", 
+				"Signature:",
+				"Select", externalSignedHashFileSelectionListener);
+
+		outputSignedEnclaveFileField = addGroup(composite, "Signed Enclave:",
+				"Select where to save the output Signed Enclave.", 
+				"Signed Enclave:",
+				"Select", outputSignedEnclaveListener);
+
+		return composite;
+	}
+
+
+	@Override
+	protected void okPressed() {
+		handler.enclaveFile = enclaveFileField.getText();
+		handler.hashFile = hashFileField.getText();
+		handler.configFile = configFileField.getText();
+		handler.externalSignPublicKeyFile = externalSignPublicKeyFileField.getText();
+		handler.externallySignedHashFile = externalSignedHashFileField.getText(); 
+		handler.outputSignedEnclaveFile = outputSignedEnclaveFileField.getText();
+
+		super.okPressed();
+	}
+
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText("Two Step Enclave Sign - Generate Signed Enclave");
+	}
+	
+}

+ 191 - 0
Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/UpdateSignKeyDialog.java

@@ -0,0 +1,191 @@
+///////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2016 Intel Corporation.				 //
+// 									 //
+// All rights reserved. This program and the accompanying materials	 //
+// are made available under the terms of the Eclipse Public License v1.0 //
+// which accompanies this distribution, and is available at		 //
+// http://www.eclipse.org/legal/epl-v10.html				 //
+// 									 //
+// Contributors:							 //
+//     Intel Corporation - initial implementation and documentation	 //
+///////////////////////////////////////////////////////////////////////////
+
+
+package com.intel.sgx.dialogs;
+
+import java.io.File;
+
+import javax.swing.JOptionPane;
+
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+import com.intel.sgx.handlers.UpdateSigningKey;
+
+public class UpdateSignKeyDialog extends SGXDialogBase {
+
+	private Shell shell;
+	public Text sourceKeyFileField;
+	public Text destinationKeyFileField;
+	public static boolean regenerate = false;
+	
+	private final SelectionListener destinationKeyFileSelectionListener = new SelectionListener() {
+		@Override
+		public void widgetSelected(SelectionEvent event) {
+			String result = destinationKeyFileField.getText();
+			FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+			dialog.setFilterPath(getCurrentProjectPath().toOSString());
+			dialog.setFilterExtensions(new String [] {"*.pem", "*"});
+			result = dialog.open();
+			destinationKeyFileField.setText(result);
+		}
+		@Override
+		public void widgetDefaultSelected(SelectionEvent e) {
+		}		
+	};
+	
+	private final SelectionListener sourceKeyFileSelectionListener = new SelectionListener() {
+		@Override
+		public void widgetSelected(SelectionEvent event) {
+			String result = sourceKeyFileField.getText();
+			FileDialog dialog = new FileDialog(shell, SWT.OPEN);
+			dialog.setFilterExtensions(new String [] {"*.pem", "*"});
+			dialog.setFilterPath(getCurrentProjectPath().toOSString());
+			result = dialog.open();
+			sourceKeyFileField.setText(result);
+		}
+		@Override
+		public void widgetDefaultSelected(SelectionEvent e) {
+		}		
+	};
+	final private UpdateSigningKey handler;
+	
+	public UpdateSignKeyDialog(Shell parentShell, UpdateSigningKey handler) {
+		super(parentShell);
+		this.shell = parentShell;
+		this.handler = handler;
+		setShellStyle(SWT.RESIZE | SWT.TITLE);
+	}
+
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		Composite composite = (Composite) super.createDialogArea(parent);
+		final GridLayout gridLayout = new GridLayout(1,false);
+		composite.setLayout(gridLayout);
+		
+		destinationKeyFileField = addGroup(composite, "Enclave Signing Key:",
+				"Select the Signing Key to be Updated or Generated.",
+				"Enclave Signing Key:", "Select", destinationKeyFileSelectionListener);
+
+		sourceKeyFileField = addGroup(composite, "Import:",
+				"To import your own Signing Key use the Import Signing Key option.",
+				"Import Signing Key:", "Import Key", sourceKeyFileSelectionListener);
+
+		addGroup2(composite);
+		
+		return composite;
+	}
+
+	protected void addGroup2(Composite composite) {
+		final Group container2 = new Group(composite, SWT.None);
+		container2.setLayout(new GridLayout(3,false));
+		GridData innergrid2 = new GridData(GridData.FILL_HORIZONTAL);
+		innergrid2.horizontalSpan = 3;
+		container2.setLayoutData(innergrid2);
+		container2.setText("Generate:");
+		
+		final Label messageLabel3 = new Label(container2, SWT.NONE);
+		messageLabel3.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1));
+		messageLabel3.setText("To Generate a new Signing Key use the Generate Signing Key option.");
+		
+		Label warningLabel2 = new Label(container2,SWT.FILL | SWT.WRAP);
+		warningLabel2.setText("Generate a new Signing Key:");
+		warningLabel2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+		
+		Label dummy2 = new Label(container2,0);
+		dummy2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+		final Button updateSigningKey = new Button(container2, SWT.PUSH);
+		updateSigningKey.setText("Generate Key");
+		GridData buttonGridData2 = new GridData(GridData.END);
+		buttonGridData2.horizontalAlignment = SWT.RIGHT;
+		buttonGridData2.horizontalSpan = 1;
+		buttonGridData2.minimumWidth = 120;
+		updateSigningKey.setLayoutData(buttonGridData2);
+		updateSigningKey.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent event) {
+				if( !destinationKeyFileField.getText().isEmpty())
+				{
+					regenerate = true;
+					UpdateSignKeyDialog.this.setReturnCode(InputDialog.OK);
+					okPressed();
+					UpdateSignKeyDialog.this.close();
+				}
+				else
+					JOptionPane.showMessageDialog(null, "Enclave Signing Key field is not provided.", "Error",
+							JOptionPane.ERROR_MESSAGE);
+			}
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}		
+		});
+	}
+
+	
+	@Override
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText("Import or (Re)Generate Enclave Signing Key");
+	}
+
+	@Override
+	protected void okPressed() {
+		
+		handler.sourceKeyFile = sourceKeyFileField.getText();
+		handler.destinationKeyFile = destinationKeyFileField.getText();
+		if((!sourceKeyFileField.getText().isEmpty() &&  !destinationKeyFileField.getText().isEmpty() && 
+				(new File(sourceKeyFileField.getText())).isFile())
+				|| regenerate == true )
+		{
+			System.out.println("regenerate = " + regenerate);
+			super.okPressed();
+		}
+		else
+		{
+			if(sourceKeyFileField.getText().isEmpty() && destinationKeyFileField.getText().isEmpty())
+				JOptionPane.showMessageDialog(null, "Enclave Signing Key and Import Singing Key are not provided.", "Error",
+					JOptionPane.ERROR_MESSAGE);
+			else
+			{
+				if(sourceKeyFileField.getText().isEmpty())
+					JOptionPane.showMessageDialog(null, "Import Singing Key is not provided.", "Error",
+							JOptionPane.ERROR_MESSAGE);
+				else
+				if(!(new File(sourceKeyFileField.getText())).isFile())
+					JOptionPane.showMessageDialog(null, "Invalid Import Singing Key.", "Error",
+							JOptionPane.ERROR_MESSAGE);
+				
+				if(destinationKeyFileField.getText().isEmpty())
+					JOptionPane.showMessageDialog(null, "Enclave Signing Key is not provided.", "Error",
+							JOptionPane.ERROR_MESSAGE);
+			}
+		}
+			
+	}
+
+	
+	
+}

Some files were not shown because too many files changed in this diff