Add arbitrary extension

Asked by James Vasile on 2012-02-02

I'm trying to create a certificate with an arbitrary extension, but I don't know what extension name to pass to crypto.X509Extension. And will pyopenssl encode the data for me? If not, could you point me to an example that performs the encoding?

Thanks much,

Question information

Language:
English Edit question
Status:
Answered
For:
pyOpenSSL Edit question
Assignee:
No assignee Edit question
Last query:
2012-02-15
Last reply:
2012-02-15
Jean-Paul Calderone (exarkun) said : #1

Different extensions have different names. The name that you pass to X509Extension is determined by the name of the extension you want to add to your certificate.

X509Extension passes the data through X509V3_EXT_nconf. So whatever the encoding required by X509V3_EXT_nconf is the encoding you must use.

James Vasile (james.vasile) said : #2

Thanks much for the answer.

<#part sign=pgpmime>
On Fri, 03 Feb 2012 23:30:54 -0000, Jean-Paul Calderone <email address hidden> wrote:
> Your question #186571 on pyOpenSSL changed:
> https://answers.launchpad.net/pyopenssl/+question/186571
>
> Status: Open => Answered
>
> Jean-Paul Calderone proposed the following answer:
> Different extensions have different names. The name that you pass to
> X509Extension is determined by the name of the extension you want to add
> to your certificate.
>
> X509Extension passes the data through X509V3_EXT_nconf. So whatever the
> encoding required by X509V3_EXT_nconf is the encoding you must use.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/pyopenssl/+question/186571/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/pyopenssl/+question/186571
>
> You received this question notification because you asked the question.

Jean-Paul Calderone (exarkun) said : #3

.

Can you help with this problem?

Provide an answer of your own, or ask James Vasile for more information if necessary.

To post a message you must log in.