#!$(PAL)

loader.preload = file:$(SHIMPATH)
loader.exec = file:obj/bin/httpd
loader.execname = httpd
loader.env.LD_LIBRARY_PATH = /lib:/lib/x86_64-linux-gnu:/usr/lib:/usr/lib/x86_64-linux-gnu
loader.debug_type = none

fs.mount.lib1.type = chroot
fs.mount.lib1.path = /lib
fs.mount.lib1.uri = file:$(LIBCDIR)

fs.mount.lib2.type = chroot
fs.mount.lib2.path = /lib/x86_64-linux-gnu
fs.mount.lib2.uri = file:/lib/x86_64-linux-gnu

fs.mount.usr.type = chroot
fs.mount.usr.path = /usr
fs.mount.usr.uri = file:/usr

fs.mount.cwd.type = chroot
fs.mount.cwd.path = $(PWD)
fs.mount.cwd.uri = file:

sgx.enclave_size=4G
sgx.allow_file_creation = 1
net.allow_peer.1=:

# allow to bind on port for listening
net.allow_bind.1 =:

sgx.trusted_files.ld = file:$(LIBCDIR)/ld-linux-x86-64.so.2
sgx.trusted_files.libc = file:$(LIBCDIR)/libc.so.6
sgx.trusted_files.libdl = file:$(LIBCDIR)/libdl.so.2
sgx.trusted_files.libm = file:$(LIBCDIR)/libm.so.6
sgx.trusted_files.libpthread = file:$(LIBCDIR)/libpthread.so.0
sgx.trusted_files.libresolv = file:$(LIBCDIR)/libresolv.so.2
sgx.trusted_files.libnssdns = file:/lib/x86_64-linux-gnu/libnss_dns.so.2
sgx.trusted_files.libnssfiles = file:/lib/x86_64-linux-gnu/libnss_files.so.2
sgx.trusted_files.libnsscompact = file:/lib/x86_64-linux-gnu/libnss_compat.so.2
sgx.trusted_files.libnssnis = file:/lib/x86_64-linux-gnu/libnss_nis.so.2
sgx.trusted_files.libpcre = file:/lib/x86_64-linux-gnu/libpcre.so.3
sgx.trusted_files.libapr = file:obj/lib/libapr-1.so.0
sgx.trusted_files.libaprutil = file:obj/lib/libaprutil-1.so.0
sgx.trusted_files.libexpat = file:/lib/x86_64-linux-gnu/libexpat.so.1
sgx.trusted_files.libcrypt = file:/lib/x86_64-linux-gnu/libcrypt.so.1
sgx.trusted_files.libxml2 = file:/usr/lib/x86_64-linux-gnu/libxml2.so.2
sgx.trusted_files.libz = file:/lib/x86_64-linux-gnu/libz.so.1
sgx.trusted_files.liblzma = file:/lib/x86_64-linux-gnu/liblzma.so.5
sgx.trusted_files.libnsl = file:/lib/x86_64-linux-gnu/libnsl.so.1
sgx.trusted_files.libicuuc = file:/usr/lib/x86_64-linux-gnu/libicuuc.so.55
sgx.trusted_files.libicudata = file:/usr/lib/x86_64-linux-gnu/libicudata.so.55
sgx.trusted_files.libstdcpp = file:/usr/lib/x86_64-linux-gnu/libstdc++.so.6
sgx.trusted_files.libgcc_c = file:/lib/x86_64-linux-gnu/libgcc_s.so.1

sgx.allowed_files.modules = file:obj/modules
sgx.allowed_files.conf = file:obj/conf
sgx.allowed_files.htdocs = file:obj/htdocs
sgx.allowed_files.logs = file:obj/logs

sgx.trusted_files.conf = file:obj/conf/httpd.conf
sgx.trusted_files.confmime = file:obj/conf/mime.types

#Source code files
sgx.trusted_files.indexphp = file:obj/htdocs/index.php
sgx.trusted_files.actionphp = file:obj/htdocs/action.php

sgx.allowed_files.timeop=file:target_time.txt
sgx.allowed_files.phptimeop=file:obj/htdocs/mitigator_phptime.txt

#Extension and its dependencies (that are not already included above)
sgx.trusted_files.phpini=file:obj/lib/php.ini
sgx.trusted_files.mainextension=file:obj/modules/localattestation_decryption.so
sgx.trusted_files.libphpcpp=file:/usr/lib/libphpcpp.so.2.1
sgx.trusted_files.libprotobuf=file:/usr/lib/x86_64-linux-gnu/libprotobuf.so.9
sgx.trusted_files.libuuid=file:/lib/x86_64-linux-gnu/libuuid.so.1
sgx.trusted_files.libcrypto = file:/lib/x86_64-linux-gnu/libcrypto.so.1.0.0


## Apache PHP modules (LoadModule command in httpd.conf)

sgx.trusted_files.mod_authz_core=file:obj/modules/mod_authz_core.so
sgx.trusted_files.mod_access_compat=file:obj/modules/mod_access_compat.so
sgx.trusted_files.mod_filter=file:obj/modules/mod_filter.so
sgx.trusted_files.mod_mime=file:obj/modules/mod_mime.so
sgx.trusted_files.mod_log_config=file:obj/modules/mod_log_config.so
sgx.trusted_files.mod_log_debug=file:obj/modules/mod_log_debug.so
sgx.trusted_files.mod_unixd=file:obj/modules/mod_unixd.so
sgx.trusted_files.mod_status=file:obj/modules/mod_status.so
sgx.trusted_files.mod_dir=file:obj/modules/mod_dir.so
sgx.trusted_files.libphp7=file:obj/modules/libphp7.so

