-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OSSM-5001 Many additions & fixes (WIP)
2 tests fail to build 3 tests fail to pass Signed-off-by: Ted Poole <tpoole@redhat.com>
- Loading branch information
Showing
48 changed files
with
537 additions
and
134 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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
#include <openssl/ssl.h> | ||
#include "log.h" | ||
|
||
|
||
extern "C" void SSL_CTX_set_custom_verify(SSL_CTX *ctx, int mode, | ||
enum ssl_verify_result_t (*callback)(SSL *ssl, uint8_t *out_alert)) { | ||
bssl_compat_fatal("SSL_CTX_set_custom_verify() is not implemented"); | ||
} |
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,7 @@ | ||
#include <openssl/ssl.h> | ||
#include "log.h" | ||
|
||
|
||
extern "C" void SSL_CTX_set_private_key_method(SSL_CTX *ctx, const SSL_PRIVATE_KEY_METHOD *key_method) { | ||
bssl_compat_fatal("SSL_CTX_set_private_key_method() is not implemented"); | ||
} |
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,7 @@ | ||
#include <openssl/ssl.h> | ||
#include "log.h" | ||
|
||
|
||
extern "C" void SSL_CTX_set_reverify_on_resume(SSL_CTX *ctx, int enabled) { | ||
bssl_compat_fatal("SSL_CTX_set_reverify_on_resume() is not implemented"); | ||
} |
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,15 @@ | ||
#include <openssl/ssl.h> | ||
#include <ossl.h> | ||
|
||
|
||
// NOTE: OpenSSL interprets the verify depth differently to BoringSSL. BoringSSL excludes the leaf | ||
// cert from the verify depth calculation, whereas OpenSSL excludes the leaf AND root cert | ||
// from the verify depth calculation. Therefore, when passing the depth parameter to OpenSSL | ||
// we need to subtract 1 from it. See the following 2 links for relevant documentation: | ||
// | ||
// https://www.openssl.org/docs/man3.0/man3/SSL_CTX_set_verify_depth.html | ||
// https://github.com/google/boringssl/blob/ca1690e221677cea3fb946f324eb89d846ec53f2/include/openssl/ssl.h#L2493-L2496 | ||
|
||
void SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth) { | ||
return ossl.ossl_SSL_CTX_set_verify_depth(ctx, depth - 1); | ||
} |
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,8 @@ | ||
#include <openssl/ssl.h> | ||
#include "log.h" | ||
|
||
|
||
extern "C" int SSL_send_fatal_alert(SSL *ssl, uint8_t alert) { | ||
bssl_compat_fatal("SSL_send_fatal_alert() is not implemented"); | ||
return -1; | ||
} |
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 was deleted.
Oops, something went wrong.
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,17 @@ | ||
#include <openssl/x509.h> | ||
#include <ossl.h> | ||
|
||
|
||
/** | ||
* This implementats some mappings only where necessary to support Envoy | ||
*/ | ||
const char *X509_verify_cert_error_string(long err) { | ||
switch(err) { | ||
case X509_V_ERR_UNSPECIFIED: { | ||
return "unknown certificate verification error"; | ||
} | ||
default: { | ||
return ossl.ossl_X509_verify_cert_error_string(err); | ||
} | ||
} | ||
} |
Oops, something went wrong.