aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/pkcs11
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/pkcs11')
-rw-r--r--src/libstrongswan/plugins/pkcs11/pkcs11_hasher.c14
-rw-r--r--src/libstrongswan/plugins/pkcs11/pkcs11_plugin.c6
-rw-r--r--src/libstrongswan/plugins/pkcs11/pkcs11_private_key.c28
3 files changed, 28 insertions, 20 deletions
diff --git a/src/libstrongswan/plugins/pkcs11/pkcs11_hasher.c b/src/libstrongswan/plugins/pkcs11/pkcs11_hasher.c
index d61083626..6d327be40 100644
--- a/src/libstrongswan/plugins/pkcs11/pkcs11_hasher.c
+++ b/src/libstrongswan/plugins/pkcs11/pkcs11_hasher.c
@@ -300,12 +300,14 @@ pkcs11_hasher_t *pkcs11_hasher_create(hash_algorithm_t algo)
private_pkcs11_hasher_t *this;
INIT(this,
- .public.hasher = {
- .get_hash_size = _get_hash_size,
- .reset = _reset,
- .get_hash = _get_hash,
- .allocate_hash = _allocate_hash,
- .destroy = _destroy,
+ .public = {
+ .hasher = {
+ .get_hash_size = _get_hash_size,
+ .reset = _reset,
+ .get_hash = _get_hash,
+ .allocate_hash = _allocate_hash,
+ .destroy = _destroy,
+ },
},
.mutex = mutex_create(MUTEX_TYPE_DEFAULT),
);
diff --git a/src/libstrongswan/plugins/pkcs11/pkcs11_plugin.c b/src/libstrongswan/plugins/pkcs11/pkcs11_plugin.c
index 5e527f47a..86fce1bec 100644
--- a/src/libstrongswan/plugins/pkcs11/pkcs11_plugin.c
+++ b/src/libstrongswan/plugins/pkcs11/pkcs11_plugin.c
@@ -132,7 +132,11 @@ plugin_t *pkcs11_plugin_create()
CK_SLOT_ID slot;
INIT(this,
- .public.plugin.destroy = _destroy,
+ .public = {
+ .plugin = {
+ .destroy = _destroy,
+ },
+ },
.creds = linked_list_create(),
.mutex = mutex_create(MUTEX_TYPE_DEFAULT),
);
diff --git a/src/libstrongswan/plugins/pkcs11/pkcs11_private_key.c b/src/libstrongswan/plugins/pkcs11/pkcs11_private_key.c
index e51d0aae4..cabca3f54 100644
--- a/src/libstrongswan/plugins/pkcs11/pkcs11_private_key.c
+++ b/src/libstrongswan/plugins/pkcs11/pkcs11_private_key.c
@@ -531,19 +531,21 @@ pkcs11_private_key_t *pkcs11_private_key_connect(key_type_t type, va_list args)
}
INIT(this,
- .public.key = {
- .get_type = _get_type,
- .sign = _sign,
- .decrypt = _decrypt,
- .get_keysize = _get_keysize,
- .get_public_key = _get_public_key,
- .equals = private_key_equals,
- .belongs_to = private_key_belongs_to,
- .get_fingerprint = _get_fingerprint,
- .has_fingerprint = private_key_has_fingerprint,
- .get_encoding = _get_encoding,
- .get_ref = _get_ref,
- .destroy = _destroy,
+ .public = {
+ .key = {
+ .get_type = _get_type,
+ .sign = _sign,
+ .decrypt = _decrypt,
+ .get_keysize = _get_keysize,
+ .get_public_key = _get_public_key,
+ .equals = private_key_equals,
+ .belongs_to = private_key_belongs_to,
+ .get_fingerprint = _get_fingerprint,
+ .has_fingerprint = private_key_has_fingerprint,
+ .get_encoding = _get_encoding,
+ .get_ref = _get_ref,
+ .destroy = _destroy,
+ },
},
.ref = 1,
);