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
64fcac48
Commit
64fcac48
authored
Feb 16, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shrpx: Fix bug in building certificate lookup tree
parent
c8167234
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
src/shrpx_ssl.cc
src/shrpx_ssl.cc
+5
-1
src/shrpx_ssl_test.cc
src/shrpx_ssl_test.cc
+2
-1
No files found.
src/shrpx_ssl.cc
View file @
64fcac48
...
...
@@ -587,7 +587,11 @@ void cert_lookup_tree_add_cert(CertLookupTree *lt, CertNode *node,
cn
->
str
[
i
]
==
hostname
[
j
];
--
i
,
--
j
);
if
(
i
==
cn
->
last
)
{
if
(
j
==
-
1
)
{
// same hostname, we don't overwrite exiting ssl_ctx
if
(
cn
->
ssl_ctx
)
{
// same hostname, we don't overwrite exiting ssl_ctx
}
else
{
cn
->
ssl_ctx
=
ssl_ctx
;
}
}
else
{
// The existing hostname is a suffix of this hostname.
// Continue matching at potion j.
...
...
src/shrpx_ssl_test.cc
View file @
64fcac48
...
...
@@ -96,9 +96,10 @@ void test_shrpx_ssl_create_lookup_tree(void)
}
SSL_CTX
*
ctxs2
[]
=
{
SSL_CTX_new
(
TLSv1_method
()),
SSL_CTX_new
(
TLSv1_method
()),
SSL_CTX_new
(
TLSv1_method
()),
SSL_CTX_new
(
TLSv1_method
())};
const
char
*
names
[]
=
{
"rab"
,
"zab"
,
"zzub"
};
const
char
*
names
[]
=
{
"rab"
,
"zab"
,
"zzub"
,
"ab"
};
num
=
sizeof
(
ctxs2
)
/
sizeof
(
ctxs2
[
0
]);
tree
=
ssl
::
cert_lookup_tree_new
();
for
(
int
i
=
0
;
i
<
num
;
++
i
)
{
...
...
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