Refactored tests for security core: introduced generic wrappers for security plugins and
updated plugin loading tests to use these instead of specific wrappers per test. Added test for securing communication ad handshake fail (using different identity CAs) Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
This commit is contained in:
parent
323de40cba
commit
1cf472ea06
62 changed files with 5335 additions and 7813 deletions
|
@ -123,6 +123,8 @@ struct reader_sec_attributes {
|
|||
|
||||
struct dds_security_authentication *q_omg_participant_get_authentication(const struct participant *pp);
|
||||
|
||||
DDS_EXPORT struct dds_security_cryptography *q_omg_participant_get_cryptography(const struct participant *pp);
|
||||
|
||||
void q_omg_log_exception(const struct ddsrt_log_cfg *lc, uint32_t cat, DDS_Security_SecurityException *exception, const char *file, uint32_t line, const char *func, const char *fmt, ...);
|
||||
|
||||
/**
|
||||
|
@ -1083,7 +1085,6 @@ void q_omg_security_deinit( struct ddsi_domaingv *gv );
|
|||
|
||||
bool q_omg_is_security_loaded( struct dds_security_context *sc );
|
||||
|
||||
|
||||
#else /* DDSI_INCLUDE_SECURITY */
|
||||
|
||||
#include "dds/ddsi/q_unused.h"
|
||||
|
|
|
@ -559,6 +559,13 @@ get_first_matched_proxypp_crypto_handle(struct participant_sec_attributes *attr)
|
|||
return handle;
|
||||
}
|
||||
|
||||
struct dds_security_cryptography *q_omg_participant_get_cryptography(const struct participant *pp)
|
||||
{
|
||||
if (pp && pp->e.gv->security_context && q_omg_is_security_loaded(pp->e.gv->security_context))
|
||||
return pp->e.gv->security_context->crypto_context;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool q_omg_is_security_loaded (dds_security_context *sc)
|
||||
{
|
||||
return (sc->crypto_context != NULL || sc->authentication_context != NULL || sc->access_control_context != NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue