Coder Social home page Coder Social logo

Comments (2)

zhq0918 avatar zhq0918 commented on August 30, 2024

I traced the code,and i found that ,the reason that enc_wolfSSL_CTX_load_verify_buffer returned value is -150 is the XTIME in wolfssl-ra-attester.c like this:
#ifdef WOLFSSL_SGX

time_t XTIME(time_t* tloc) {
//printf("wolfssl-ra-attester.c...XTIME...\n");

time_t x = 1512498557; /* Dec 5, 2017, 10:29 PDT */ Is the x the current time stamp?

if (tloc) *tloc = x;
return x;

}

time_t mktime(struct tm* tm) {
(void) tm;
assert(0);
return (time_t) 0;
}
#endif

from sgx-ra-tls.

thomasknauth avatar thomasknauth commented on August 30, 2024

Why are you actually using enc_wolfSSL_CTX_load_verify_buffer()? Looking at the wolfSSL source, this function is for loading CA certificates. The certificate that RA-TLS generates is not a CA certificate. I am guessing that enc_wolfSSL_CTX_load_verify_buffer() tries to do some sanity checks on the certificate related to its validity period and this fails.

I'd say calling enc_wolfSSL_CTX_load_verify_buffer() within the scope of what the example is trying to demonstrate is not supported/intended. You may want to look at what exactly enc_wolfSSL_CTX_load_verify_buffer() verifies and where it obtains its time from, if you still want to pursue this route.

from sgx-ra-tls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.