  
  #define MAX_PATH 260
  #define MAX_CERT_DATA_SIZE (4098*3)
-@@ -163,6 +209,8 @@
+@@ -96,6 +142,18 @@
+ #define strcpy_s(dst, dstsize, src) strncpy(dst, src, dstsize)
+ #endif
+ 
++/**
++ * Free the heap-allocated sgx_ql_config_t structure. Safe to call with a NULL
++ * pointer.
++ */
++static inline void free_quote_config(sgx_ql_config_t *config)
++{
++    if (config)
++    {
++        free(config->p_cert_data);
++        free(config);
++    }
++}
+ 
+ /**
+  * Since the error code space of the PCE library is not unique from SGX SDK error space, need to explicitly
+@@ -163,17 +221,22 @@
      se_mutex_t m_ecdsa_blob_mutex;
  
      sgx_ql_request_policy_t m_load_policy;

+    return(refqt_ret);
+}
+
 /**
  * This is the ECDSA-P256 specific init quote code.  The generic quote interfaces have been converted/reduced to the ECDSA specific inputs.
  * The method will generate a new key and certify it when needed.
diff -Nur -x '*.png' -x '*.gif' -x .gitignore QuoteGeneration/quote_wrapper/quote/sgx_ql_core_wrapper.cpp QuoteGeneration/quote_wrapper/quote/sgx_ql_core_wrapper.cpp
--- QuoteGeneration/quote_wrapper/quote/sgx_ql_core_wrapper.cpp
+++ QuoteGeneration/quote_wrapper/quote/sgx_ql_core_wrapper.cpp

+    virtual quote3_error_t set_enclave_dirpath(const char *dirpath);
+#endif
+
+    virtual quote3_error_t set_quote_config(const sgx_ql_config_t *config);
+
     virtual quote3_error_t init_quote(sgx_ql_att_key_id_t* p_att_key_id,
                                       sgx_ql_cert_key_type_t certification_key_type,
                                       sgx_target_info_t *p_target_info,
@@ -68,6 +82,12 @@
 private:
     quote3_error_t ecdsa_set_enclave_load_policy(sgx_ql_request_policy_t policy);
 
