forked from trafficserver-doc-ja/trafficserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into quic-latest
* master: Implement TLSBasicSupport for QUICNetVC (apache#7959) Reload server session inactivity timeout before placing a session into the pool (apache#7618) Use OpeSSL EVP API if SHA1 API is unavailable (cache_promote) (apache#7447) Cleanup: Get rid of HTTP2_SESSION_EVENT_RECV (apache#7879) Timing and permissions update for regex_revalidate test (apache#7998) limit m_current_range to max value in RangeTransform (apache#4843) Allow to TLS handshake to error out on TSVConnReenable (apache#7994) Cleanup: Get rid of HTTP2_SESSION_EVENT_INIT (apache#7878) Add hook for loading certificate and key data from plugin (apache#6609) Doc: Now's Minute invocation error (apache#7990) Fix typo in configure.ac (apache#7993)
- Loading branch information
Showing
39 changed files
with
2,198 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
.. Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed | ||
with this work for additional information regarding copyright | ||
ownership. The ASF licenses this file to you under the Apache | ||
License, Version 2.0 (the "License"); you may not use this file | ||
except in compliance with the License. You may obtain a copy of | ||
the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
implied. See the License for the specific language governing | ||
permissions and limitations under the License. | ||
.. include:: /common.defs | ||
|
||
.. default-domain:: c | ||
|
||
TSSslSecretSet | ||
************** | ||
|
||
Set the data associated with a secret name specified in the config. | ||
|
||
Synopsis | ||
======== | ||
|
||
.. code-block:: cpp | ||
#include <ts/ts.h> | ||
.. function:: TSReturnCode TSSslSecretSet(const char * secret_name, int secret_name_length, const char * secret_data, int secret_data_len) | ||
|
||
Description | ||
=========== | ||
|
||
:func:`TSSslSecretSet` updates the current secret map. Generally the secret name corresponds to the name of a certificate or a key. | ||
Future creation of SSL_CTX objects that use the secret will use the newly specified data. It can be useful to call this function | ||
from the :data:`TS_LIFECYCLE_SSL_SECRET_HOOK`. | ||
|
||
TSSslSecretGet | ||
************** | ||
|
||
Get the data associated with a secret name specified in the config. | ||
|
||
Synopsis | ||
======== | ||
|
||
.. code-block:: cpp | ||
#include <ts/ts.h> | ||
.. function:: TSReturnCode TSSslSecretGet(const char * secret_name, int secret_name_length, const char ** secret_data_return, int * secret_data_len) | ||
|
||
Description | ||
=========== | ||
|
||
:func:`TSSslSecretGet` fetches the named secret from the current secret map. TS_ERROR is returned if there is no entry for the secret. | ||
|
||
TSSslSecretUpdate | ||
***************** | ||
|
||
Tell |TS| to update the SSL objects dependent on the secret. | ||
|
||
Synopsis | ||
======== | ||
|
||
.. code-block:: cpp | ||
#include <ts/ts.h> | ||
.. function:: TSReturnCode TSSslSecretGet(const char * secret_name, int secret_name_length) | ||
|
||
Description | ||
=========== | ||
|
||
:func:`TSSslSecretUpdate` causes |TS| to update the SSL objects that depend on the specified secret. This enables a plugin to look for | ||
multiple secret updates and make calls to :func:`TSSslSecretSet` to update the secret table. Then once everything is updated call | ||
:func:`TSSslSecretUpdate` to update the SSL objects with a consistent updated set of secrets. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** @file | ||
@section license License | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
class SSLSecret | ||
{ | ||
public: | ||
SSLSecret() {} | ||
bool getSecret(const std::string &name, std::string_view &data) const; | ||
bool setSecret(const std::string &name, const char *data, int data_len); | ||
bool getOrLoadSecret(const std::string &name, const std::string &name2, std::string_view &data, std::string_view &data2); | ||
|
||
private: | ||
const std::string *getSecretItem(const std::string &name) const; | ||
bool loadSecret(const std::string &name, const std::string &name2, std::string &data_item, std::string &data_item2); | ||
bool loadFile(const std::string &name, std::string &data_item); | ||
|
||
std::unordered_map<std::string, std::string> secret_map; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.