Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f9faaad8
Commit
f9faaad8
authored
May 16, 2010
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #8477: ssl.RAND_egd() supports str with surrogates and bytes for the path
parent
3800e1e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
Misc/NEWS
Misc/NEWS
+2
-2
Modules/_ssl.c
Modules/_ssl.c
+9
-7
No files found.
Misc/NEWS
View file @
f9faaad8
...
...
@@ -363,8 +363,8 @@ C-API
Library
-------
- Issue #8477:
_ssl._test_decode_cert() supports str with surrogates and bytes
for the filename
- Issue #8477:
ssl.RAND_egd() and ssl._test_decode_cert() support str with
surrogates and bytes
for the filename
- Issue #8550: Add first class ``SSLContext`` objects to the ssl module.
...
...
Modules/_ssl.c
View file @
f9faaad8
...
...
@@ -1730,15 +1730,17 @@ It is necessary to seed the PRNG with RAND_add() on some platforms before\n\
using the ssl() function."
);
static
PyObject
*
PySSL_RAND_egd
(
PyObject
*
self
,
PyObject
*
arg
)
PySSL_RAND_egd
(
PyObject
*
self
,
PyObject
*
arg
s
)
{
PyObject
*
path
;
int
bytes
;
if
(
!
PyUnicode_Check
(
arg
))
return
PyErr_Format
(
PyExc_TypeError
,
"RAND_egd() expected string, found %s"
,
Py_TYPE
(
arg
)
->
tp_name
);
bytes
=
RAND_egd
(
_PyUnicode_AsString
(
arg
));
if
(
!
PyArg_ParseTuple
(
args
,
"O&|i:RAND_egd"
,
PyUnicode_FSConverter
,
&
path
))
return
NULL
;
bytes
=
RAND_egd
(
PyBytes_AsString
(
path
));
Py_DECREF
(
path
);
if
(
bytes
==
-
1
)
{
PyErr_SetString
(
PySSLErrorObject
,
"EGD connection failed or EGD did not return "
...
...
@@ -1767,7 +1769,7 @@ static PyMethodDef PySSL_methods[] = {
#ifdef HAVE_OPENSSL_RAND
{
"RAND_add"
,
PySSL_RAND_add
,
METH_VARARGS
,
PySSL_RAND_add_doc
},
{
"RAND_egd"
,
PySSL_RAND_egd
,
METH_
O
,
{
"RAND_egd"
,
PySSL_RAND_egd
,
METH_
VARARGS
,
PySSL_RAND_egd_doc
},
{
"RAND_status"
,
(
PyCFunction
)
PySSL_RAND_status
,
METH_NOARGS
,
PySSL_RAND_status_doc
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment