|
@@ -8,7 +8,7 @@
|
|
|
#include <sys/stat.h>
|
|
|
#include <stdio.h>
|
|
|
#include <signal.h>
|
|
|
-
|
|
|
+#include <Python.h>
|
|
|
#include "crypto.h"
|
|
|
#include "ProtobufLAInitiator.h"
|
|
|
#include "SealerWrapper.h"
|
|
@@ -32,7 +32,7 @@ void foo()
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
JavaVM *vm;
|
|
@@ -98,6 +98,20 @@ int main(int argc, char** argv)
|
|
|
(env)->ExceptionClear();
|
|
|
printf("Exception occurred\n"); fflush(stdout);
|
|
|
}
|
|
|
+*/
|
|
|
+
|
|
|
+ printf("HELLOWORLD\n");fflush(stdout);
|
|
|
+
|
|
|
+ printf("HELLOWORLD 2\n"); fflush(stdout);
|
|
|
+ Py_Initialize();
|
|
|
+ printf("HELLOWORLD 3\n");fflush(stdout);
|
|
|
+
|
|
|
+ PyRun_SimpleString("from time import time,ctime\n"
|
|
|
+ "print 'Today is',ctime(time())\n");
|
|
|
+ Py_Finalize();
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -125,7 +139,7 @@ int main(int argc, char** argv)
|
|
|
printf("Could not generate RSA keypair - error 0x%x\n", return_internal); fflush(stdout); return return_internal;
|
|
|
}
|
|
|
printf("Generated key pair - outside the fun\n"); fflush(stdout);
|
|
|
- int sealed_file_fd = open("sealed_msg.txt", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
|
|
|
+
|
|
|
if(sealed_file_fd == -1)
|
|
|
{
|
|
|
perror("\nError in opening or creating the file sealed_msg.txt - ");
|
|
@@ -150,6 +164,8 @@ int main(int argc, char** argv)
|
|
|
printf("\nSuccessfully sealed the plaintext %s to length 0x%x.\n", apache_signature_keypair_private.c_str(), expected_sealed_msg_size);
|
|
|
fflush(stdout);
|
|
|
|
|
|
+
|
|
|
+
|
|
|
return_sgx = local_attestation_initiator(DECRYPTOR_PORT);
|
|
|
if(return_sgx != 0)
|
|
|
{
|
|
@@ -196,6 +212,7 @@ int main(int argc, char** argv)
|
|
|
}
|
|
|
printf("Successfully verified the Apache enclave and signed its manifest.\n");
|
|
|
fflush(stdout);
|
|
|
+*/
|
|
|
return 0;
|
|
|
|
|
|
|