can anyone tell me what the “Purpose” values are used for while checking certificates and what they mean?
can anyone tell me what the Purpose values are used for while checking certificates
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For an overview of what they mean have a look at the Certificate Extensions section in OpenSSL’s
x509man page.This is how they relate to code (taken from
v3_purp.c):When checking for a purpose programmatically, you usually only have to deal with the integer constants such as
X509_PURPOSE_SSL_SERVER. These purposes are used during certificate validation. The certificate (path) is validated and finally OpenSSL checks whether the certificate at hand contains anExtendedKeyUsageextension that contains the requested “purposes”. If it does not, the certificate will be rejected.OpenSSL applies reasonable defaults where possible, but if you have special requirements you may add your own purposes to be checked during certificate validation. It is also possible to check for custom
ExtendedKeyUsages if you wish to, but usually the predefined default values suffice.