-
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.
add function to configure SSL context
- Loading branch information
1 parent
7fb2c53
commit c987d98
Showing
7 changed files
with
49 additions
and
10 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
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,21 @@ | ||
// | ||
// Created by Nevermore on 2024/7/6. | ||
// example HttpsHelper | ||
// Copyright (c) 2024 Nevermore All rights reserved. | ||
// | ||
#if ENABLE_HTTPS | ||
#pragma once | ||
#include <openssl/ssl.h> | ||
|
||
namespace http { | ||
|
||
using SSLPtr = std::unique_ptr<SSL, decltype(&SSL_free)>; | ||
using SSLContextPtr = std::unique_ptr<SSL_CTX, decltype(&SSL_CTX_free)>; | ||
|
||
class HttpsHelper { | ||
public: | ||
static std::function<void(SSLContextPtr&)> configContext; | ||
}; | ||
|
||
} //end of namespace http | ||
#endif //end ENABLE_HTTPS |
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