Files
intel-linux-sgx/SampleCode/SampleCommonLoader/Include/sgx_enclave_ss.h
T
Li, Xun 68f44d6e68 Linux 2.3 Open Source Gold Release
Support for Ubuntu 18.04 LTS 64-bit Desktop and Server version
Provided a new set of SGX common loader APIs in sgx_enclave_common.h
Provided the sample code for Switchless Call
Provided a new API in tcrypto: sgx_ecc256_calculate_pub_from_priv
sgx_create_enclave API will ignore the parameter of launch token and will not update it after function successfully returns
Change Intel SGX PSW installer for Ubuntu by
    - Using .deb installer.
    - Using name libsgx-enclave-common_{version string}-1_amd64.deb.
    - Installing Intel SGX Enclave Common loader library.
Bug fixes

Signed-off-by: Li, Xun <xun.li@intel.com>
2018-09-13 09:47:41 +08:00

150 lines
11 KiB
C

/*
* Copyright (C) 2011-2018 Intel Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
const int sgx_enclave_ss_length = 1808;
const unsigned char sgx_enclave_ss[1808] = {
0x06,0x00,0x00,0x00,0xe1,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x60,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x11,0x7e,0x78,0xc9,0x6e,0xa6,0xa9,0x32,0xc8,0x79,0x2d,0x97,0x7b,0xd0,0x91,0xff,
0xf7,0x2a,0x74,0xfc,0x82,0xb9,0x76,0x8d,0x0e,0xbf,0x2e,0x21,0x27,0x91,0x40,0xc3,
0x0f,0x2c,0xc4,0xe4,0xc3,0x70,0x78,0x9d,0xc5,0x31,0x07,0x04,0x35,0x69,0xcd,0x57,
0xe3,0x5d,0xe1,0x41,0x21,0x01,0x8a,0x1c,0x94,0x5d,0x6c,0x22,0x6a,0xc8,0x3e,0xc3,
0x92,0x08,0x75,0xec,0x9d,0x9c,0x38,0x5f,0x88,0x54,0x43,0x83,0xbd,0x66,0xde,0x2f,
0x97,0x3e,0xb6,0x68,0x6d,0x26,0x48,0x08,0x4b,0xbb,0x27,0x4a,0x05,0x7b,0x06,0x47,
0x2e,0x15,0xe9,0xa8,0x34,0xb0,0xd1,0x40,0xd7,0x86,0x36,0xd8,0x23,0xbd,0x4c,0xca,
0x90,0x08,0xb4,0x09,0xe2,0xdc,0x4f,0x37,0x9b,0x9c,0xe5,0xba,0x39,0xe3,0x21,0x5d,
0x1a,0xe4,0xe0,0x46,0x3c,0x1b,0x25,0xbd,0x86,0xdd,0x0f,0x93,0x91,0x1f,0x0c,0xd5,
0xf0,0x3d,0xa4,0x6f,0xd2,0xf0,0xe0,0xae,0x6f,0x8f,0x47,0x2c,0xb4,0x98,0xe8,0x2d,
0x8d,0xb0,0x21,0x45,0x18,0x22,0xf5,0x2a,0x0a,0x20,0x23,0x90,0xbc,0x11,0x31,0x1c,
0x33,0x6e,0xe8,0x0f,0x08,0xd2,0x7e,0xea,0xec,0x3b,0x13,0xd4,0x18,0xf3,0x26,0x0e,
0x46,0x2d,0x94,0x30,0xd9,0x92,0x8e,0x0d,0x8d,0x94,0xa8,0xd5,0x5e,0x90,0x85,0x73,
0xec,0x55,0xd3,0xec,0xfa,0x07,0x07,0x53,0xc0,0xb9,0xb7,0xfe,0xc0,0xd8,0x95,0x43,
0x3d,0x0b,0x59,0x78,0x27,0x23,0x99,0x2c,0x4b,0x3e,0x20,0xa5,0x7a,0xd9,0x9a,0x6f,
0x24,0x10,0xee,0xe8,0x6a,0xdb,0xb1,0x76,0x22,0xf0,0x42,0x33,0x15,0xc2,0xaf,0x03,
0xad,0x6a,0xfc,0x26,0xe1,0x6c,0xb3,0xe1,0xff,0x49,0xc2,0x32,0x84,0x67,0x05,0xa8,
0x18,0x6b,0x75,0x6c,0x38,0x1e,0xca,0x21,0x12,0x79,0xc6,0x44,0x81,0x2b,0xbe,0x57,
0x06,0xe8,0xb9,0x0e,0x9b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,0x5c,0x68,0x0b,0x70,
0x95,0xcb,0xc8,0x00,0x7f,0xeb,0x18,0x37,0xee,0xeb,0xfe,0xe3,0x17,0xf5,0x51,0x63,
0x70,0xbb,0x86,0x47,0x53,0x82,0x8b,0x7a,0xe7,0xc8,0xea,0xc5,0xab,0xf2,0xf4,0xc9,
0xcc,0x01,0x96,0xb2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x51,0x61,0x20,0xfe,0x45,0xfd,0x5d,0xf6,0x86,0xc4,0x3a,0x2f,0x73,0xbd,0x88,0x30,
0x20,0xe7,0x7b,0xe6,0x18,0xf0,0x7f,0x5b,0xf8,0x4e,0x3d,0xe2,0xd6,0x7c,0xc3,0xe3,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x36,0x00,0x48,0xd0,0x72,0xce,0x36,0xc5,0xd6,0xdf,0x15,0x17,0x77,0x3c,0x2d,0x7b,
0xba,0x08,0x4f,0x4b,0xf8,0x43,0x19,0x7c,0x33,0x3e,0x99,0xbf,0x03,0xa1,0x75,0xaf,
0xec,0x39,0x5f,0xee,0xab,0x75,0x3f,0x89,0x6e,0x2e,0x37,0x20,0x15,0x06,0x0b,0x5a,
0x23,0x88,0x7e,0x42,0x82,0xf1,0xc9,0x00,0xa1,0x0f,0x75,0xb1,0x86,0x25,0x23,0x21,
0x67,0xef,0x92,0x09,0xae,0x2d,0xbc,0xfc,0x78,0x1f,0x0f,0x7b,0xf5,0x09,0x97,0x7c,
0xa0,0xa6,0xa8,0x27,0x04,0x92,0x6c,0xbd,0x1b,0x97,0x56,0x27,0xa6,0xfb,0xd0,0x13,
0xb1,0x43,0x7b,0x07,0xe2,0xa9,0x45,0xf9,0x02,0x19,0x7e,0x1a,0x8c,0xca,0xe3,0xaf,
0x7c,0x31,0x10,0x7f,0xac,0xd5,0x0c,0x29,0x2f,0xb6,0x2b,0xec,0x66,0x3a,0x45,0xb7,
0x00,0x71,0xe6,0x16,0xf4,0x6f,0x7b,0xa0,0xbd,0xc6,0x38,0x3f,0xbc,0xf8,0xbf,0xcf,
0x78,0x99,0x51,0x5c,0xf7,0x69,0x4d,0xa7,0x67,0x22,0xda,0xcc,0x5b,0xcd,0x06,0xa9,
0xfc,0x84,0xac,0x26,0xa6,0x5d,0x02,0x82,0x22,0xdd,0x1b,0xf6,0x8c,0xfe,0x7c,0xe5,
0x18,0x12,0xee,0x1c,0x36,0xed,0x8c,0x58,0x69,0x04,0x3a,0x9c,0x72,0x71,0xa9,0x5f,
0xcb,0xc7,0x98,0x79,0xaf,0x64,0x46,0x73,0xb7,0xd7,0xe9,0x7b,0x26,0xec,0x1a,0xa1,
0x58,0x05,0xc9,0x41,0x56,0x4e,0x36,0x6a,0xd7,0x1b,0x3b,0x98,0x99,0x03,0x96,0xfd,
0x46,0x91,0xb4,0x28,0x69,0x58,0x81,0x53,0xf1,0xdc,0x3a,0x8e,0xc5,0xdd,0xab,0x3f,
0x60,0xab,0x28,0x87,0xe6,0xd6,0x46,0x07,0xe1,0xff,0x5d,0x40,0x91,0xaa,0x4d,0x88,
0x73,0x36,0xa2,0x5c,0x13,0xe9,0x14,0x99,0x2b,0x46,0xa3,0x27,0x3b,0xea,0x08,0xd7,
0xb1,0x9b,0xe5,0x4e,0x85,0x13,0x40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35,0x14,0x43,0xee,0x13,0xf5,0x26,0xef,0x9e,0xe3,0xda,0x0b,0x55,
0x9b,0x86,0xb1,0x95,0xe2,0xb1,0x5b,0x49,0xc1,0x2e,0xc8,0x2b,0x85,0x46,0x77,0x4f,
0xb0,0x01,0x34,0x46,0xa1,0xb4,0x8a,0xbc,0x6d,0x2d,0xe1,0xe7,0x97,0xdf,0xd0,0x48,
0x17,0xbb,0x82,0x95,0x76,0xec,0xde,0xde,0x57,0xa2,0x33,0x75,0x8e,0xde,0x9f,0xe2,
0x86,0xad,0x5d,0x04,0xf5,0xd5,0xe7,0xd8,0x5a,0x0a,0x95,0xc1,0x39,0x15,0x57,0xf4,
0xf9,0x16,0x9c,0x83,0xf6,0x0f,0xe2,0x3e,0x31,0xc5,0xcd,0xe7,0xb1,0xd3,0x7f,0x17,
0x87,0x0b,0x7b,0x4b,0xee,0x7d,0x80,0x86,0x2c,0xf2,0xca,0xb7,0x1c,0xaa,0x73,0x52,
0x94,0xaa,0x1e,0x33,0x47,0x6e,0x36,0xf4,0x4c,0xd0,0x8a,0xa4,0xef,0x3d,0x56,0x41,
0x44,0x36,0x23,0xab,0x91,0xb3,0x61,0xe6,0x9b,0x31,0x02,0x2c,0x72,0x7a,0x80,0x02,
0x07,0x1e,0x4d,0xb1,0xb1,0xf4,0x14,0x9e,0x36,0xb8,0xea,0xf5,0xfd,0xf1,0x6a,0x54,
0x48,0xec,0x59,0xfd,0x92,0x35,0xc6,0x2e,0x18,0x44,0x6d,0x25,0x82,0x09,0xc6,0x66,
0x11,0xb5,0xe9,0xfa,0x2f,0x37,0xf9,0xbf,0x5e,0x28,0xb9,0x77,0xe9,0x96,0xf6,0xe5,
0xf2,0x62,0x5f,0x4d,0xb3,0xea,0xe3,0x6c,0x9e,0xd4,0x66,0x8d,0x54,0x9b,0xd4,0x1f,
0x69,0x99,0x43,0x23,0xea,0x6c,0x83,0xea,0xb0,0x71,0x8c,0x07,0x9c,0x82,0x0d,0xb7,
0xd6,0x31,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