aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/padlock
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/padlock')
-rw-r--r--src/libstrongswan/plugins/padlock/padlock_aes_crypter.c18
-rw-r--r--src/libstrongswan/plugins/padlock/padlock_plugin.c6
-rw-r--r--src/libstrongswan/plugins/padlock/padlock_rng.c10
-rw-r--r--src/libstrongswan/plugins/padlock/padlock_sha1_hasher.c14
4 files changed, 29 insertions, 19 deletions
diff --git a/src/libstrongswan/plugins/padlock/padlock_aes_crypter.c b/src/libstrongswan/plugins/padlock/padlock_aes_crypter.c
index bbeef549d..06c20292f 100644
--- a/src/libstrongswan/plugins/padlock/padlock_aes_crypter.c
+++ b/src/libstrongswan/plugins/padlock/padlock_aes_crypter.c
@@ -177,14 +177,16 @@ padlock_aes_crypter_t *padlock_aes_crypter_create(encryption_algorithm_t algo,
}
INIT(this,
- .public.crypter = {
- .encrypt = _encrypt,
- .decrypt = _decrypt,
- .get_block_size = _get_block_size,
- .get_iv_size = _get_iv_size,
- .get_key_size = _get_key_size,
- .set_key = _set_key,
- .destroy = _destroy,
+ .public = {
+ .crypter = {
+ .encrypt = _encrypt,
+ .decrypt = _decrypt,
+ .get_block_size = _get_block_size,
+ .get_iv_size = _get_iv_size,
+ .get_key_size = _get_key_size,
+ .set_key = _set_key,
+ .destroy = _destroy,
+ },
},
.key = chunk_alloc(key_size),
);
diff --git a/src/libstrongswan/plugins/padlock/padlock_plugin.c b/src/libstrongswan/plugins/padlock/padlock_plugin.c
index d8461089a..027c53c7b 100644
--- a/src/libstrongswan/plugins/padlock/padlock_plugin.c
+++ b/src/libstrongswan/plugins/padlock/padlock_plugin.c
@@ -134,7 +134,11 @@ plugin_t *padlock_plugin_create()
private_padlock_plugin_t *this;
INIT(this,
- .public.plugin.destroy = _destroy,
+ .public = {
+ .plugin = {
+ .destroy = _destroy,
+ },
+ },
.features = get_padlock_features(),
);
diff --git a/src/libstrongswan/plugins/padlock/padlock_rng.c b/src/libstrongswan/plugins/padlock/padlock_rng.c
index 2f26a3afb..3d805df9d 100644
--- a/src/libstrongswan/plugins/padlock/padlock_rng.c
+++ b/src/libstrongswan/plugins/padlock/padlock_rng.c
@@ -104,10 +104,12 @@ padlock_rng_t *padlock_rng_create(rng_quality_t quality)
private_padlock_rng_t *this;
INIT(this,
- .public.rng = {
- .get_bytes = _get_bytes,
- .allocate_bytes = _allocate_bytes,
- .destroy = _destroy,
+ .public = {
+ .rng = {
+ .get_bytes = _get_bytes,
+ .allocate_bytes = _allocate_bytes,
+ .destroy = _destroy,
+ },
},
);
diff --git a/src/libstrongswan/plugins/padlock/padlock_sha1_hasher.c b/src/libstrongswan/plugins/padlock/padlock_sha1_hasher.c
index ed331d9b3..66a077353 100644
--- a/src/libstrongswan/plugins/padlock/padlock_sha1_hasher.c
+++ b/src/libstrongswan/plugins/padlock/padlock_sha1_hasher.c
@@ -150,12 +150,14 @@ padlock_sha1_hasher_t *padlock_sha1_hasher_create(hash_algorithm_t algo)
return NULL;
}
INIT(this,
- .public.hasher = {
- .get_hash = _get_hash,
- .allocate_hash = _allocate_hash,
- .get_hash_size = _get_hash_size,
- .reset = _reset,
- .destroy = _destroy,
+ .public = {
+ .hasher = {
+ .get_hash = _get_hash,
+ .allocate_hash = _allocate_hash,
+ .get_hash_size = _get_hash_size,
+ .reset = _reset,
+ .destroy = _destroy,
+ },
},
);
return &this->public;