edgelesssys / edgelessdb

EdgelessDB is a MySQL-compatible database for confidential computing. It runs entirely inside a secure enclave and comes with advanced features for collaboration, recovery, and access control.
https://edgeless.systems/products/edgelessdb
GNU General Public License v2.0
170 stars 17 forks source link

Remote Attestation: EdgelessdB quote is different from SGX quote #81

Closed water5-cmd closed 2 years ago

water5-cmd commented 2 years ago

Hi @thomasten , The PCCS service works well in my machine, About PCCS, I had tested it by running SGXDataCenterAttestationPrimitives/SampleCode.

Now, I started the edgelessdb to get the quote, code is GetRemoteReport, I pass the value of variable reportdata from TEE to REE and send it to QuoteVerificationSamplefor authentication. The edgelessdb quote length is 4744 bytes, content is (Hexadecimal printing):

01 00 00 00 02 00 00 00  78 12 00 00 00 00 00 00   | ........x.......
03 00 02 00 00 00 00 00  07 00 0C 00 93 9A 72 33   | ..............r3
F7 9C 4C A9 94 0A 0D B3  95 7F 06 07 44 AF 07 B6   | ..L........D...
6D 3A 3A 35 4D B0 B2 AE  5C 1E F0 AC 00 00 00 00   | m::5M...\.......
05 05 0E 0C FF FF 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
07 00 00 00 00 00 00 00  07 00 00 00 00 00 00 00   | ................
45 3C 67 04 FA 55 78 97  06 38 E3 35 EE 95 07 EA   | E<g..Ux..8.5....
BA F3 D3 BF 19 AE F4 CE  5B FB D4 7F 95 24 0F 55   | ........[...$.U
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
70 27 F0 09 80 0C 2A 39  30 C8 8E 4F D9 03 A9 73   | p'....*90..O...s
77 9F 59 75 33 06 42 05  15 B2 68 54 E9 80 5E 81   | w.Yu3.B...hT..^.
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
10 00 02 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
EC 5D 53 AB 7D FB 50 C3  1E CA 1F EF C7 71 12 77   | .]S.}.P......q.w
99 00 ED 9B 57 6C 1A 3C  63 D4 C5 46 AB B1 BA 36   | ....Wl.<c..F...6
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
C4 10 00 00 34 88 24 E7  2B CA 6F 91 B7 84 F5 3C   | ....4.$.+.o....<
37 04 2B F0 98 24 D7 A3  D6 40 E7 0E 0F 88 7F B5   | 7.+..$...@.....
79 FE AF 1B 48 A6 A2 9C  4C DC 41 4C 53 0C 64 18   | y...H...L.ALS.d.
C5 BD 17 2C F4 E6 D6 8E  24 A3 EC A1 2C D4 1B F5   | ...,....$...,...
AB EF 9B CB 44 B8 C6 7C  8A 22 62 8E 8F 91 6F E2   | ....D..|."b...o.
BC 25 37 81 BF B5 7A 02  D0 0B 33 18 0A E2 1C A8   | .%7...z...3.....
35 A0 FA DD 1F 28 29 17  8A 0F 84 55 3F 3D D8 0F   | 5....()....U?=..
1C D4 B2 AB 61 B2 BB 3B  73 4C A6 1A E8 32 DB BF   | ....a..;sL...2..
C7 2B 22 A5 05 05 0E 0C  FF FF 00 00 00 00 00 00   | .+".............
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 15 00 00 00  00 00 00 00 E7 00 00 00   | ................
00 00 00 00 AE 12 3C BF  A9 6C 26 85 60 DF D5 DF   | ......<..l&.`...
FE 48 54 CE 44 3D E4 E0  FA 51 D2 81 18 4C 94 28   | .HT.D=...Q...L.(
D7 A3 40 FB 00 00 00 00  00 00 00 00 00 00 00 00   | ..@.............
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 8C 4F 57 75  D7 96 50 3E 96 13 7F 77   | .....OWu..P>..w
C6 8A 82 9A 00 56 AC 8D  ED 70 14 0B 08 1B 09 44   | .....V...p.....D
90 C5 7B FF 00 00 00 00  00 00 00 00 00 00 00 00   | ..{.............
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 01 00 07 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 BC 34 2D 93  F7 99 6D 99 A5 44 36 75   | .....4-...m..D6u
1D 5E 63 20 35 FF 87 03  1B 4C 06 C5 DD F4 70 EB   | .^c 5....L....p.
D9 BB 6D 22 00 00 00 00  00 00 00 00 00 00 00 00   | ..m"............
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   | ................
00 00 00 00 BF 8C D0 36  FF 6F AE B7 78 B6 9C 4A   | .......6.o..x..J
26 32 E1 82 38 EB A6 4D  5A 11 49 A4 88 3E 3B 1B   | &2..8..MZ.I..>;.
55 77 01 72 13 A8 E4 D7  55 63 9F 30 E5 BE A7 B2   | Uw.r....Uc.0....
54 06 0C 49 05 FE 92 72  53 72 34 9B 14 D6 EA 60   | T..I...rSr4....`
35 23 E8 3A 20 00 00 01  02 03 04 05 06 07 08 09   | 5#.: ...........
0A 0B 0C 0D 0E 0F 10 11  12 13 14 15 16 17 18 19   | ................
1A 1B 1C 1D 1E 1F 05 00  5C 0E 00 00 2D 2D 2D 2D   | ........\...----
2D 42 45 47 49 4E 20 43  45 52 54 49 46 49 43 41   | -BEGIN CERTIFICA
54 45 2D 2D 2D 2D 2D 0A  4D 49 49 45 38 6A 43 43   | TE-----.MIIE8jCC
42 4A 6D 67 41 77 49 42  41 67 49 56 41 4A 43 4F   | BJmgAwIBAgIVAJCO
4A 4A 55 44 4F 39 67 42  57 70 65 30 49 59 37 6D   | JJUDO9gBWpe0IY7m
4A 34 37 62 49 57 55 39  4D 41 6F 47 43 43 71 47   | J47bIWU9MAoGCCqG
53 4D 34 39 42 41 4D 43  4D 48 41 78 49 6A 41 67   | SM49BAMCMHAxIjAg
42 67 4E 56 0A 42 41 4D  4D 47 55 6C 75 64 47 56   | BgNV.BAMMGUludGV
73 49 46 4E 48 57 43 42  51 51 30 73 67 55 47 78   | sIFNHWCBQQ0sgUGx
68 64 47 5A 76 63 6D 30  67 51 30 45 78 47 6A 41   | hdGZvcm0gQ0ExGjA
59 42 67 4E 56 42 41 6F  4D 45 55 6C 75 64 47 56   | YBgNVBAoMEUludGV
73 49 45 4E 76 63 6E 42  76 63 6D 46 30 61 57 39   | sIENvcnBvcmF0aW9
75 0A 4D 52 51 77 45 67  59 44 56 51 51 48 44 41   | u.MRQwEgYDVQQHDA
74 54 59 57 35 30 59 53  42 44 62 47 46 79 59 54   | tTYW50YSBDbGFyYT
45 4C 4D 41 6B 47 41 31  55 45 43 41 77 43 51 30   | ELMAkGA1UECAwCQ0
45 78 43 7A 41 4A 42 67  4E 56 42 41 59 54 41 6C   | ExCzAJBgNVBAYTAl
56 54 4D 42 34 58 44 54  49 78 4D 54 45 79 0A 4E   | VTMB4XDTIxMTEy.N
44 45 78 4D 7A 6B 31 4D  46 6F 58 44 54 49 34 4D   | DExMzk1MFoXDTI4M
54 45 79 4E 44 45 78 4D  7A 6B 31 4D 46 6F 77 63   | TEyNDExMzk1MFowc
44 45 69 4D 43 41 47 41  31 55 45 41 77 77 5A 53   | DEiMCAGA1UEAwwZS
57 35 30 5A 57 77 67 55  30 64 59 49 46 42 44 53   | W50ZWwgU0dYIFBDS
79 42 44 5A 58 4A 30 61  57 5A 70 0A 59 32 46 30   | yBDZXJ0aWZp.Y2F0
5A 54 45 61 4D 42 67 47  41 31 55 45 43 67 77 52   | ZTEaMBgGA1UECgwR
53 57 35 30 5A 57 77 67  51 32 39 79 63 47 39 79   | SW50ZWwgQ29ycG9y
59 58 52 70 62 32 34 78  46 44 41 53 42 67 4E 56   | YXRpb24xFDASBgNV
42 41 63 4D 43 31 4E 68  62 6E 52 68 49 45 4E 73   | BAcMC1NhbnRhIENs
59 58 4A 68 4D 51 73 77  0A 43 51 59 44 56 51 51   | YXJhMQsw.CQYDVQQ
49 44 41 4A 44 51 54 45  4C 4D 41 6B 47 41 31 55   | IDAJDQTELMAkGA1U
45 42 68 4D 43 56 56 4D  77 57 54 41 54 42 67 63   | EBhMCVVMwWTATBgc
71 68 6B 6A 4F 50 51 49  42 42 67 67 71 68 6B 6A   | qhkjOPQIBBggqhkj
4F 50 51 4D 42 42 77 4E  43 41 41 53 6B 41 6C 36   | OPQMBBwNCAASkAl6
4E 6B 68 35 36 0A 32 74  35 7A 61 66 64 46 45 56   | Nkh56.2t5zafdFEV
46 69 4A 5A 55 37 52 57  38 36 50 50 6E 73 4B 2B   | FiJZU7RW86PPnsK+
31 2B 45 78 49 43 4B 62  61 4A 73 4C 4D 76 70 7A   | 1+ExICKbaJsLMvpz
73 6B 72 30 7A 4F 42 74  4D 4E 67 6D 6F 31 41 64   | skr0zOBtMNgmo1Ad
68 50 63 35 7A 54 61 48  38 65 56 2B 4A 35 42 79   | hPc5zTaH8eV+J5By
66 69 0A 6F 34 49 44 44  6A 43 43 41 77 6F 77 48   | fi.o4IDDjCCAwowH
77 59 44 56 52 30 6A 42  42 67 77 46 6F 41 55 6C   | wYDVR0jBBgwFoAUl
57 39 64 7A 62 30 62 34  65 6C 41 53 63 6E 55 39   | W9dzb0b4elAScnU9
44 50 4F 41 56 63 4C 33  6C 51 77 61 77 59 44 56   | DPOAVcL3lQwawYDV
52 30 66 42 47 51 77 59  6A 42 67 6F 46 36 67 0A   | R0fBGQwYjBgoF6g.
58 49 5A 61 61 48 52 30  63 48 4D 36 4C 79 39 68   | XIZaaHR0cHM6Ly9h
63 47 6B 75 64 48 4A 31  63 33 52 6C 5A 48 4E 6C   | cGkudHJ1c3RlZHNl
63 6E 5A 70 59 32 56 7A  4C 6D 6C 75 64 47 56 73   | cnZpY2VzLmludGVs
4C 6D 4E 76 62 53 39 7A  5A 33 67 76 59 32 56 79   | LmNvbS9zZ3gvY2Vy
64 47 6C 6D 61 57 4E 68  64 47 6C 76 0A 62 69 39   | dGlmaWNhdGlv.bi9
32 4D 79 39 77 59 32 74  6A 63 6D 77 2F 59 32 45   | 2My9wY2tjcmw/Y2E
39 63 47 78 68 64 47 5A  76 63 6D 30 6D 5A 57 35   | 9cGxhdGZvcm0mZW5
6A 62 32 52 70 62 6D 63  39 5A 47 56 79 4D 42 30   | jb2Rpbmc9ZGVyMB0
47 41 31 55 64 44 67 51  57 42 42 54 55 73 6A 53   | GA1UdDgQWBBTUsjS
4A 73 56 6B 4D 38 4B 63  52 0A 47 36 6A 4B 56 68   | JsVkM8KcR.G6jKVh
33 32 4B 2B 51 58 61 44  41 4F 42 67 4E 56 48 51   | 32K+QXaDAOBgNVHQ
38 42 41 66 38 45 42 41  4D 43 42 73 41 77 44 41   | 8BAf8EBAMCBsAwDA
59 44 56 52 30 54 41 51  48 2F 42 41 49 77 41 44   | YDVR0TAQH/BAIwAD
43 43 41 6A 73 47 43 53  71 47 53 49 62 34 54 51   | CCAjsGCSqGSIb4TQ
45 4E 41 51 53 43 0A 41  69 77 77 67 67 49 6F 4D   | ENAQSC.AiwwggIoM
42 34 47 43 69 71 47 53  49 62 34 54 51 45 4E 41   | B4GCiqGSIb4TQENA
51 45 45 45 42 4B 31 77  4C 52 77 62 69 43 67 58   | QEEEBK1wLRwbiCgX
77 48 61 38 36 4E 70 41  4B 51 77 67 67 46 6C 42   | wHa86NpAKQwggFlB
67 6F 71 68 6B 69 47 2B  45 30 42 44 51 45 43 4D   | goqhkiG+E0BDQECM
49 49 42 0A 56 54 41 51  42 67 73 71 68 6B 69 47   | IIB.VTAQBgsqhkiG
2B 45 30 42 44 51 45 43  41 51 49 42 42 44 41 51   | +E0BDQECAQIBBDAQ
42 67 73 71 68 6B 69 47  2B 45 30 42 44 51 45 43   | BgsqhkiG+E0BDQEC
41 67 49 42 42 44 41 51  42 67 73 71 68 6B 69 47   | AgIBBDAQBgsqhkiG
2B 45 30 42 44 51 45 43  41 77 49 42 41 7A 41 51   | +E0BDQECAwIBAzAQ
0A 42 67 73 71 68 6B 69  47 2B 45 30 42 44 51 45   | .BgsqhkiG+E0BDQE
43 42 41 49 42 41 7A 41  52 42 67 73 71 68 6B 69   | CBAIBAzARBgsqhki
47 2B 45 30 42 44 51 45  43 42 51 49 43 41 50 38   | G+E0BDQECBQICAP8
77 45 51 59 4C 4B 6F 5A  49 68 76 68 4E 41 51 30   | wEQYLKoZIhvhNAQ0
42 41 67 59 43 41 67 44  2F 4D 42 41 47 0A 43 79   | BAgYCAgD/MBAG.Cy
71 47 53 49 62 34 54 51  45 4E 41 51 49 48 41 67   | qGSIb4TQENAQIHAg
45 41 4D 42 41 47 43 79  71 47 53 49 62 34 54 51   | EAMBAGCyqGSIb4TQ
45 4E 41 51 49 49 41 67  45 41 4D 42 41 47 43 79   | ENAQIIAgEAMBAGCy
71 47 53 49 62 34 54 51  45 4E 41 51 49 4A 41 67   | qGSIb4TQENAQIJAg
45 41 4D 42 41 47 43 79  71 47 0A 53 49 62 34 54   | EAMBAGCyqG.SIb4T
51 45 4E 41 51 49 4B 41  67 45 41 4D 42 41 47 43   | QENAQIKAgEAMBAGC
79 71 47 53 49 62 34 54  51 45 4E 41 51 49 4C 41   | yqGSIb4TQENAQILA
67 45 41 4D 42 41 47 43  79 71 47 53 49 62 34 54   | gEAMBAGCyqGSIb4T
51 45 4E 41 51 49 4D 41  67 45 41 4D 42 41 47 43   | QENAQIMAgEAMBAGC
79 71 47 53 49 62 34 0A  54 51 45 4E 41 51 49 4E   | yqGSIb4.TQENAQIN
41 67 45 41 4D 42 41 47  43 79 71 47 53 49 62 34   | AgEAMBAGCyqGSIb4
54 51 45 4E 41 51 49 4F  41 67 45 41 4D 42 41 47   | TQENAQIOAgEAMBAG
43 79 71 47 53 49 62 34  54 51 45 4E 41 51 49 50   | CyqGSIb4TQENAQIP
41 67 45 41 4D 42 41 47  43 79 71 47 53 49 62 34   | AgEAMBAGCyqGSIb4
54 51 45 4E 0A 41 51 49  51 41 67 45 41 4D 42 41   | TQEN.AQIQAgEAMBA
47 43 79 71 47 53 49 62  34 54 51 45 4E 41 51 49   | GCyqGSIb4TQENAQI
52 41 67 45 4C 4D 42 38  47 43 79 71 47 53 49 62   | RAgELMB8GCyqGSIb
34 54 51 45 4E 41 51 49  53 42 42 41 45 42 41 4D   | 4TQENAQISBBAEBAM
44 2F 2F 38 41 41 41 41  41 41 41 41 41 41 41 41   | D//8AAAAAAAAAAAA
41 0A 4D 42 41 47 43 69  71 47 53 49 62 34 54 51   | A.MBAGCiqGSIb4TQ
45 4E 41 51 4D 45 41 67  41 41 4D 42 51 47 43 69   | ENAQMEAgAAMBQGCi
71 47 53 49 62 34 54 51  45 4E 41 51 51 45 42 67   | qGSIb4TQENAQQEBg
42 67 61 67 41 41 41 44  41 50 42 67 6F 71 68 6B   | BgagAAADAPBgoqhk
69 47 2B 45 30 42 44 51  45 46 43 67 45 42 0A 4D   | iG+E0BDQEFCgEB.M
42 34 47 43 69 71 47 53  49 62 34 54 51 45 4E 41   | B4GCiqGSIb4TQENA
51 59 45 45 48 55 75 57  33 31 4F 4F 67 44 6E 34   | QYEEHUuW31OOgDn4
45 72 53 4C 41 48 4F 7A  36 55 77 52 41 59 4B 4B   | ErSLAHOz6UwRAYKK
6F 5A 49 68 76 68 4E 41  51 30 42 42 7A 41 32 4D   | oZIhvhNAQ0BBzA2M
42 41 47 43 79 71 47 53  49 62 34 0A 54 51 45 4E   | BAGCyqGSIb4.TQEN
41 51 63 42 41 51 48 2F  4D 42 41 47 43 79 71 47   | AQcBAQH/MBAGCyqG
53 49 62 34 54 51 45 4E  41 51 63 43 41 51 48 2F   | SIb4TQENAQcCAQH/
4D 42 41 47 43 79 71 47  53 49 62 34 54 51 45 4E   | MBAGCyqGSIb4TQEN
41 51 63 44 41 51 48 2F  4D 41 6F 47 43 43 71 47   | AQcDAQH/MAoGCCqG
53 4D 34 39 42 41 4D 43  0A 41 30 63 41 4D 45 51   | SM49BAMC.A0cAMEQ
43 49 48 76 4D 58 74 65  4B 66 74 78 56 69 70 67   | CIHvMXteKftxVipg
73 57 77 41 67 38 69 53  68 59 42 49 53 57 6D 56   | sWwAg8iShYBISWmV
2F 61 6E 6D 57 66 50 53  71 72 48 64 46 41 69 42   | /anmWfPSqrHdFAiB
37 78 65 47 38 74 72 6C  46 66 53 4E 6A 4D 49 46   | 7xeG8trlFfSNjMIF
2F 43 61 45 5A 0A 70 4A  48 4F 31 78 7A 68 37 54   | /CaEZ.pJHO1xzh7T
6B 38 54 63 48 79 43 64  6A 75 4F 67 3D 3D 0A 2D   | k8TcHyCdjuOg==.-
2D 2D 2D 2D 45 4E 44 20  43 45 52 54 49 46 49 43   | ----END CERTIFIC
41 54 45 2D 2D 2D 2D 2D  2D 2D 2D 2D 2D 42 45 47   | ATE----------BEG
49 4E 20 43 45 52 54 49  46 49 43 41 54 45 2D 2D   | IN CERTIFICATE--
2D 2D 2D 0A 4D 49 49 43  6C 6A 43 43 41 6A 32 67   | ---.MIICljCCAj2g
41 77 49 42 41 67 49 56  41 4A 56 76 58 63 32 39   | AwIBAgIVAJVvXc29
47 2B 48 70 51 45 6E 4A  31 50 51 7A 7A 67 46 58   | G+HpQEnJ1PQzzgFX
43 39 35 55 4D 41 6F 47  43 43 71 47 53 4D 34 39   | C95UMAoGCCqGSM49
42 41 4D 43 0A 4D 47 67  78 47 6A 41 59 42 67 4E   | BAMC.MGgxGjAYBgN
56 42 41 4D 4D 45 55 6C  75 64 47 56 73 49 46 4E   | VBAMMEUludGVsIFN
48 57 43 42 53 62 32 39  30 49 45 4E 42 4D 52 6F   | HWCBSb290IENBMRo
77 47 41 59 44 56 51 51  4B 44 42 46 4A 62 6E 52   | wGAYDVQQKDBFJbnR
6C 62 43 42 44 0A 62 33  4A 77 62 33 4A 68 64 47   | lbCBD.b3Jwb3JhdG
6C 76 62 6A 45 55 4D 42  49 47 41 31 55 45 42 77   | lvbjEUMBIGA1UEBw
77 4C 55 32 46 75 64 47  45 67 51 32 78 68 63 6D   | wLU2FudGEgQ2xhcm
45 78 43 7A 41 4A 42 67  4E 56 42 41 67 4D 41 6B   | ExCzAJBgNVBAgMAk
4E 42 4D 51 73 77 0A 43  51 59 44 56 51 51 47 45   | NBMQsw.CQYDVQQGE
77 4A 56 55 7A 41 65 46  77 30 78 4F 44 41 31 4D   | wJVUzAeFw0xODA1M
6A 45 78 4D 44 55 77 4D  54 42 61 46 77 30 7A 4D   | jExMDUwMTBaFw0zM
7A 41 31 4D 6A 45 78 4D  44 55 77 4D 54 42 61 4D   | zA1MjExMDUwMTBaM
48 41 78 49 6A 41 67 0A  42 67 4E 56 42 41 4D 4D   | HAxIjAg.BgNVBAMM
47 55 6C 75 64 47 56 73  49 46 4E 48 57 43 42 51   | GUludGVsIFNHWCBQ
51 30 73 67 55 47 78 68  64 47 5A 76 63 6D 30 67   | Q0sgUGxhdGZvcm0g
51 30 45 78 47 6A 41 59  42 67 4E 56 42 41 6F 4D   | Q0ExGjAYBgNVBAoM
45 55 6C 75 64 47 56 73  0A 49 45 4E 76 63 6E 42   | EUludGVs.IENvcnB
76 63 6D 46 30 61 57 39  75 4D 52 51 77 45 67 59   | vcmF0aW9uMRQwEgY
44 56 51 51 48 44 41 74  54 59 57 35 30 59 53 42   | DVQQHDAtTYW50YSB
44 62 47 46 79 59 54 45  4C 4D 41 6B 47 41 31 55   | DbGFyYTELMAkGA1U
45 43 41 77 43 51 30 45  78 0A 43 7A 41 4A 42 67   | ECAwCQ0Ex.CzAJBg
4E 56 42 41 59 54 41 6C  56 54 4D 46 6B 77 45 77   | NVBAYTAlVTMFkwEw
59 48 4B 6F 5A 49 7A 6A  30 43 41 51 59 49 4B 6F   | YHKoZIzj0CAQYIKo
5A 49 7A 6A 30 44 41 51  63 44 51 67 41 45 4E 53   | ZIzj0DAQcDQgAENS
42 2F 37 74 32 31 6C 58  53 4F 0A 32 43 75 7A 70   | B/7t21lXSO.2Cuzp
78 77 37 34 65 4A 42 37  32 45 79 44 47 67 57 35   | xw74eJB72EyDGgW5
72 58 43 74 78 32 74 56  54 4C 71 36 68 4B 6B 36   | rXCtx2tVTLq6hKk6
7A 2B 55 69 52 5A 43 6E  71 52 37 70 73 4F 76 67   | z+UiRZCnqR7psOvg
71 46 65 53 78 6C 6D 54  6C 4A 6C 0A 65 54 6D 69   | qFeSxlmTlJl.eTmi
32 57 59 7A 33 71 4F 42  75 7A 43 42 75 44 41 66   | 2WYz3qOBuzCBuDAf
42 67 4E 56 48 53 4D 45  47 44 41 57 67 42 51 69   | BgNVHSMEGDAWgBQi
5A 51 7A 57 57 70 30 30  69 66 4F 44 74 4A 56 53   | ZQzWWp00ifODtJVS
76 31 41 62 4F 53 63 47  72 44 42 53 0A 42 67 4E   | v1AbOScGrDBS.BgN
56 48 52 38 45 53 7A 42  4A 4D 45 65 67 52 61 42   | VHR8ESzBJMEegRaB
44 68 6B 46 6F 64 48 52  77 63 7A 6F 76 4C 32 4E   | DhkFodHRwczovL2N
6C 63 6E 52 70 5A 6D 6C  6A 59 58 52 6C 63 79 35   | lcnRpZmljYXRlcy5
30 63 6E 56 7A 64 47 56  6B 63 32 56 79 0A 64 6D   | 0cnVzdGVkc2Vy.dm
6C 6A 5A 58 4D 75 61 57  35 30 5A 57 77 75 59 32   | ljZXMuaW50ZWwuY2
39 74 4C 30 6C 75 64 47  56 73 55 30 64 59 55 6D   | 9tL0ludGVsU0dYUm
39 76 64 45 4E 42 4C 6D  52 6C 63 6A 41 64 42 67   | 9vdENBLmRlcjAdBg
4E 56 48 51 34 45 46 67  51 55 6C 57 39 64 0A 7A   | NVHQ4EFgQUlW9d.z
62 30 62 34 65 6C 41 53  63 6E 55 39 44 50 4F 41   | b0b4elAScnU9DPOA
56 63 4C 33 6C 51 77 44  67 59 44 56 52 30 50 41   | VcL3lQwDgYDVR0PA
51 48 2F 42 41 51 44 41  67 45 47 4D 42 49 47 41   | QH/BAQDAgEGMBIGA
31 55 64 45 77 45 42 2F  77 51 49 4D 41 59 42 0A   | 1UdEwEB/wQIMAYB.
41 66 38 43 41 51 41 77  43 67 59 49 4B 6F 5A 49   | Af8CAQAwCgYIKoZI
7A 6A 30 45 41 77 49 44  52 77 41 77 52 41 49 67   | zj0EAwIDRwAwRAIg
58 73 56 6B 69 30 77 2B  69 36 56 59 47 57 33 55   | XsVki0w+i6VYGW3U
46 2F 32 32 75 61 58 65  30 59 4A 44 6A 31 55 65   | F/22uaXe0YJDj1Ue
0A 6E 41 2B 54 6A 44 31  61 69 35 63 43 49 43 59   | .nA+TjD1ai5cCICY
62 31 53 41 6D 44 35 78  6B 66 54 56 70 76 6F 34   | b1SAmD5xkfTVpvo4
55 6F 79 69 53 59 78 72  44 57 4C 6D 55 52 34 43   | UoyiSYxrDWLmUR4C
49 39 4E 4B 79 66 50 4E  2B 0A 2D 2D 2D 2D 2D 45   | I9NKyfPN+.-----E
4E 44 20 43 45 52 54 49  46 49 43 41 54 45 2D 2D   | ND CERTIFICATE--
2D 2D 2D 0A 2D 2D 2D 2D  2D 42 45 47 49 4E 20 43   | ---.-----BEGIN C
45 52 54 49 46 49 43 41  54 45 2D 2D 2D 2D 2D 0A   | ERTIFICATE-----.
4D 49 49 43 6A 7A 43 43  41 6A 53 67 41 77 49 42   | MIICjzCCAjSgAwIB
41 67 49 55 49 6D 55 4D  31 6C 71 64 4E 49 6E 7A   | AgIUImUM1lqdNInz
67 37 53 56 55 72 39 51  47 7A 6B 6E 42 71 77 77   | g7SVUr9QGzknBqww
43 67 59 49 4B 6F 5A 49  7A 6A 30 45 41 77 49 77   | CgYIKoZIzj0EAwIw
0A 61 44 45 61 4D 42 67  47 41 31 55 45 41 77 77   | .aDEaMBgGA1UEAww
52 53 57 35 30 5A 57 77  67 55 30 64 59 49 46 4A   | RSW50ZWwgU0dYIFJ
76 62 33 51 67 51 30 45  78 47 6A 41 59 42 67 4E   | vb3QgQ0ExGjAYBgN
56 42 41 6F 4D 45 55 6C  75 64 47 56 73 49 45 4E   | VBAoMEUludGVsIEN
76 0A 63 6E 42 76 63 6D  46 30 61 57 39 75 4D 52   | v.cnBvcmF0aW9uMR
51 77 45 67 59 44 56 51  51 48 44 41 74 54 59 57   | QwEgYDVQQHDAtTYW
35 30 59 53 42 44 62 47  46 79 59 54 45 4C 4D 41   | 50YSBDbGFyYTELMA
6B 47 41 31 55 45 43 41  77 43 51 30 45 78 43 7A   | kGA1UECAwCQ0ExCz
41 4A 0A 42 67 4E 56 42  41 59 54 41 6C 56 54 4D   | AJ.BgNVBAYTAlVTM
42 34 58 44 54 45 34 4D  44 55 79 4D 54 45 77 4E   | B4XDTE4MDUyMTEwN
44 55 78 4D 46 6F 58 44  54 51 35 4D 54 49 7A 4D   | DUxMFoXDTQ5MTIzM
54 49 7A 4E 54 6B 31 4F  56 6F 77 61 44 45 61 4D   | TIzNTk1OVowaDEaM
42 67 47 0A 41 31 55 45  41 77 77 52 53 57 35 30   | BgG.A1UEAwwRSW50
5A 57 77 67 55 30 64 59  49 46 4A 76 62 33 51 67   | ZWwgU0dYIFJvb3Qg
51 30 45 78 47 6A 41 59  42 67 4E 56 42 41 6F 4D   | Q0ExGjAYBgNVBAoM
45 55 6C 75 64 47 56 73  49 45 4E 76 63 6E 42 76   | EUludGVsIENvcnBv
63 6D 46 30 0A 61 57 39  75 4D 52 51 77 45 67 59   | cmF0.aW9uMRQwEgY
44 56 51 51 48 44 41 74  54 59 57 35 30 59 53 42   | DVQQHDAtTYW50YSB
44 62 47 46 79 59 54 45  4C 4D 41 6B 47 41 31 55   | DbGFyYTELMAkGA1U
45 43 41 77 43 51 30 45  78 43 7A 41 4A 42 67 4E   | ECAwCQ0ExCzAJBgN
56 42 41 59 54 0A 41 6C  56 54 4D 46 6B 77 45 77   | VBAYT.AlVTMFkwEw
59 48 4B 6F 5A 49 7A 6A  30 43 41 51 59 49 4B 6F   | YHKoZIzj0CAQYIKo
5A 49 7A 6A 30 44 41 51  63 44 51 67 41 45 43 36   | ZIzj0DAQcDQgAEC6
6E 45 77 4D 44 49 59 5A  4F 6A 2F 69 50 57 73 43   | nEwMDIYZOj/iPWsC
7A 61 45 4B 69 37 0A 31  4F 69 4F 53 4C 52 46 68   | zaEKi7.1OiOSLRFh
57 47 6A 62 6E 42 56 4A  66 56 6E 6B 59 34 75 33   | WGjbnBVJfVnkY4u3
49 6A 6B 44 59 59 4C 30  4D 78 4F 34 6D 71 73 79   | IjkDYYL0MxO4mqsy
59 6A 6C 42 61 6C 54 56  59 78 46 50 32 73 4A 42   | YjlBalTVYxFP2sJB
4B 35 7A 6C 4B 4F 42 0A  75 7A 43 42 75 44 41 66   | K5zlKOB.uzCBuDAf
42 67 4E 56 48 53 4D 45  47 44 41 57 67 42 51 69   | BgNVHSMEGDAWgBQi
5A 51 7A 57 57 70 30 30  69 66 4F 44 74 4A 56 53   | ZQzWWp00ifODtJVS
76 31 41 62 4F 53 63 47  72 44 42 53 42 67 4E 56   | v1AbOScGrDBSBgNV
48 52 38 45 53 7A 42 4A  0A 4D 45 65 67 52 61 42   | HR8ESzBJ.MEegRaB
44 68 6B 46 6F 64 48 52  77 63 7A 6F 76 4C 32 4E   | DhkFodHRwczovL2N
6C 63 6E 52 70 5A 6D 6C  6A 59 58 52 6C 63 79 35   | lcnRpZmljYXRlcy5
30 63 6E 56 7A 64 47 56  6B 63 32 56 79 64 6D 6C   | 0cnVzdGVkc2Vydml
6A 5A 58 4D 75 61 57 35  30 0A 5A 57 77 75 59 32   | jZXMuaW50.ZWwuY2
39 74 4C 30 6C 75 64 47  56 73 55 30 64 59 55 6D   | 9tL0ludGVsU0dYUm
39 76 64 45 4E 42 4C 6D  52 6C 63 6A 41 64 42 67   | 9vdENBLmRlcjAdBg
4E 56 48 51 34 45 46 67  51 55 49 6D 55 4D 31 6C   | NVHQ4EFgQUImUM1l
71 64 4E 49 6E 7A 67 37  53 56 0A 55 72 39 51 47   | qdNInzg7SV.Ur9QG
7A 6B 6E 42 71 77 77 44  67 59 44 56 52 30 50 41   | zknBqwwDgYDVR0PA
51 48 2F 42 41 51 44 41  67 45 47 4D 42 49 47 41   | QH/BAQDAgEGMBIGA
31 55 64 45 77 45 42 2F  77 51 49 4D 41 59 42 41   | 1UdEwEB/wQIMAYBA
66 38 43 41 51 45 77 43  67 59 49 0A 4B 6F 5A 49   | f8CAQEwCgYI.KoZI
7A 6A 30 45 41 77 49 44  53 51 41 77 52 67 49 68   | zj0EAwIDSQAwRgIh
41 4F 57 2F 35 51 6B 52  2B 53 39 43 69 53 44 63   | AOW/5QkR+S9CiSDc
4E 6F 6F 77 4C 75 50 52  4C 73 57 47 66 2F 59 69   | NoowLuPRLsWGf/Yi
37 47 53 58 39 34 42 67  77 54 77 67 0A 41 69 45   | 7GSX94BgwTwg.AiE
41 34 4A 30 6C 72 48 6F  4D 73 2B 58 6F 35 6F 2F   | A4J0lrHoMs+Xo5o/
73 58 36 4F 39 51 57 78  48 52 41 76 5A 55 47 4F   | sX6O9QWxHRAvZUGO
64 52 51 37 63 76 71 52  58 61 71 49 3D 0A 2D 2D   | dRQ7cvqRXaqI=.--
2D 2D 2D 45 4E 44 20 43  45 52 54 49 46 49 43 41   | ---END CERTIFICA
54 45 2D 2D 2D 2D 2D 0A                            | TE-----.

By running SGXDataCenterAttestationPrimitives/SampleCode/QuoteVerificationSample, the output is:

Trusted quote verification:
    Info: get target info successfully returned.
sign measure:
0e,0a,d7,6c,a0,5b,ff,ab,ac,02,49,c5,ed,d6,b4,6a,cf,24,32,aa,ab,32,18,e9,f1,07,5f,2a,88,ca,45,cd,
    Info: sgx_qv_set_enclave_load_policy successfully returned.
    Info: sgx_qv_get_quote_supplemental_data_size successfully returned.
    Error: App: sgx_qv_verify_quote failed: 0xe01d
verify quote fail! 

When I use Intel SGX DCAP examples, code is sgx_qe_get_quote, I get the sgx quote, length is 4728, content is (Hexadecimal printing):

3 0 2 0 0 0 0 0 7 0 c 0 93 9a 72 33 f7 9c 4c a9 94 a d b3 95 7f 6 7 7 9d b0 42 32 c9 c0 66 dc 11 5b 69 db cf 3 4e 0 0 0 0 5 5 8 9 ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 e7 0 0 0 0 0 0 0 16 56 69 db 36 dc 9e 8a 1d e b3 d3 e2 18 a5 3c f5 1e 1f 41 70 54 32 c6 52 f1 55 fc 77 16 42 3f 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 83 d7 19 e7 7d ea ca 14 70 f6 ba f6 2a 4d 77 43 3 c8 99 db 69 2 f 9c 70 ee 1d fc 8 c7 ce 9e 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 82 9e 51 9a b 55 f e2 32 2 41 c9 d3 d9 24 37 98 ca b8 77 37 9f 4f d5 1c eb f3 b5 2c b2 38 79 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 c4 10 0 0 92 19 8e 7a a1 72 17 84 4b e7 ae f6 71 c8 1f b6 52 f5 d1 46 eb e0 e3 f8 98 4e bb 3a 9b 64 65 a7 39 f7 5 6 4 99 6a cf cd ac 8e 13 10 ae 57 db e9 f1 2e a2 d4 5a 5c 42 2c ac 95 e8 e8 20 f0 c8 e3 cf 3f 7f 9d fc bc 2b e0 bb e7 95 4e 67 78 d4 39 1e 92 73 12 8c e9 1e de 24 dd 95 e5 ab b4 20 bf a5 1e 39 80 63 c2 6c 48 8f 39 83 21 99 11 fa 53 cd 58 73 f5 3a ca b2 36 e0 e6 f2 c6 fe 81 fe 5 5 8 9 ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 0 0 0 0 0 0 0 e7 0 0 0 0 0 0 0 ae 12 3c bf a9 6c 26 85 60 df d5 df fe 48 54 ce 44 3d e4 e0 fa 51 d2 81 18 4c 94 28 d7 a3 40 fb 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8c 4f 57 75 d7 96 50 3e 96 13 7f 77 c6 8a 82 9a 0 56 ac 8d ed 70 14 b 8 1b 9 44 90 c5 7b ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 92 8d 9e 78 20 47 27 cd ce fd 84 37 37 7 a6 42 37 ee 34 ea d 2f 67 b5 9 b4 76 79 7c ef f7 46 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 66 0 fd 6b 88 95 a9 d6 76 26 4e 9d ed 13 76 84 c6 ff fb 2 e1 c4 71 44 26 75 1d 3f c6 55 43 d6 fd 57 ef 7f 41 2a dd 93 48 41 6d 4b 8c 2b 63 b1 7f ce de c2 8e 96 94 da b5 f7 30 1d e 3f 21 9e 20 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 5 0 5c e 0 0 2d 2d 2d 2d 2d 42 45 47 49 4e 20 43 45 52 54 49 46 49 43 41 54 45 2d 2d 2d 2d 2d a 4d 49 49 45 38 6a 43 43 42 4a 69 67 41 77 49 42 41 67 49 55 46 52 55 66 4a 38 41 34 34 76 78 74 36 69 79 52 6f 31 52 49 41 58 45 75 73 77 41 77 43 67 59 49 4b 6f 5a 49 7a 6a 30 45 41 77 49 77 63 44 45 69 4d 43 41 47 41 31 55 45 a 41 77 77 5a 53 57 35 30 5a 57 77 67 55 30 64 59 49 46 42 44 53 79 42 51 62 47 46 30 5a 6d 39 79 62 53 42 44 51 54 45 61 4d 42 67 47 41 31 55 45 43 67 77 52 53 57 35 30 5a 57 77 67 51 32 39 79 63 47 39 79 59 58 52 70 62 32 34 78 a 46 44 41 53 42 67 4e 56 42 41 63 4d 43 31 4e 68 62 6e 52 68 49 45 4e 73 59 58 4a 68 4d 51 73 77 43 51 59 44 56 51 51 49 44 41 4a 44 51 54 45 4c 4d 41 6b 47 41 31 55 45 42 68 4d 43 56 56 4d 77 48 68 63 4e 4d 6a 45 78 4d 54 49 30 a 4d 44 63 31 4d 7a 45 78 57 68 63 4e 4d 6a 67 78 4d 54 49 30 4d 44 63 31 4d 7a 45 78 57 6a 42 77 4d 53 49 77 49 41 59 44 56 51 51 44 44 42 6c 4a 62 6e 52 6c 62 43 42 54 52 31 67 67 55 45 4e 4c 49 45 4e 6c 63 6e 52 70 5a 6d 6c 6a a 59 58 52 6c 4d 52 6f 77 47 41 59 44 56 51 51 4b 44 42 46 4a 62 6e 52 6c 62 43 42 44 62 33 4a 77 62 33 4a 68 64 47 6c 76 62 6a 45 55 4d 42 49 47 41 31 55 45 42 77 77 4c 55 32 46 75 64 47 45 67 51 32 78 68 63 6d 45 78 43 7a 41 4a a 42 67 4e 56 42 41 67 4d 41 6b 4e 42 4d 51 73 77 43 51 59 44 56 51 51 47 45 77 4a 56 55 7a 42 5a 4d 42 4d 47 42 79 71 47 53 4d 34 39 41 67 45 47 43 43 71 47 53 4d 34 39 41 77 45 48 41 30 49 41 42 4c 4b 79 74 77 6c 65 65 70 36 74 a 49 2b 30 75 70 68 64 51 58 59 4b 4f 4a 33 46 35 37 48 49 2b 52 62 6c 6f 52 36 49 73 52 73 50 78 64 41 70 49 57 6b 6c 6e 77 4b 50 39 71 53 6d 71 6d 70 37 68 31 46 54 6d 4b 62 71 6d 45 55 52 73 74 6d 57 59 68 63 58 59 57 59 47 6a a 67 67 4d 4f 4d 49 49 44 43 6a 41 66 42 67 4e 56 48 53 4d 45 47 44 41 57 67 42 53 56 62 31 33 4e 76 52 76 68 36 55 42 4a 79 64 54 30 4d 38 34 42 56 77 76 65 56 44 42 72 42 67 4e 56 48 52 38 45 5a 44 42 69 4d 47 43 67 58 71 42 63 a 68 6c 70 6f 64 48 52 77 63 7a 6f 76 4c 32 46 77 61 53 35 30 63 6e 56 7a 64 47 56 6b 63 32 56 79 64 6d 6c 6a 5a 58 4d 75 61 57 35 30 5a 57 77 75 59 32 39 74 4c 33 4e 6e 65 43 39 6a 5a 58 4a 30 61 57 5a 70 59 32 46 30 61 57 39 75 a 4c 33 59 7a 4c 33 42 6a 61 32 4e 79 62 44 39 6a 59 54 31 77 62 47 46 30 5a 6d 39 79 62 53 5a 6c 62 6d 4e 76 5a 47 6c 75 5a 7a 31 6b 5a 58 49 77 48 51 59 44 56 52 30 4f 42 42 59 45 46 4e 6c 6c 72 49 53 46 32 30 47 4e 73 31 50 4e a 56 47 6d 47 31 62 52 45 4c 66 72 64 4d 41 34 47 41 31 55 64 44 77 45 42 2f 77 51 45 41 77 49 47 77 44 41 4d 42 67 4e 56 48 52 4d 42 41 66 38 45 41 6a 41 41 4d 49 49 43 4f 77 59 4a 4b 6f 5a 49 68 76 68 4e 41 51 30 42 42 49 49 43 a 4c 44 43 43 41 69 67 77 48 67 59 4b 4b 6f 5a 49 68 76 68 4e 41 51 30 42 41 51 51 51 67 5a 68 45 76 57 50 78 48 35 35 55 73 50 77 2f 61 70 47 32 62 7a 43 43 41 57 55 47 43 69 71 47 53 49 62 34 54 51 45 4e 41 51 49 77 67 67 46 56 a 4d 42 41 47 43 79 71 47 53 49 62 34 54 51 45 4e 41 51 49 42 41 67 45 45 4d 42 41 47 43 79 71 47 53 49 62 34 54 51 45 4e 41 51 49 43 41 67 45 45 4d 42 41 47 43 79 71 47 53 49 62 34 54 51 45 4e 41 51 49 44 41 67 45 44 4d 42 41 47 a 43 79 71 47 53 49 62 34 54 51 45 4e 41 51 49 45 41 67 45 44 4d 42 45 47 43 79 71 47 53 49 62 34 54 51 45 4e 41 51 49 46 41 67 49 41 2f 7a 41 52 42 67 73 71 68 6b 69 47 2b 45 30 42 44 51 45 43 42 67 49 43 41 50 38 77 45 41 59 4c a 4b 6f 5a 49 68 76 68 4e 41 51 30 42 41 67 63 43 41 51 41 77 45 41 59 4c 4b 6f 5a 49 68 76 68 4e 41 51 30 42 41 67 67 43 41 51 41 77 45 41 59 4c 4b 6f 5a 49 68 76 68 4e 41 51 30 42 41 67 6b 43 41 51 41 77 45 41 59 4c 4b 6f 5a 49 a 68 76 68 4e 41 51 30 42 41 67 6f 43 41 51 41 77 45 41 59 4c 4b 6f 5a 49 68 76 68 4e 41 51 30 42 41 67 73 43 41 51 41 77 45 41 59 4c 4b 6f 5a 49 68 76 68 4e 41 51 30 42 41 67 77 43 41 51 41 77 45 41 59 4c 4b 6f 5a 49 68 76 68 4e a 41 51 30 42 41 67 30 43 41 51 41 77 45 41 59 4c 4b 6f 5a 49 68 76 68 4e 41 51 30 42 41 67 34 43 41 51 41 77 45 41 59 4c 4b 6f 5a 49 68 76 68 4e 41 51 30 42 41 67 38 43 41 51 41 77 45 41 59 4c 4b 6f 5a 49 68 76 68 4e 41 51 30 42 a 41 68 41 43 41 51 41 77 45 41 59 4c 4b 6f 5a 49 68 76 68 4e 41 51 30 42 41 68 45 43 41 51 73 77 48 77 59 4c 4b 6f 5a 49 68 76 68 4e 41 51 30 42 41 68 49 45 45 41 51 45 41 77 50 2f 2f 77 41 41 41 41 41 41 41 41 41 41 41 41 41 77 a 45 41 59 4b 4b 6f 5a 49 68 76 68 4e 41 51 30 42 41 77 51 43 41 41 41 77 46 41 59 4b 4b 6f 5a 49 68 76 68 4e 41 51 30 42 42 41 51 47 41 47 42 71 41 41 41 41 4d 41 38 47 43 69 71 47 53 49 62 34 54 51 45 4e 41 51 55 4b 41 51 45 77 a 48 67 59 4b 4b 6f 5a 49 68 76 68 4e 41 51 30 42 42 67 51 51 6a 4d 59 68 57 2b 6d 79 52 4a 34 6e 31 39 68 2f 30 2f 54 73 55 7a 42 45 42 67 6f 71 68 6b 69 47 2b 45 30 42 44 51 45 48 4d 44 59 77 45 41 59 4c 4b 6f 5a 49 68 76 68 4e a 41 51 30 42 42 77 45 42 41 66 38 77 45 41 59 4c 4b 6f 5a 49 68 76 68 4e 41 51 30 42 42 77 49 42 41 66 38 77 45 41 59 4c 4b 6f 5a 49 68 76 68 4e 41 51 30 42 42 77 4d 42 41 66 38 77 43 67 59 49 4b 6f 5a 49 7a 6a 30 45 41 77 49 44 a 53 41 41 77 52 51 49 67 51 73 36 64 41 57 52 56 6d 4d 39 69 6b 62 69 7a 65 74 49 59 74 41 39 37 6b 54 69 52 77 33 33 39 5a 5a 36 79 48 6a 54 59 61 4f 38 43 49 51 44 5a 49 4b 77 6c 33 4c 43 6b 31 37 32 43 63 41 51 78 66 41 6b 41 a 63 54 50 75 4b 2b 56 41 6e 55 36 50 67 35 7a 6a 67 79 47 50 46 67 3d 3d a 2d 2d 2d 2d 2d 45 4e 44 20 43 45 52 54 49 46 49 43 41 54 45 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 42 45 47 49 4e 20 43 45 52 54 49 46 49 43 41 54 45 2d 2d 2d 2d 2d a 4d 49 49 43 6c 6a 43 43 41 6a 32 67 41 77 49 42 41 67 49 56 41 4a 56 76 58 63 32 39 47 2b 48 70 51 45 6e 4a 31 50 51 7a 7a 67 46 58 43 39 35 55 4d 41 6f 47 43 43 71 47 53 4d 34 39 42 41 4d 43 a 4d 47 67 78 47 6a 41 59 42 67 4e 56 42 41 4d 4d 45 55 6c 75 64 47 56 73 49 46 4e 48 57 43 42 53 62 32 39 30 49 45 4e 42 4d 52 6f 77 47 41 59 44 56 51 51 4b 44 42 46 4a 62 6e 52 6c 62 43 42 44 a 62 33 4a 77 62 33 4a 68 64 47 6c 76 62 6a 45 55 4d 42 49 47 41 31 55 45 42 77 77 4c 55 32 46 75 64 47 45 67 51 32 78 68 63 6d 45 78 43 7a 41 4a 42 67 4e 56 42 41 67 4d 41 6b 4e 42 4d 51 73 77 a 43 51 59 44 56 51 51 47 45 77 4a 56 55 7a 41 65 46 77 30 78 4f 44 41 31 4d 6a 45 78 4d 44 55 77 4d 54 42 61 46 77 30 7a 4d 7a 41 31 4d 6a 45 78 4d 44 55 77 4d 54 42 61 4d 48 41 78 49 6a 41 67 a 42 67 4e 56 42 41 4d 4d 47 55 6c 75 64 47 56 73 49 46 4e 48 57 43 42 51 51 30 73 67 55 47 78 68 64 47 5a 76 63 6d 30 67 51 30 45 78 47 6a 41 59 42 67 4e 56 42 41 6f 4d 45 55 6c 75 64 47 56 73 a 49 45 4e 76 63 6e 42 76 63 6d 46 30 61 57 39 75 4d 52 51 77 45 67 59 44 56 51 51 48 44 41 74 54 59 57 35 30 59 53 42 44 62 47 46 79 59 54 45 4c 4d 41 6b 47 41 31 55 45 43 41 77 43 51 30 45 78 a 43 7a 41 4a 42 67 4e 56 42 41 59 54 41 6c 56 54 4d 46 6b 77 45 77 59 48 4b 6f 5a 49 7a 6a 30 43 41 51 59 49 4b 6f 5a 49 7a 6a 30 44 41 51 63 44 51 67 41 45 4e 53 42 2f 37 74 32 31 6c 58 53 4f a 32 43 75 7a 70 78 77 37 34 65 4a 42 37 32 45 79 44 47 67 57 35 72 58 43 74 78 32 74 56 54 4c 71 36 68 4b 6b 36 7a 2b 55 69 52 5a 43 6e 71 52 37 70 73 4f 76 67 71 46 65 53 78 6c 6d 54 6c 4a 6c a 65 54 6d 69 32 57 59 7a 33 71 4f 42 75 7a 43 42 75 44 41 66 42 67 4e 56 48 53 4d 45 47 44 41 57 67 42 51 69 5a 51 7a 57 57 70 30 30 69 66 4f 44 74 4a 56 53 76 31 41 62 4f 53 63 47 72 44 42 53 a 42 67 4e 56 48 52 38 45 53 7a 42 4a 4d 45 65 67 52 61 42 44 68 6b 46 6f 64 48 52 77 63 7a 6f 76 4c 32 4e 6c 63 6e 52 70 5a 6d 6c 6a 59 58 52 6c 63 79 35 30 63 6e 56 7a 64 47 56 6b 63 32 56 79 a 64 6d 6c 6a 5a 58 4d 75 61 57 35 30 5a 57 77 75 59 32 39 74 4c 30 6c 75 64 47 56 73 55 30 64 59 55 6d 39 76 64 45 4e 42 4c 6d 52 6c 63 6a 41 64 42 67 4e 56 48 51 34 45 46 67 51 55 6c 57 39 64 a 7a 62 30 62 34 65 6c 41 53 63 6e 55 39 44 50 4f 41 56 63 4c 33 6c 51 77 44 67 59 44 56 52 30 50 41 51 48 2f 42 41 51 44 41 67 45 47 4d 42 49 47 41 31 55 64 45 77 45 42 2f 77 51 49 4d 41 59 42 a 41 66 38 43 41 51 41 77 43 67 59 49 4b 6f 5a 49 7a 6a 30 45 41 77 49 44 52 77 41 77 52 41 49 67 58 73 56 6b 69 30 77 2b 69 36 56 59 47 57 33 55 46 2f 32 32 75 61 58 65 30 59 4a 44 6a 31 55 65 a 6e 41 2b 54 6a 44 31 61 69 35 63 43 49 43 59 62 31 53 41 6d 44 35 78 6b 66 54 56 70 76 6f 34 55 6f 79 69 53 59 78 72 44 57 4c 6d 55 52 34 43 49 39 4e 4b 79 66 50 4e 2b a 2d 2d 2d 2d 2d 45 4e 44 20 43 45 52 54 49 46 49 43 41 54 45 2d 2d 2d 2d 2d a 2d 2d 2d 2d 2d 42 45 47 49 4e 20 43 45 52 54 49 46 49 43 41 54 45 2d 2d 2d 2d 2d a 4d 49 49 43 6a 7a 43 43 41 6a 53 67 41 77 49 42 41 67 49 55 49 6d 55 4d 31 6c 71 64 4e 49 6e 7a 67 37 53 56 55 72 39 51 47 7a 6b 6e 42 71 77 77 43 67 59 49 4b 6f 5a 49 7a 6a 30 45 41 77 49 77 a 61 44 45 61 4d 42 67 47 41 31 55 45 41 77 77 52 53 57 35 30 5a 57 77 67 55 30 64 59 49 46 4a 76 62 33 51 67 51 30 45 78 47 6a 41 59 42 67 4e 56 42 41 6f 4d 45 55 6c 75 64 47 56 73 49 45 4e 76 a 63 6e 42 76 63 6d 46 30 61 57 39 75 4d 52 51 77 45 67 59 44 56 51 51 48 44 41 74 54 59 57 35 30 59 53 42 44 62 47 46 79 59 54 45 4c 4d 41 6b 47 41 31 55 45 43 41 77 43 51 30 45 78 43 7a 41 4a a 42 67 4e 56 42 41 59 54 41 6c 56 54 4d 42 34 58 44 54 45 34 4d 44 55 79 4d 54 45 77 4e 44 55 78 4d 46 6f 58 44 54 51 35 4d 54 49 7a 4d 54 49 7a 4e 54 6b 31 4f 56 6f 77 61 44 45 61 4d 42 67 47 a 41 31 55 45 41 77 77 52 53 57 35 30 5a 57 77 67 55 30 64 59 49 46 4a 76 62 33 51 67 51 30 45 78 47 6a 41 59 42 67 4e 56 42 41 6f 4d 45 55 6c 75 64 47 56 73 49 45 4e 76 63 6e 42 76 63 6d 46 30 a 61 57 39 75 4d 52 51 77 45 67 59 44 56 51 51 48 44 41 74 54 59 57 35 30 59 53 42 44 62 47 46 79 59 54 45 4c 4d 41 6b 47 41 31 55 45 43 41 77 43 51 30 45 78 43 7a 41 4a 42 67 4e 56 42 41 59 54 a 41 6c 56 54 4d 46 6b 77 45 77 59 48 4b 6f 5a 49 7a 6a 30 43 41 51 59 49 4b 6f 5a 49 7a 6a 30 44 41 51 63 44 51 67 41 45 43 36 6e 45 77 4d 44 49 59 5a 4f 6a 2f 69 50 57 73 43 7a 61 45 4b 69 37 a 31 4f 69 4f 53 4c 52 46 68 57 47 6a 62 6e 42 56 4a 66 56 6e 6b 59 34 75 33 49 6a 6b 44 59 59 4c 30 4d 78 4f 34 6d 71 73 79 59 6a 6c 42 61 6c 54 56 59 78 46 50 32 73 4a 42 4b 35 7a 6c 4b 4f 42 a 75 7a 43 42 75 44 41 66 42 67 4e 56 48 53 4d 45 47 44 41 57 67 42 51 69 5a 51 7a 57 57 70 30 30 69 66 4f 44 74 4a 56 53 76 31 41 62 4f 53 63 47 72 44 42 53 42 67 4e 56 48 52 38 45 53 7a 42 4a a 4d 45 65 67 52 61 42 44 68 6b 46 6f 64 48 52 77 63 7a 6f 76 4c 32 4e 6c 63 6e 52 70 5a 6d 6c 6a 59 58 52 6c 63 79 35 30 63 6e 56 7a 64 47 56 6b 63 32 56 79 64 6d 6c 6a 5a 58 4d 75 61 57 35 30 a 5a 57 77 75 59 32 39 74 4c 30 6c 75 64 47 56 73 55 30 64 59 55 6d 39 76 64 45 4e 42 4c 6d 52 6c 63 6a 41 64 42 67 4e 56 48 51 34 45 46 67 51 55 49 6d 55 4d 31 6c 71 64 4e 49 6e 7a 67 37 53 56 a 55 72 39 51 47 7a 6b 6e 42 71 77 77 44 67 59 44 56 52 30 50 41 51 48 2f 42 41 51 44 41 67 45 47 4d 42 49 47 41 31 55 64 45 77 45 42 2f 77 51 49 4d 41 59 42 41 66 38 43 41 51 45 77 43 67 59 49 a 4b 6f 5a 49 7a 6a 30 45 41 77 49 44 53 51 41 77 52 67 49 68 41 4f 57 2f 35 51 6b 52 2b 53 39 43 69 53 44 63 4e 6f 6f 77 4c 75 50 52 4c 73 57 47 66 2f 59 69 37 47 53 58 39 34 42 67 77 54 77 67 a 41 69 45 41 34 4a 30 6c 72 48 6f 4d 73 2b 58 6f 35 6f 2f 73 58 36 4f 39 51 57 78 48 52 41 76 5a 55 47 4f 64 52 51 37 63 76 71 52 58 61 71 49 3d a 2d 2d 2d 2d 2d 45 4e 44 20 43 45 52 54 49 46 49 43 41 54 45 2d 2d 2d 2d 2d a

By running SGXDataCenterAttestationPrimitives/SampleCode/QuoteVerificationSample, the output is:

Trusted quote verification:
    Info: get target info successfully returned.
sign measure:
0e,0a,d7,6c,a0,5b,ff,ab,ac,02,49,c5,ed,d6,b4,6a,cf,24,32,aa,ab,32,18,e9,f1,07,5f,2a,88,ca,45,cd,
    Info: sgx_qv_set_enclave_load_policy successfully returned.
    Info: sgx_qv_get_quote_supplemental_data_size successfully returned.
    Info: App: sgx_qv_verify_quote successfully returned.
    Info: Ecall: Verify QvE report and identity successfully returned.
    Info: App: Verification completed successfully.
    Info: Supplemental data version: 3

But, if I remove the extra 16 bytes [01 00 00 00 02 00 00 00 78 12 00 00 00 00 00 00 ] from edgelessdb quote, send it to QuoteVerificationSample for authentication, quote verification success, output is:

Trusted quote verification:
    Info: get target info successfully returned.
sign measure:
0e,0a,d7,6c,a0,5b,ff,ab,ac,02,49,c5,ed,d6,b4,6a,cf,24,32,aa,ab,32,18,e9,f1,07,5f,2a,88,ca,45,cd,
    Info: sgx_qv_set_enclave_load_policy successfully returned.
    Info: sgx_qv_get_quote_supplemental_data_size successfully returned.
    Info: App: sgx_qv_verify_quote successfully returned.
    Info: Ecall: Verify QvE report and identity successfully returned.
    Info: App: Verification completed successfully.
    Info: Supplemental data version: 3

So, what do these 16 bytes represent in edgelessdb quote? By the way, will edgelessdb validate the quote to PCCS?

thomasten commented 2 years ago

Hi, This is the Open Enclave report header: https://github.com/openenclave/openenclave/blob/v0.17.6/include/openenclave/internal/report.h#L69

By the way, will edgelessdb validate the quote to PCCS?

Yes, EdgelessDB requires the PCCS to issue a quote and era will validate the quote with the help of the PCCS.

water5-cmd commented 2 years ago

Thanks for your help! Now I know what the report header represents, next I will learn how era verifies the quote.