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
1037d3ad
Commit
1037d3ad
authored
Oct 02, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Use StringRef for tls.ticket.files
parent
c4368a94
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
src/shrpx_config.cc
src/shrpx_config.cc
+2
-2
src/shrpx_config.h
src/shrpx_config.h
+2
-2
src/shrpx_config_test.cc
src/shrpx_config_test.cc
+4
-4
No files found.
src/shrpx_config.cc
View file @
1037d3ad
...
...
@@ -151,7 +151,7 @@ bool is_secure(const StringRef &filename) {
}
// namespace
std
::
unique_ptr
<
TicketKeys
>
read_tls_ticket_key_file
(
const
std
::
vector
<
std
::
string
>
&
files
,
read_tls_ticket_key_file
(
const
std
::
vector
<
StringRef
>
&
files
,
const
EVP_CIPHER
*
cipher
,
const
EVP_MD
*
hmac
)
{
auto
ticket_keys
=
make_unique
<
TicketKeys
>
();
auto
&
keys
=
ticket_keys
->
keys
;
...
...
@@ -2451,7 +2451,7 @@ int parse_config(Config *config, int optid, const StringRef &opt,
case
SHRPX_OPTID_LISTENER_DISABLE_TIMEOUT
:
return
parse_duration
(
&
config
->
conn
.
listener
.
timeout
.
sleep
,
opt
,
optarg
);
case
SHRPX_OPTID_TLS_TICKET_KEY_FILE
:
config
->
tls
.
ticket
.
files
.
push_back
(
optarg
.
str
(
));
config
->
tls
.
ticket
.
files
.
push_back
(
make_string_ref
(
config
->
balloc
,
optarg
));
return
0
;
case
SHRPX_OPTID_RLIMIT_NOFILE
:
{
int
n
;
...
...
src/shrpx_config.h
View file @
1037d3ad
...
...
@@ -470,7 +470,7 @@ struct TLSConfig {
int
family
;
bool
tls
;
}
memcached
;
std
::
vector
<
std
::
string
>
files
;
std
::
vector
<
StringRef
>
files
;
const
EVP_CIPHER
*
cipher
;
// true if --tls-ticket-key-cipher is used
bool
cipher_given
;
...
...
@@ -1006,7 +1006,7 @@ FILE *open_file_for_write(const char *filename);
// expected file size. This function returns TicketKey if it
// succeeds, or nullptr.
std
::
unique_ptr
<
TicketKeys
>
read_tls_ticket_key_file
(
const
std
::
vector
<
std
::
string
>
&
files
,
read_tls_ticket_key_file
(
const
std
::
vector
<
StringRef
>
&
files
,
const
EVP_CIPHER
*
cipher
,
const
EVP_MD
*
hmac
);
// Returns string representation of |proto|.
...
...
src/shrpx_config_test.cc
View file @
1037d3ad
...
...
@@ -173,8 +173,8 @@ void test_shrpx_config_read_tls_ticket_key_file(void) {
close
(
fd1
);
close
(
fd2
);
auto
ticket_keys
=
read_tls_ticket_key_file
({
file1
,
file2
},
EVP_aes_128_cbc
(),
EVP_sha256
());
auto
ticket_keys
=
read_tls_ticket_key_file
(
{
StringRef
{
file1
},
StringRef
{
file2
}
},
EVP_aes_128_cbc
(),
EVP_sha256
());
unlink
(
file1
);
unlink
(
file2
);
CU_ASSERT
(
ticket_keys
.
get
()
!=
nullptr
);
...
...
@@ -216,8 +216,8 @@ void test_shrpx_config_read_tls_ticket_key_file_aes_256(void) {
close
(
fd1
);
close
(
fd2
);
auto
ticket_keys
=
read_tls_ticket_key_file
({
file1
,
file2
},
EVP_aes_256_cbc
(),
EVP_sha256
());
auto
ticket_keys
=
read_tls_ticket_key_file
(
{
StringRef
{
file1
},
StringRef
{
file2
}
},
EVP_aes_256_cbc
(),
EVP_sha256
());
unlink
(
file1
);
unlink
(
file2
);
CU_ASSERT
(
ticket_keys
.
get
()
!=
nullptr
);
...
...
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