GithubHelp home page GithubHelp logo

Comments (4)

gilles-peskine-arm avatar gilles-peskine-arm commented on May 31, 2024

I don't understand what you're asking. Can you please clarify?

Mbed TLS can parse certificates that contain the certificate policies extension. But Mbed TLS itself doesn't know about policies. By default, certificates containing anything other than anyPolicy are rejected. To allow certificates with a policy, you need to provide a callback function that decides whether the policy is met. Call mbedtls_x509_crt_parse_der_with_ext_cb. The callback should return 0 if the policy is met and a negative value (e.g. MBEDTLS_ERR_X509_INVALID_EXTENSIONS, or a value that's different from any MBEDTLS_ERR_xxx if you prefer) if the policy is not met. You can find an example callback parse_crt_ext_cb() in tests/suites/test_suite_x509parse.function.

from mbedtls.

gilles-peskine-arm avatar gilles-peskine-arm commented on May 31, 2024

I'm closing this issue because as far as I can tell, Mbed TLS does have the requested feature. Please don't hesitate to respond if I've misunderstood, we can reopen the issue.

If you need help with using existing features, please post on the mailing list: https://lists.trustedfirmware.org/mailman3/lists/mbed-tls.lists.trustedfirmware.org/

from mbedtls.

LubanTech1 avatar LubanTech1 commented on May 31, 2024

Thank you for your reply. But,My service uses a certificate whose policy_oid is not ANY_POLICY during SSL link establishment. The x509_get_certificate_policies function returns an error when determining that policy_oid is not MBEDTLS_OID_ANY_POLICY. How should I deal with this situation?

from mbedtls.

gilles-peskine-arm avatar gilles-peskine-arm commented on May 31, 2024

You need to write a callback to handle the CERTIFICATE_POLICIES extension, like this.

from mbedtls.

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.