Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 293225 Details for
Bug 430597
crashes while creating X509Extension objects
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
additional patch to allow passing a cert or a req
pyOpenSSL-extensions.patch (text/plain), 4.79 KB, created by
Nalin Dahyabhai
on 2008-01-29 00:17:14 UTC
(
hide
)
Description:
additional patch to allow passing a cert or a req
Filename:
MIME Type:
Creator:
Nalin Dahyabhai
Created:
2008-01-29 00:17:14 UTC
Size:
4.79 KB
patch
obsolete
>diff -up pyOpenSSL-0.6/src/crypto/crypto.h pyOpenSSL-0.6/src/crypto/crypto.h >--- pyOpenSSL-0.6/src/crypto/crypto.h 2008-01-28 18:38:11.000000000 -0500 >+++ pyOpenSSL-0.6/src/crypto/crypto.h 2008-01-28 18:51:23.000000000 -0500 >@@ -58,7 +58,8 @@ extern PyObject *crypto_Error; > > #define crypto_X509Extension_New_NUM 5 > #define crypto_X509Extension_New_RETURN crypto_X509ExtensionObj * >-#define crypto_X509Extension_New_PROTO (char *, int, char *) >+#define crypto_X509Extension_New_PROTO (char *, int, char *, \ >+ crypto_X509Obj *, crypto_X509ReqObj *) > > #define crypto_PKCS7_New_NUM 6 > #define crypto_PKCS7_New_RETURN crypto_PKCS7Obj * >diff -up pyOpenSSL-0.6/src/crypto/x509ext.c pyOpenSSL-0.6/src/crypto/x509ext.c >--- pyOpenSSL-0.6/src/crypto/x509ext.c 2008-01-28 18:25:45.000000000 -0500 >+++ pyOpenSSL-0.6/src/crypto/x509ext.c 2008-01-28 19:00:14.000000000 -0500 >@@ -53,13 +53,15 @@ static PyMethodDef crypto_X509Extension_ > * Returns: The newly created X509Extension object > */ > crypto_X509ExtensionObj * >-crypto_X509Extension_New(char *type_name, int critical, char *value) >+crypto_X509Extension_New(char *type_name, int critical, char *value, >+ crypto_X509Obj *x509, crypto_X509ReqObj *req) > { > crypto_X509ExtensionObj *self; > int ext_len, ext_nid; > unsigned char *ext_der, *p; > X509V3_EXT_METHOD *ext_method = NULL; > ASN1_OCTET_STRING *ext_oct = NULL; >+ struct v3_ext_ctx ctx = {NULL}; > STACK_OF(CONF_VALUE) *nval; > void * ext_struct; > X509_EXTENSION *extension = NULL; >@@ -94,10 +96,12 @@ crypto_X509Extension_New(char *type_name > } > > /* Parse the value */ >+ ctx.subject_cert = x509 ? x509->x509 : NULL; >+ ctx.subject_req = req ? req->x509_req : NULL; > if (ext_method->s2i) > { > /* Parse the value as a string and get an internal representation */ >- if(!(ext_struct = ext_method->s2i(ext_method, NULL, value))) { >+ if(!(ext_struct = ext_method->s2i(ext_method, &ctx, value))) { > exception_from_error_queue(); > return NULL; > } >@@ -112,7 +116,7 @@ crypto_X509Extension_New(char *type_name > return NULL; > } > /* And use it to get the internal structure */ >- if(!(ext_struct = ext_method->v2i(ext_method, NULL, nval))) { >+ if(!(ext_struct = ext_method->v2i(ext_method, &ctx, nval))) { > exception_from_error_queue(); > return NULL; > } >diff -up pyOpenSSL-0.6/src/crypto/crypto.c pyOpenSSL-0.6/src/crypto/crypto.c >--- pyOpenSSL-0.6/src/crypto/crypto.c 2008-01-28 18:25:32.000000000 -0500 >+++ pyOpenSSL-0.6/src/crypto/crypto.c 2008-01-28 19:13:42.000000000 -0500 >@@ -599,20 +599,34 @@ Arguments: spam - Always NULL\n\ > typename - ???\n\ > critical - ???\n\ > value - ???\n\ >+ \"cert\" - ???\n\ >+ \"req\" - ???\n\ > Returns: The X509Extension object\n\ > "; > > static PyObject * >-crypto_X509Extension(PyObject *spam, PyObject *args) >+crypto_X509Extension(PyObject *spam, PyObject *args, PyObject *kwargs) > { >+ PyObject *certobj = NULL, *reqobj = NULL; >+ crypto_X509Obj *cert = NULL; >+ crypto_X509ReqObj *req = NULL; >+ static char *kwlist[] = {"type", "critical", "value", "cert", "req"}; > char *type_name, *value; > int critical; > >- if (!PyArg_ParseTuple(args, "sis:X509Extension", &type_name, &critical, >- &value)) >+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, >+ "sis|OO:X509Extension", kwlist, >+ &type_name, &critical, &value, >+ &certobj, &reqobj)) > return NULL; > >+ if (certobj && crypto_X509_Check(certobj)) >+ cert = certobj; >+ if (reqobj && crypto_X509Req_Check(reqobj)) >+ req = reqobj; >+ >- return (PyObject *)crypto_X509Extension_New(type_name, critical, value); >+ return (PyObject *)crypto_X509Extension_New(type_name, critical, value, >+ cert, req); > } > > static char crypto_NetscapeSPKI_doc[] = "\n\ >@@ -663,7 +677,7 @@ static PyMethodDef crypto_methods[] = { > { "X509Name",(PyCFunction)crypto_X509Name,METH_VARARGS, crypto_X509Name_doc }, > { "X509Req", (PyCFunction)crypto_X509Req, METH_VARARGS, crypto_X509Req_doc }, > { "PKey", (PyCFunction)crypto_PKey, METH_VARARGS, crypto_PKey_doc }, >- { "X509Extension", (PyCFunction)crypto_X509Extension, METH_VARARGS, crypto_X509Extension_doc }, >+ { "X509Extension", (PyCFunction)crypto_X509Extension, METH_VARARGS | METH_KEYWORDS, crypto_X509Extension_doc }, > { "NetscapeSPKI", (PyCFunction)crypto_NetscapeSPKI, METH_VARARGS, crypto_NetscapeSPKI_doc }, > { NULL, NULL } > }; >diff -up pyOpenSSL-0.6/src/crypto/x509ext.h pyOpenSSL-0.6/src/crypto/x509ext.h
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 430597
:
293219
|
293225
|
293226