Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
ad150c3a
Commit
ad150c3a
authored
May 31, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fwiesel-client_certificate'
parents
3d59c6c0
7eafebfe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
python/nghttp2.pyx
python/nghttp2.pyx
+17
-0
No files found.
python/nghttp2.pyx
View file @
ad150c3a
...
...
@@ -698,6 +698,7 @@ cdef class _HTTP2SessionCoreBase:
handler
.
stream_id
=
stream_id
handler
.
http2
=
self
handler
.
remote_address
=
self
.
_get_remote_address
()
handler
.
client_certificate
=
self
.
_get_client_certificate
()
self
.
handlers
.
add
(
handler
)
def
_rst_stream
(
self
,
stream_id
,
...
...
@@ -713,6 +714,13 @@ cdef class _HTTP2SessionCoreBase:
def
_get_remote_address
(
self
):
return
self
.
transport
.
get_extra_info
(
'peername'
)
def
_get_client_certificate
(
self
):
sock
=
self
.
transport
.
get_extra_info
(
'socket'
)
try
:
return
sock
.
getpeercert
()
except
AttributeError
:
return
None
def
_start_settings_timer
(
self
):
loop
=
asyncio
.
get_event_loop
()
self
.
settings_timer
=
loop
.
call_later
(
self
.
SETTINGS_TIMEOUT
,
...
...
@@ -1030,6 +1038,9 @@ if asyncio:
Contains a tuple of the form (host, port) referring to the client's
address.
client_certificate
May contain the client certifcate in its non-binary form
stream_id
Stream ID of this stream
...
...
@@ -1058,6 +1069,8 @@ if asyncio:
self
.
http2
=
http2
# address of the client
self
.
remote_address
=
self
.
http2
.
_get_remote_address
()
# certificate of the client
self
.
_client_certificate
=
self
.
http2
.
_get_client_certificate
()
# :scheme header field in request
self
.
scheme
=
None
# :method header field in request
...
...
@@ -1075,6 +1088,10 @@ if asyncio:
def
client_address
(
self
):
return
self
.
remote_address
@
property
def
client_certificate
(
self
):
return
self
.
_client_certificate
def
on_headers
(
self
):
'''Called when request HEADERS is arrived.
...
...
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