]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Use a seperate section for each nested struct member in INIT macro
authorMartin Willi <martin@revosec.ch>
Wed, 18 Aug 2010 10:15:03 +0000 (12:15 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 18 Aug 2010 10:15:03 +0000 (12:15 +0200)
77 files changed:
src/libcharon/network/receiver.c
src/libcharon/plugins/addrblock/addrblock_plugin.c
src/libcharon/plugins/android/android_plugin.c
src/libcharon/plugins/dhcp/dhcp_plugin.c
src/libcharon/plugins/eap_identity/eap_identity.c
src/libcharon/plugins/eap_identity/eap_identity.h
src/libcharon/plugins/eap_md5/eap_md5.c
src/libcharon/plugins/eap_md5/eap_md5.h
src/libcharon/plugins/eap_radius/eap_radius.c
src/libcharon/plugins/eap_radius/eap_radius.h
src/libcharon/plugins/eap_radius/eap_radius_plugin.c
src/libcharon/plugins/eap_simaka_sql/eap_simaka_sql_plugin.c
src/libcharon/plugins/eap_tls/eap_tls.c
src/libcharon/plugins/eap_tls/eap_tls_plugin.c
src/libcharon/plugins/eap_ttls/eap_ttls.c
src/libcharon/plugins/eap_ttls/eap_ttls_peer.c
src/libcharon/plugins/eap_ttls/eap_ttls_plugin.c
src/libcharon/plugins/eap_ttls/eap_ttls_server.c
src/libcharon/plugins/farp/farp_plugin.c
src/libcharon/plugins/ha/ha_plugin.c
src/libcharon/plugins/kernel_klips/kernel_klips_ipsec.c
src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
src/libcharon/plugins/socket_default/socket_default_plugin.c
src/libcharon/plugins/socket_dynamic/socket_dynamic_plugin.c
src/libcharon/plugins/socket_raw/socket_raw_plugin.c
src/libcharon/processing/jobs/inactivity_job.c
src/libcharon/sa/authenticators/eap_authenticator.c
src/libcharon/sa/tasks/ike_vendor.c
src/libstrongswan/plugins/aes/aes_crypter.c
src/libstrongswan/plugins/aes/aes_plugin.c
src/libstrongswan/plugins/agent/agent_plugin.c
src/libstrongswan/plugins/agent/agent_private_key.c
src/libstrongswan/plugins/blowfish/blowfish_crypter.c
src/libstrongswan/plugins/blowfish/blowfish_plugin.c
src/libstrongswan/plugins/ctr/ctr_ipsec_crypter.c
src/libstrongswan/plugins/ctr/ctr_plugin.c
src/libstrongswan/plugins/curl/curl_fetcher.c
src/libstrongswan/plugins/des/des_crypter.c
src/libstrongswan/plugins/des/des_plugin.c
src/libstrongswan/plugins/gcrypt/gcrypt_crypter.c
src/libstrongswan/plugins/gcrypt/gcrypt_dh.c
src/libstrongswan/plugins/gcrypt/gcrypt_hasher.c
src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c
src/libstrongswan/plugins/gcrypt/gcrypt_rng.c
src/libstrongswan/plugins/gcrypt/gcrypt_rsa_private_key.c
src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c
src/libstrongswan/plugins/gmp/gmp_diffie_hellman.c
src/libstrongswan/plugins/gmp/gmp_plugin.c
src/libstrongswan/plugins/gmp/gmp_rsa_private_key.c
src/libstrongswan/plugins/gmp/gmp_rsa_public_key.c
src/libstrongswan/plugins/hmac/hmac_plugin.c
src/libstrongswan/plugins/hmac/hmac_prf.c
src/libstrongswan/plugins/hmac/hmac_signer.c
src/libstrongswan/plugins/openssl/openssl_crypter.c
src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c
src/libstrongswan/plugins/openssl/openssl_ec_diffie_hellman.c
src/libstrongswan/plugins/openssl/openssl_ec_private_key.c
src/libstrongswan/plugins/openssl/openssl_ec_public_key.c
src/libstrongswan/plugins/openssl/openssl_hasher.c
src/libstrongswan/plugins/openssl/openssl_plugin.c
src/libstrongswan/plugins/openssl/openssl_rsa_private_key.c
src/libstrongswan/plugins/openssl/openssl_rsa_public_key.c
src/libstrongswan/plugins/openssl/openssl_sha1_prf.c
src/libstrongswan/plugins/padlock/padlock_aes_crypter.c
src/libstrongswan/plugins/padlock/padlock_plugin.c
src/libstrongswan/plugins/padlock/padlock_rng.c
src/libstrongswan/plugins/padlock/padlock_sha1_hasher.c
src/libstrongswan/plugins/pkcs11/pkcs11_hasher.c
src/libstrongswan/plugins/pkcs11/pkcs11_plugin.c
src/libstrongswan/plugins/pkcs11/pkcs11_private_key.c
src/libstrongswan/plugins/revocation/revocation_plugin.c
src/libstrongswan/plugins/xcbc/xcbc_plugin.c
src/libstrongswan/plugins/xcbc/xcbc_prf.c
src/libstrongswan/plugins/xcbc/xcbc_signer.c
src/libtls/tls_peer.c
src/libtls/tls_server.c

index 63a8cab5896cc9b9fe46c705ea772368e3648c21..b53dea40852ddafb81d454feabe9c5d1c5b45d9a 100644 (file)
@@ -383,7 +383,9 @@ receiver_t *receiver_create()
        u_int32_t now = time_monotonic(NULL);
 
        INIT(this,
-               .public.destroy = _destroy,
+               .public = {
+                       .destroy = _destroy,
+               },
                .secret_switch = now,
                .secret_offset = random() % now,
        );
index 1c407035d023a4fa848e6eb99b357a414f6a2418..5fdb36c5c97be03919b4bb2bbfa47e76cda31058 100644 (file)
@@ -61,7 +61,11 @@ plugin_t *addrblock_plugin_create()
        private_addrblock_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
                .validator = addrblock_validator_create(),
                .narrower = addrblock_narrow_create(),
        );
index e2c8572efa4836f996372f4883bd3050aca8b276..3d82d8f609209032ea0a360e5bfb7531b8789fcc 100644 (file)
@@ -79,8 +79,10 @@ plugin_t *android_plugin_create()
        private_android_plugin_t *this;
 
        INIT(this,
-               .public.plugin = {
-                       .destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
                },
                .logger = android_logger_create(),
                .handler = android_handler_create(),
index 829fd63560813b0f58fa43bc848ea918666982e6..fccc99ba58a21ef07c9b957cbed264d7055e97a2 100644 (file)
@@ -62,7 +62,11 @@ plugin_t *dhcp_plugin_create()
        private_dhcp_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
                .socket = dhcp_socket_create(),
        );
 
index 01998e8434d6da1a8abc949f031d3da7bd3538f2..03066b2f8310a4ba531ab962c6273fd06e4153cd 100644 (file)
@@ -157,7 +157,7 @@ eap_identity_t *eap_identity_create_peer(identification_t *server,
 
        INIT(this,
                .public =  {
-                       .eap_method_interface = {
+                       .eap_method = {
                                .initiate = _initiate_peer,
                                .process = _process_peer,
                                .get_type = _get_type,
@@ -182,13 +182,15 @@ eap_identity_t *eap_identity_create_server(identification_t *server,
        private_eap_identity_t *this;
 
        INIT(this,
-               .public.eap_method_interface = {
-                       .initiate = _initiate_server,
-                       .process = _process_server,
-                       .get_type = _get_type,
-                       .is_mutual = _is_mutual,
-                       .get_msk = _get_msk,
-                       .destroy = _destroy,
+               .public = {
+                       .eap_method = {
+                               .initiate = _initiate_server,
+                               .process = _process_server,
+                               .get_type = _get_type,
+                               .is_mutual = _is_mutual,
+                               .get_msk = _get_msk,
+                               .destroy = _destroy,
+                       },
                },
                .peer = peer->clone(peer),
                .identity = chunk_empty,
index 7364a8bda1a50988d1c052a8e95341ac1efdba57..9a7f2857490388ad96c8bdca26ee292b57cf8997 100644 (file)
@@ -33,7 +33,7 @@ struct eap_identity_t {
        /**
         * Implemented eap_method_t interface.
         */
-       eap_method_t eap_method_interface;
+       eap_method_t eap_method;
 };
 
 /**
index a74151ac133f5a5a3e78b5c9df4f93f4a4e2c0cf..f70754abbdfcfbe3b5dfe418301a9b45ad90d603 100644 (file)
@@ -236,7 +236,7 @@ eap_md5_t *eap_md5_create_server(identification_t *server, identification_t *pee
 
        INIT(this,
                .public = {
-                       .eap_method_interface = {
+                       .eap_method = {
                                .initiate = _initiate_server,
                                .process = _process_server,
                                .get_type = _get_type,
@@ -247,8 +247,6 @@ eap_md5_t *eap_md5_create_server(identification_t *server, identification_t *pee
                },
                .peer = peer->clone(peer),
                .server = server->clone(server),
-               .challenge = chunk_empty,
-               .identifier = 0,
        );
 
        /* generate a non-zero identifier */
@@ -267,18 +265,18 @@ eap_md5_t *eap_md5_create_peer(identification_t *server, identification_t *peer)
        private_eap_md5_t *this;
 
        INIT(this,
-               .public.eap_method_interface = {
-                       .initiate = _initiate_peer,
-                       .process = _process_peer,
-                       .get_type = _get_type,
-                       .is_mutual = _is_mutual,
-                       .get_msk = _get_msk,
-                       .destroy = _destroy,
+               .public = {
+                       .eap_method = {
+                               .initiate = _initiate_peer,
+                               .process = _process_peer,
+                               .get_type = _get_type,
+                               .is_mutual = _is_mutual,
+                               .get_msk = _get_msk,
+                               .destroy = _destroy,
+                       },
                },
                .peer = peer->clone(peer),
                .server = server->clone(server),
-               .challenge = chunk_empty,
-               .identifier = 0,
        );
 
        return &this->public;
index 3cff0dd79449bd2147b21fe5361599077a21fe39..c6687149a919373dde247b1a1b563c686a423dda 100644 (file)
@@ -33,7 +33,7 @@ struct eap_md5_t {
        /**
         * Implemented eap_method_t interface.
         */
-       eap_method_t eap_method_interface;
+       eap_method_t eap_method;
 };
 
 /**
index 65b868bc6ded7a6ec76633460878185bee3efebc..340eb6024edefedc24061f177f3b8143d20bd853 100644 (file)
@@ -313,13 +313,15 @@ eap_radius_t *eap_radius_create(identification_t *server, identification_t *peer
        private_eap_radius_t *this;
 
        INIT(this,
-               .public.eap_method_interface = {
-                       .initiate = _initiate,
-                       .process = _process,
-                       .get_type = _get_type,
-                       .is_mutual = _is_mutual,
-                       .get_msk = _get_msk,
-                       .destroy = _destroy,
+               .public = {
+                       .eap_method = {
+                               .initiate = _initiate,
+                               .process = _process,
+                               .get_type = _get_type,
+                               .is_mutual = _is_mutual,
+                               .get_msk = _get_msk,
+                               .destroy = _destroy,
+                       },
                },
                /* initially EAP_RADIUS, but is set to the method selected by RADIUS */
                .type = EAP_RADIUS,
index 8eb9e8c2d635970ee394d7857017d9b0c5c8e00f..e98cb06e30ea22e3fa8c93d9d709ae25125ce4da 100644 (file)
@@ -33,7 +33,7 @@ struct eap_radius_t {
        /**
         * Implemented eap_method_t interface.
         */
-       eap_method_t eap_method_interface;
+       eap_method_t eap_method;
 };
 
 /**
index 91aae2f622958277a93c428a87a122ed36c65528..1c24d77d5f4034cccd5aa6f5ebf3f84f571ca003 100644 (file)
@@ -151,7 +151,11 @@ plugin_t *eap_radius_plugin_create()
        private_eap_radius_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
                .servers = linked_list_create(),
        );
 
index 0f53197925ef69c28530110bed4282c0c7b6b234..1cc5352d8fdfa9751eab4f7e6001c4329eb02d59 100644 (file)
@@ -85,8 +85,10 @@ plugin_t *eap_simaka_sql_plugin_create()
                                                        "charon.plugins.eap-simaka-sql.remove_used", FALSE);
 
        INIT(this,
-               .public.plugin =  {
-                       .destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
                },
                .db = db,
                .provider = eap_simaka_sql_provider_create(db, remove_used),
index 849f038758cc6be436bfd75e137e279a05355645..ac835c795172266e25dfcaa8aa327ce4ba345fb7 100644 (file)
@@ -422,13 +422,15 @@ static eap_tls_t *eap_tls_create(identification_t *server,
        private_eap_tls_t *this;
 
        INIT(this,
-               .public.eap_method = {
-                       .initiate = _initiate,
-                       .process = _process,
-                       .get_type = _get_type,
-                       .is_mutual = _is_mutual,
-                       .get_msk = _get_msk,
-                       .destroy = _destroy,
+               .public = {
+                       .eap_method = {
+                               .initiate = _initiate,
+                               .process = _process,
+                               .get_type = _get_type,
+                               .is_mutual = _is_mutual,
+                               .get_msk = _get_msk,
+                               .destroy = _destroy,
+                       },
                },
                .is_server = is_server,
        );
index 15165d99fdbc8f211fbf2e16b9215fdac448e548..a7c040bf4e03c06114f5d9ece380349a3f885fe0 100644 (file)
@@ -38,7 +38,9 @@ plugin_t *eap_tls_plugin_create()
        eap_tls_plugin_t *this;
 
        INIT(this,
-               .plugin.destroy = _destroy,
+               .plugin = {
+                       .destroy = _destroy,
+               },
        );
 
        charon->eap->add_method(charon->eap, EAP_TLS, 0, EAP_SERVER,
index ad3360dee32a5c00c73c4d75cc1010395d1d3431..ccc326e14660da487fc1e1087d2e1fa95fac2724 100644 (file)
@@ -431,13 +431,15 @@ static eap_ttls_t *eap_ttls_create(identification_t *server,
        private_eap_ttls_t *this;
 
        INIT(this,
-               .public.eap_method = {
-                       .initiate = _initiate,
-                       .process = _process,
-                       .get_type = _get_type,
-                       .is_mutual = _is_mutual,
-                       .get_msk = _get_msk,
-                       .destroy = _destroy,
+               .public = {
+                       .eap_method = {
+                               .initiate = _initiate,
+                               .process = _process,
+                               .get_type = _get_type,
+                               .is_mutual = _is_mutual,
+                               .get_msk = _get_msk,
+                               .destroy = _destroy,
+                       },
                },
                .is_server = is_server,
        );
index b675d9ab4d4ad17e1918eab1cab47d17e1eb1867..cbed4d12d3efb20532279e5a87bf8d83d8674fc6 100644 (file)
@@ -49,12 +49,12 @@ struct private_eap_ttls_peer_t {
        bool start_phase2;
 
        /**
-     * Current phase 2 EAP method 
+     * Current phase 2 EAP method
         */
        eap_method_t *method;
 
        /**
-     * Pending outbound EAP message 
+     * Pending outbound EAP message
         */
        eap_payload_t *out;
 
@@ -123,7 +123,7 @@ METHOD(tls_application_t, process, status_t,
                        return NEED_MORE;
                }
        }
-               
+
        type = this->method->get_type(this->method, &vendor);
 
        if (type != received_type || vendor != received_vendor)
@@ -156,7 +156,7 @@ METHOD(tls_application_t, process, status_t,
                                DBG1(DBG_IKE, "%N method failed", eap_type_names, type);
                        }
                        return FAILED;
-       }               
+       }
 }
 
 METHOD(tls_application_t, build, status_t,
@@ -220,16 +220,16 @@ eap_ttls_peer_t *eap_ttls_peer_create(identification_t *server,
        private_eap_ttls_peer_t *this;
 
        INIT(this,
-               .public.application = {
-                       .process = _process,
-                       .build = _build,
-                       .destroy = _destroy,
+               .public = {
+                       .application = {
+                               .process = _process,
+                               .build = _build,
+                               .destroy = _destroy,
+                       },
                },
                .server = server->clone(server),
                .peer = peer->clone(peer),
                .start_phase2 = TRUE,
-               .method = NULL,
-               .out = NULL,
                .avp = eap_ttls_avp_create(),
        );
 
index 642e004fe58c3e3644d4dd13ef374d91c4e813ce..48e759dcc5d0b0d0ad6260a4500d4fee77522f01 100644 (file)
@@ -38,7 +38,9 @@ plugin_t *eap_ttls_plugin_create()
        eap_ttls_plugin_t *this;
 
        INIT(this,
-               .plugin.destroy = _destroy,
+               .plugin = {
+                       .destroy = _destroy,
+               },
        );
 
        charon->eap->add_method(charon->eap, EAP_TTLS, 0, EAP_SERVER,
index 8401f85b2ba1c0e991bc33291bfc2a1e37ee182a..94fd555eb459a247b9826fa2b0e5334eed2f0efd 100644 (file)
@@ -49,12 +49,12 @@ struct private_eap_ttls_server_t {
        bool start_phase2;
 
        /**
-     * Current phase 2 EAP method 
+     * Current phase 2 EAP method
         */
        eap_method_t *method;
 
        /**
-     * Pending outbound EAP message 
+     * Pending outbound EAP message
         */
        eap_payload_t *out;
 
@@ -118,7 +118,7 @@ METHOD(tls_application_t, process, status_t,
                        return FAILED;
                }
        }
-               
+
        if (!received_vendor && received_type == EAP_IDENTITY)
        {
                chunk_t eap_id;
@@ -184,7 +184,7 @@ METHOD(tls_application_t, process, status_t,
                        return FAILED;
                }
        }
-               
+
        if (this->method == 0)
        {
                DBG1(DBG_IKE, "no %N phase2 method installed", eap_type_names, EAP_TTLS);
@@ -194,7 +194,7 @@ METHOD(tls_application_t, process, status_t,
 
        status = this->method->process(this->method, in, &this->out);
        in->destroy(in);
-       
+
        switch (status)
        {
                case SUCCESS:
@@ -218,7 +218,7 @@ METHOD(tls_application_t, process, status_t,
                                DBG1(DBG_IKE, "%N method failed", eap_type_names, type);
                        }
                        return FAILED;
-       }               
+       }
        return status;
 }
 
@@ -285,16 +285,16 @@ eap_ttls_server_t *eap_ttls_server_create(identification_t *server,
        private_eap_ttls_server_t *this;
 
        INIT(this,
-               .public.application = {
-                       .process = _process,
-                       .build = _build,
-                       .destroy = _destroy,
+               .public = {
+                       .application = {
+                               .process = _process,
+                               .build = _build,
+                               .destroy = _destroy,
+                       },
                },
                .server = server->clone(server),
                .peer = peer->clone(peer),
                .start_phase2 = TRUE,
-               .method = NULL,
-               .out = NULL,
                .avp = eap_ttls_avp_create(),
        );
 
index 01c2a39c8bd081c7f5f510582d714fd21e36d816..d83bc1fd2bb27c1f42814753508500c6dec5e745 100644 (file)
@@ -60,7 +60,11 @@ plugin_t *farp_plugin_create()
        private_farp_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
                .listener = farp_listener_create(),
        );
 
index e722b4f3a036a140f885b9c00919a4a3cea9444c..581294e60ae28ed97ade9968cdf2d8563de1b44d 100644 (file)
@@ -142,7 +142,11 @@ plugin_t *ha_plugin_create()
        }
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
        );
 
        if (secret)
index 6b5aeb34202702ecae1ee7b51361adab740e8d2a..f8a5d5bcbae246ace85d1c402389d39dd4a16a83 100644 (file)
@@ -2598,18 +2598,20 @@ kernel_klips_ipsec_t *kernel_klips_ipsec_create()
        private_kernel_klips_ipsec_t *this;
 
        INIT(this,
-               .public.interface = {
-                       .get_spi = _get_spi,
-                       .get_cpi = _get_cpi,
-                       .add_sa  = _add_sa,
-                       .update_sa = _update_sa,
-                       .query_sa = _query_sa,
-                       .del_sa = _del_sa,
-                       .add_policy = _add_policy,
-                       .query_policy = _query_policy,
-                       .del_policy = _del_policy,
-                       .bypass_socket = _bypass_socket,
-                       .destroy = _destroy,
+               .public = {
+                       .interface = {
+                               .get_spi = _get_spi,
+                               .get_cpi = _get_cpi,
+                               .add_sa  = _add_sa,
+                               .update_sa = _update_sa,
+                               .query_sa = _query_sa,
+                               .del_sa = _del_sa,
+                               .add_policy = _add_policy,
+                               .query_policy = _query_policy,
+                               .del_policy = _del_policy,
+                               .bypass_socket = _bypass_socket,
+                               .destroy = _destroy,
+                       },
                },
                .policies = linked_list_create(),
                .allocated_spis = linked_list_create(),
index 019ec93f86d15cc188279e491d2abce68db95fe0..dcd6871c18cdf215723b0a787703e015483ebd02 100644 (file)
@@ -305,7 +305,7 @@ static u_int policy_hash(policy_entry_t *key)
  */
 static bool policy_equals(policy_entry_t *key, policy_entry_t *other_key)
 {
-       return memeq(&key->sel, &other_key->sel, 
+       return memeq(&key->sel, &other_key->sel,
                                 sizeof(struct xfrm_selector) + sizeof(u_int32_t)) &&
                   key->direction == other_key->direction;
 }
@@ -1379,7 +1379,7 @@ METHOD(kernel_ipsec_t, query_sa, status_t,
                                case NLMSG_ERROR:
                                {
                                        struct nlmsgerr *err = NLMSG_DATA(hdr);
-                                       
+
                                        if (mark.value)
                                        {
                                                DBG1(DBG_KNL, "querying SAD entry with SPI %.8x  "
@@ -2202,18 +2202,20 @@ kernel_netlink_ipsec_t *kernel_netlink_ipsec_create()
        int fd;
 
        INIT(this,
-               .public.interface = {
-                       .get_spi = _get_spi,
-                       .get_cpi = _get_cpi,
-                       .add_sa  = _add_sa,
-                       .update_sa = _update_sa,
-                       .query_sa = _query_sa,
-                       .del_sa = _del_sa,
-                       .add_policy = _add_policy,
-                       .query_policy = _query_policy,
-                       .del_policy = _del_policy,
-                       .bypass_socket = _bypass_socket,
-                       .destroy = _destroy,
+               .public = {
+                       .interface = {
+                               .get_spi = _get_spi,
+                               .get_cpi = _get_cpi,
+                               .add_sa  = _add_sa,
+                               .update_sa = _update_sa,
+                               .query_sa = _query_sa,
+                               .del_sa = _del_sa,
+                               .add_policy = _add_policy,
+                               .query_policy = _query_policy,
+                               .del_policy = _del_policy,
+                               .bypass_socket = _bypass_socket,
+                               .destroy = _destroy,
+                       },
                },
                .policies = hashtable_create((hashtable_hash_t)policy_hash,
                                                                         (hashtable_equals_t)policy_equals, 32),
index a64c27f6f33bef8eb0bee3d0939f5ce8d0d31f13..b01f627fa6a63cd81053a1c876863beea76e67f3 100644 (file)
@@ -2154,18 +2154,20 @@ kernel_pfkey_ipsec_t *kernel_pfkey_ipsec_create()
        private_kernel_pfkey_ipsec_t *this;
 
        INIT(this,
-               .public.interface = {
-                       .get_spi = _get_spi,
-                       .get_cpi = _get_cpi,
-                       .add_sa  = _add_sa,
-                       .update_sa = _update_sa,
-                       .query_sa = _query_sa,
-                       .del_sa = _del_sa,
-                       .add_policy = _add_policy,
-                       .query_policy = _query_policy,
-                       .del_policy = _del_policy,
-                       .bypass_socket = _bypass_socket,
-                       .destroy = _destroy,
+               .public = {
+                       .interface = {
+                               .get_spi = _get_spi,
+                               .get_cpi = _get_cpi,
+                               .add_sa  = _add_sa,
+                               .update_sa = _update_sa,
+                               .query_sa = _query_sa,
+                               .del_sa = _del_sa,
+                               .add_policy = _add_policy,
+                               .query_policy = _query_policy,
+                               .del_policy = _del_policy,
+                               .bypass_socket = _bypass_socket,
+                               .destroy = _destroy,
+                       },
                },
                .policies = linked_list_create(),
                .mutex = mutex_create(MUTEX_TYPE_DEFAULT),
index 45390ddaeb6178fb5e2e093a2158ba18ed6fee39..29549b0b1d17350ae0665832742d5cfdf2bd2d9e 100644 (file)
@@ -53,7 +53,11 @@ plugin_t *socket_default_plugin_create()
        private_socket_default_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
                .socket = socket_default_socket_create(),
        );
 
index 3410fc7a4cd7158f03ac9150443ac905571c908e..eb3cbb9d618d5632b4af4663f30e4bff31119ab1 100644 (file)
@@ -53,7 +53,11 @@ plugin_t *socket_dynamic_plugin_create()
        private_socket_dynamic_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
                .socket = socket_dynamic_socket_create(),
        );
 
index 5b011abcf9b82083542036c044600fce8feb48f7..5b4c044f63a5a3a0a80f2ed6884cec51927cea76 100644 (file)
@@ -53,7 +53,11 @@ plugin_t *socket_raw_plugin_create()
        private_socket_raw_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
                .socket = socket_raw_socket_create(),
        );
 
index 13fc5e3d0995a767b59de2c87d6c37cd94188014..f205558565e3f502299052001cb57f66f8078009 100644 (file)
@@ -136,9 +136,11 @@ inactivity_job_t *inactivity_job_create(u_int32_t reqid, u_int32_t timeout,
        private_inactivity_job_t *this;
 
        INIT(this,
-               .public.job_interface = {
-                       .execute = _execute,
-                       .destroy = _destroy,
+               .public = {
+                               .job_interface = {
+                               .execute = _execute,
+                               .destroy = _destroy,
+                       },
                },
                .reqid = reqid,
                .timeout = timeout,
index 23105f6408f55de69a9949afb51c779cdeb10671..0a2cb658cc4b0879157a268ff6231010b082b47f 100644 (file)
@@ -652,13 +652,6 @@ eap_authenticator_t *eap_authenticator_create_builder(ike_sa_t *ike_sa,
                .received_nonce = received_nonce,
                .sent_init = sent_init,
                .sent_nonce = sent_nonce,
-               .msk = chunk_empty,
-               .method = NULL,
-               .eap_payload = NULL,
-               .eap_complete = FALSE,
-               .auth_complete = FALSE,
-               .eap_identity = NULL,
-               .require_mutual = FALSE,
        );
 
        return &this->public;
@@ -674,24 +667,19 @@ eap_authenticator_t *eap_authenticator_create_verifier(ike_sa_t *ike_sa,
        private_eap_authenticator_t *this;
 
        INIT(this,
-               .public.authenticator = {
-                       .build = _build_server,
-                       .process = _process_server,
-                       .is_mutual = _is_mutual,
-                       .destroy = _destroy,
+               .public = {
+                       .authenticator = {
+                               .build = _build_server,
+                               .process = _process_server,
+                               .is_mutual = _is_mutual,
+                               .destroy = _destroy,
+                       },
                },
                .ike_sa = ike_sa,
                .received_init = received_init,
                .received_nonce = received_nonce,
                .sent_init = sent_init,
                .sent_nonce = sent_nonce,
-               .msk = chunk_empty,
-               .method = NULL,
-               .eap_payload = NULL,
-               .eap_complete = FALSE,
-               .auth_complete = FALSE,
-               .eap_identity = NULL,
-               .require_mutual = FALSE,
        );
 
        return &this->public;
index 7c435b6d1f1f9f65a1c62c52f7fb372a7b390a77..1c14ee06bf3a7a7dba2ea4f3d5346889f9ca7805 100644 (file)
@@ -123,12 +123,14 @@ ike_vendor_t *ike_vendor_create(ike_sa_t *ike_sa, bool initiator)
        private_ike_vendor_t *this;
 
        INIT(this,
-               .public.task = {
-                       .build = _build,
-                       .process = _process,
-                       .migrate = _migrate,
-                       .get_type = _get_type,
-                       .destroy = _destroy,
+               .public = {
+                       .task = {
+                               .build = _build,
+                               .process = _process,
+                               .migrate = _migrate,
+                               .get_type = _get_type,
+                               .destroy = _destroy,
+                       },
                },
                .initiator = initiator,
                .ike_sa = ike_sa,
index 5ba92f8d6f152788e178144e9b89496ad8348816..f13e334926b223cfb1b9857136f4855cdcb0c1fe 100644 (file)
@@ -1550,18 +1550,20 @@ aes_crypter_t *aes_crypter_create(encryption_algorithm_t algo, size_t key_size)
        #endif
 
        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_size = key_size,
                .aes_Nkey = key_size / 4,
        );
 
-       return &(this->public);
+       return &this->public;
 }
index 1d20b8de77edd868800cb0f3a2258176fe611e30..22b47e334788c842427b380c3f56aa978df9f4ed 100644 (file)
@@ -47,7 +47,11 @@ plugin_t *aes_plugin_create()
        private_aes_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
        );
 
        lib->crypto->add_crypter(lib->crypto, ENCR_AES_CBC,
index 33043d872b08f0784afdf8462615e34837701c9a..f5b725d5b89aea9d1b0e640112c8289b97d09c60 100644 (file)
@@ -47,7 +47,11 @@ plugin_t *agent_plugin_create()
        private_agent_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
        );
 
        lib->creds->add_builder(lib->creds, CRED_PRIVATE_KEY, KEY_RSA,
index 31f0b07027b39ca3deaf4f79b8d1aa859ea8795e..0864f411847d808f80945a2697d3d0a25425c93d 100644 (file)
@@ -402,19 +402,21 @@ agent_private_key_t *agent_private_key_open(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,
-                       .belongs_to = private_key_belongs_to,
-                       .equals = private_key_equals,
-                       .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,
+                               .belongs_to = private_key_belongs_to,
+                               .equals = private_key_equals,
+                               .get_fingerprint = _get_fingerprint,
+                               .has_fingerprint = private_key_has_fingerprint,
+                               .get_encoding = _get_encoding,
+                               .get_ref = _get_ref,
+                               .destroy = _destroy,
+                       },
                },
                .ref = 1,
        );
index 8135faa13e15de5f6478d15f180b3156dc23225e..784c07eaffd796b939cc1df43e3e778984421917 100644 (file)
@@ -177,14 +177,16 @@ blowfish_crypter_t *blowfish_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_size = key_size ?: 16,
        );
index b4b92c8c5c441d8db6e76ec32ea24a8053214468..6ab093d7b5d4f13eb10a502c0bb0d6a728b9592d 100644 (file)
@@ -48,7 +48,11 @@ plugin_t *blowfish_plugin_create()
        private_blowfish_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
        );
 
        lib->crypto->add_crypter(lib->crypto, ENCR_BLOWFISH,
index 5f7666ffac14ae37b548abc304be089d5fbd912c..ddcae423b0470e7040af52400ece61f694bb849b 100644 (file)
@@ -149,14 +149,16 @@ ctr_ipsec_crypter_t *ctr_ipsec_crypter_create(encryption_algorithm_t algo,
        }
 
        INIT(this,
-               .public.crypter = {
-                       .encrypt = _crypt,
-                       .decrypt = _crypt,
-                       .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 = _crypt,
+                               .decrypt = _crypt,
+                               .get_block_size = _get_block_size,
+                               .get_iv_size = _get_iv_size,
+                               .get_key_size = _get_key_size,
+                               .set_key = _set_key,
+                               .destroy = _destroy,
+                       },
                },
                .crypter = lib->crypto->create_crypter(lib->crypto, algo, key_size),
        );
index d9ff436e2e09cc86a3deb7e494ab5f6cf85e215a..5e47f23ec0906afcca44b0c5d065a0ec78366aa5 100644 (file)
@@ -49,7 +49,11 @@ plugin_t *ctr_plugin_create()
        private_ctr_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
        );
 
        lib->crypto->add_crypter(lib->crypto, ENCR_AES_CTR,
index 2341c9052932bfef9be3f2c6b29153cd957a4aaa..4835f646187e55f5da9760ead14d9a690e18fda4 100644 (file)
@@ -166,10 +166,12 @@ curl_fetcher_t *curl_fetcher_create()
        private_curl_fetcher_t *this;
 
        INIT(this,
-               .public.interface = {
-                       .fetch = _fetch,
-                       .set_option = _set_option,
-                       .destroy = _destroy,
+               .public = {
+                       .interface = {
+                               .fetch = _fetch,
+                               .set_option = _set_option,
+                               .destroy = _destroy,
+                       },
                },
                .curl = curl_easy_init(),
        );
index eae01dfe106e9e764a764fd43655919d742990da..7d9fbe85290ed516a6803f69601c2f476f694be2 100644 (file)
@@ -1563,11 +1563,13 @@ des_crypter_t *des_crypter_create(encryption_algorithm_t algo)
        private_des_crypter_t *this;
 
        INIT(this,
-               .public.crypter = {
-                       .get_block_size = _get_block_size,
-                       .get_iv_size = _get_iv_size,
-                       .get_key_size = _get_key_size,
-                       .destroy = _destroy,
+               .public = {
+                       .crypter = {
+                               .get_block_size = _get_block_size,
+                               .get_iv_size = _get_iv_size,
+                               .get_key_size = _get_key_size,
+                               .destroy = _destroy,
+                       },
                },
        );
 
index 8e3fc1f1fa24f79e6e4ebedd4221dd857d72df5f..43b457ce27cd63180faa89d9d0bdc19fd30fd410 100644 (file)
@@ -47,7 +47,11 @@ plugin_t *des_plugin_create()
        private_des_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
        );
 
        lib->crypto->add_crypter(lib->crypto, ENCR_3DES,
index 943f9c2d250a3e803daaa78b7e506747cb005ff7..5994819110ac5e33dc50b6889078809f7bc9f3c6 100644 (file)
@@ -278,14 +278,16 @@ gcrypt_crypter_t *gcrypt_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,
+                       },
                },
                .alg = gcrypt_alg,
                .ctr_mode = mode == GCRY_CIPHER_MODE_CTR,
index 183d34d04809453c79c1291776db1abdc68b7e64..1d519ce56d9c44e33ef6c087b25513a286226534 100644 (file)
@@ -185,12 +185,14 @@ gcrypt_dh_t *gcrypt_dh_create(diffie_hellman_group_t group)
        }
 
        INIT(this,
-               .public.dh = {
-                       .get_shared_secret = _get_shared_secret,
-                       .set_other_public_value = _set_other_public_value,
-                       .get_my_public_value = _get_my_public_value,
-                       .get_dh_group = _get_dh_group,
-                       .destroy = _destroy,
+               .public = {
+                       .dh = {
+                               .get_shared_secret = _get_shared_secret,
+                               .set_other_public_value = _set_other_public_value,
+                               .get_my_public_value = _get_my_public_value,
+                               .get_dh_group = _get_dh_group,
+                               .destroy = _destroy,
+                       },
                },
                .group = group,
                .p_len = params->prime.len,
index ece4fab775947011f654325aa1f3af8f8e97fdcb..96c87614ff40e6fa3c84652468a4772905111613 100644 (file)
@@ -121,12 +121,14 @@ gcrypt_hasher_t *gcrypt_hasher_create(hash_algorithm_t algo)
        }
 
        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,
+                       },
                },
        );
 
index cc13f5516b0b79ac1b9033892eb32978f7494315..eb9b9500464f3fab96315293f2c508224e75222c 100644 (file)
@@ -138,7 +138,11 @@ plugin_t *gcrypt_plugin_create()
        gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
        );
 
        /* hashers */
index fb4443da5970b5b13d89a669481df5bd19ce0dbc..d29755de9c5ae547a9291d417af9a52d017f1890 100644 (file)
@@ -83,10 +83,12 @@ gcrypt_rng_t *gcrypt_rng_create(rng_quality_t quality)
        }
 
        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,
+                       },
                },
                .quality = quality,
        );
index 2d9baa47169c7374af01255c793dc76d2d0db45a..38ce2cd6ce1cdc99c452c3d3c10e51b190cc5845 100644 (file)
@@ -427,19 +427,21 @@ static private_gcrypt_rsa_private_key_t *create_empty()
        private_gcrypt_rsa_private_key_t *this;
 
        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,
        );
index a49a6e5e284220bacd3e9df96404365b6e42fca5..f8645da979ed4c4673b5a0367c7fbe9b62dd67a6 100644 (file)
@@ -322,17 +322,19 @@ gcrypt_rsa_public_key_t *gcrypt_rsa_public_key_load(key_type_t type,
        }
 
        INIT(this,
-               .public.key = {
-                       .get_type = _get_type,
-                       .verify = _verify,
-                       .encrypt = _encrypt_,
-                       .equals = public_key_equals,
-                       .get_keysize = _get_keysize,
-                       .get_fingerprint = _get_fingerprint,
-                       .has_fingerprint = public_key_has_fingerprint,
-                       .get_encoding = _get_encoding,
-                       .get_ref = _get_ref,
-                       .destroy = _destroy,
+               .public = {
+                       .key = {
+                               .get_type = _get_type,
+                               .verify = _verify,
+                               .encrypt = _encrypt_,
+                               .equals = public_key_equals,
+                               .get_keysize = _get_keysize,
+                               .get_fingerprint = _get_fingerprint,
+                               .has_fingerprint = public_key_has_fingerprint,
+                               .get_encoding = _get_encoding,
+                               .get_ref = _get_ref,
+                               .destroy = _destroy,
+                       },
                },
                .ref = 1,
        );
index 00455afdec5429af144779ce1d22b6526d274d48..9f992c61c7e314cfaf14943c13dcdf1b0abb112b 100644 (file)
@@ -206,12 +206,14 @@ gmp_diffie_hellman_t *gmp_diffie_hellman_create(diffie_hellman_group_t group)
        }
 
        INIT(this,
-               .public.dh = {
-                       .get_shared_secret = _get_shared_secret,
-                       .set_other_public_value = _set_other_public_value,
-                       .get_my_public_value = _get_my_public_value,
-                       .get_dh_group = _get_dh_group,
-                       .destroy = _destroy,
+               .public = {
+                       .dh = {
+                               .get_shared_secret = _get_shared_secret,
+                               .set_other_public_value = _set_other_public_value,
+                               .get_my_public_value = _get_my_public_value,
+                               .get_dh_group = _get_dh_group,
+                               .destroy = _destroy,
+                       },
                },
                .group = group,
                .p_len = params->prime.len,
index dd04b942706cdc72d30a69b45a5c0df755b65a3e..5081844e66681bf622c76d7e34f1a3c7539a6115 100644 (file)
@@ -55,7 +55,11 @@ plugin_t *gmp_plugin_create()
        private_gmp_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
        );
 
        lib->crypto->add_dh(lib->crypto, MODP_2048_BIT,
index 5001a872bc8e881d946b86c3824a986694c5a453..1b6c20817b9f07a4cf0f647f9fb68ebd1cea9c77 100644 (file)
@@ -566,19 +566,21 @@ static private_gmp_rsa_private_key_t *gmp_rsa_private_key_create_empty(void)
        private_gmp_rsa_private_key_t *this;
 
        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,
        );
index 4beeaa51c4243771fbf34898dc57e3146f09a90e..a7ba80138af8cb54b044c5451793a95394248afd 100644 (file)
@@ -471,17 +471,19 @@ gmp_rsa_public_key_t *gmp_rsa_public_key_load(key_type_t type, va_list args)
        }
 
        INIT(this,
-               .public.key = {
-                       .get_type = _get_type,
-                       .verify = _verify,
-                       .encrypt = _encrypt_,
-                       .equals = public_key_equals,
-                       .get_keysize = _get_keysize,
-                       .get_fingerprint = _get_fingerprint,
-                       .has_fingerprint = public_key_has_fingerprint,
-                       .get_encoding = _get_encoding,
-                       .get_ref = _get_ref,
-                       .destroy = _destroy,
+               .public = {
+                       .key = {
+                               .get_type = _get_type,
+                               .verify = _verify,
+                               .encrypt = _encrypt_,
+                               .equals = public_key_equals,
+                               .get_keysize = _get_keysize,
+                               .get_fingerprint = _get_fingerprint,
+                               .has_fingerprint = public_key_has_fingerprint,
+                               .get_encoding = _get_encoding,
+                               .get_ref = _get_ref,
+                               .destroy = _destroy,
+                       },
                },
                .ref = 1,
        );
index 0cf13ffb319c71409a0d764b5d0a3607be2eac66..18381176f4ab5bf3c8a192a7b280e0c623bef659 100644 (file)
@@ -50,7 +50,11 @@ plugin_t *hmac_plugin_create()
        private_hmac_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
        );
 
        lib->crypto->add_prf(lib->crypto, PRF_HMAC_SHA2_256,
index 72f83d6804c741cde547a4815fa4a6a073de8f77..ca10612f9f261eb4b117038f81ccd0a5a956481b 100644 (file)
@@ -108,13 +108,15 @@ hmac_prf_t *hmac_prf_create(pseudo_random_function_t algo)
        }
 
        INIT(this,
-               .public.prf = {
-                       .get_bytes = _get_bytes,
-                       .allocate_bytes = _allocate_bytes,
-                       .get_block_size = _get_block_size,
-                       .get_key_size = _get_key_size,
-                       .set_key = _set_key,
-                       .destroy = _destroy,
+               .public = {
+                       .prf = {
+                               .get_bytes = _get_bytes,
+                               .allocate_bytes = _allocate_bytes,
+                               .get_block_size = _get_block_size,
+                               .get_key_size = _get_key_size,
+                               .set_key = _set_key,
+                               .destroy = _destroy,
+                       },
                },
                .hmac = hmac,
        );
index b5cbf1eb435efee16ad8d2b7e2e7055b7abafe03..26483a99054bdc447fa7958091558dc717261a86 100644 (file)
@@ -172,14 +172,16 @@ hmac_signer_t *hmac_signer_create(integrity_algorithm_t algo)
        }
 
        INIT(this,
-               .public.signer = {
-                       .get_signature = _get_signature,
-                       .allocate_signature = _allocate_signature,
-                       .verify_signature = _verify_signature,
-                       .get_key_size = _get_key_size,
-                       .get_block_size = _get_block_size,
-                       .set_key = _set_key,
-                       .destroy = _destroy,
+               .public = {
+                       .signer = {
+                               .get_signature = _get_signature,
+                               .allocate_signature = _allocate_signature,
+                               .verify_signature = _verify_signature,
+                               .get_key_size = _get_key_size,
+                               .get_block_size = _get_block_size,
+                               .set_key = _set_key,
+                               .destroy = _destroy,
+                       },
                },
                .block_size = min(trunc, hmac->get_block_size(hmac)),
                .hmac = hmac,
index 1cecec8f2586796a2a22815790a132011f84d59b..2ed07ff0ca30bb04fbcf56dcf193fb245c99f2de 100644 (file)
@@ -165,14 +165,16 @@ openssl_crypter_t *openssl_crypter_create(encryption_algorithm_t algo,
        private_openssl_crypter_t *this;
 
        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,
+                       },
                },
        );
 
index ff49a2da6a2f5ff55bfa536bfb14d2f2de574469..4a00c3163588c27a74c5c8c8d223b0d2c0e17eba 100644 (file)
@@ -143,12 +143,14 @@ openssl_diffie_hellman_t *openssl_diffie_hellman_create(diffie_hellman_group_t g
        private_openssl_diffie_hellman_t *this;
 
        INIT(this,
-               .public.dh = {
-                       .get_shared_secret = _get_shared_secret,
-                       .set_other_public_value = _set_other_public_value,
-                       .get_my_public_value = _get_my_public_value,
-                       .get_dh_group = _get_dh_group,
-                       .destroy = _destroy,
+               .public = {
+                       .dh = {
+                               .get_shared_secret = _get_shared_secret,
+                               .set_other_public_value = _set_other_public_value,
+                               .get_my_public_value = _get_my_public_value,
+                               .get_dh_group = _get_dh_group,
+                               .destroy = _destroy,
+                       },
                },
        );
 
index 2a856cea74dea0019f5b4b4a5a384610a89d378b..32fc2bccd5148828bcf79340712506711e89d8aa 100644 (file)
@@ -269,12 +269,14 @@ openssl_ec_diffie_hellman_t *openssl_ec_diffie_hellman_create(diffie_hellman_gro
        private_openssl_ec_diffie_hellman_t *this;
 
        INIT(this,
-               .public.dh = {
-                       .get_shared_secret = _get_shared_secret,
-                       .set_other_public_value = _set_other_public_value,
-                       .get_my_public_value = _get_my_public_value,
-                       .get_dh_group = _get_dh_group,
-                       .destroy = _destroy,
+               .public = {
+                       .dh = {
+                               .get_shared_secret = _get_shared_secret,
+                               .set_other_public_value = _set_other_public_value,
+                               .get_my_public_value = _get_my_public_value,
+                               .get_dh_group = _get_dh_group,
+                               .destroy = _destroy,
+                       },
                },
                .group = group,
        );
index 15b0f577bebd6a1d0f4824b43579a8fd380ff5f6..f4c4759bfd266eb24411039fbb38ae4a9de9df58 100644 (file)
@@ -286,19 +286,21 @@ static private_openssl_ec_private_key_t *create_empty(void)
        private_openssl_ec_private_key_t *this;
 
        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,
        );
index f680749a369bab637990e4dd79e6173e63636931..7461695ad8ddd4ed27e8b3fc32a12fbbf4599380 100644 (file)
@@ -303,17 +303,19 @@ static private_openssl_ec_public_key_t *create_empty()
        private_openssl_ec_public_key_t *this;
 
        INIT(this,
-               .public.key = {
-                       .get_type = _get_type,
-                       .verify = _verify,
-                       .encrypt = _encrypt,
-                       .get_keysize = _get_keysize,
-                       .equals = public_key_equals,
-                       .get_fingerprint = _get_fingerprint,
-                       .has_fingerprint = public_key_has_fingerprint,
-                       .get_encoding = _get_encoding,
-                       .get_ref = _get_ref,
-                       .destroy = _destroy,
+               .public = {
+                       .key = {
+                               .get_type = _get_type,
+                               .verify = _verify,
+                               .encrypt = _encrypt,
+                               .get_keysize = _get_keysize,
+                               .equals = public_key_equals,
+                               .get_fingerprint = _get_fingerprint,
+                               .has_fingerprint = public_key_has_fingerprint,
+                               .get_encoding = _get_encoding,
+                               .get_ref = _get_ref,
+                               .destroy = _destroy,
+                       },
                },
                .ref = 1,
        );
index 8904ae925ab92e2d377d01099977d43e7b1e94bb..d81f4b21efd4d40d70ac1f4f511871b5af6f7e4a 100644 (file)
@@ -149,12 +149,14 @@ openssl_hasher_t *openssl_hasher_create(hash_algorithm_t algo)
        }
 
        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,
+                       },
                },
        );
 
index d8c66dca0db5d68c9cbc70a758e955c28c0face1..b8f00ff500fe91ed8e8a68c505ba987726362653 100644 (file)
@@ -245,7 +245,11 @@ plugin_t *openssl_plugin_create()
        private_openssl_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
        );
 
        threading_init();
index e78090638ef187d80a49ff6a0f430c2f640e8f0e..0b607c3862cfea614d0fddc31502d8f9c9d7d422 100644 (file)
@@ -293,19 +293,21 @@ static private_openssl_rsa_private_key_t *create_empty()
        private_openssl_rsa_private_key_t *this;
 
        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,
        );
index 667ddad1a05186ca4b9beef87f708fc723f4e53e..422e31521bbb503ab591528f02fbc72fd54b0691 100644 (file)
@@ -304,17 +304,19 @@ static private_openssl_rsa_public_key_t *create_empty()
        private_openssl_rsa_public_key_t *this;
 
        INIT(this,
-               .public.key = {
-                       .get_type = _get_type,
-                       .verify = _verify,
-                       .encrypt = _encrypt,
-                       .equals = public_key_equals,
-                       .get_keysize = _get_keysize,
-                       .get_fingerprint = _get_fingerprint,
-                       .has_fingerprint = public_key_has_fingerprint,
-                       .get_encoding = _get_encoding,
-                       .get_ref = _get_ref,
-                       .destroy = _destroy,
+               .public = {
+                       .key = {
+                               .get_type = _get_type,
+                               .verify = _verify,
+                               .encrypt = _encrypt,
+                               .equals = public_key_equals,
+                               .get_keysize = _get_keysize,
+                               .get_fingerprint = _get_fingerprint,
+                               .has_fingerprint = public_key_has_fingerprint,
+                               .get_encoding = _get_encoding,
+                               .get_ref = _get_ref,
+                               .destroy = _destroy,
+                       },
                },
                .ref = 1,
        );
index b65388010149b20f72aba96344ebd169d4569a2e..20f2fa984155cad9744522272b0ba85299d553eb 100644 (file)
@@ -124,13 +124,15 @@ openssl_sha1_prf_t *openssl_sha1_prf_create(pseudo_random_function_t algo)
        }
 
        INIT(this,
-               .public.prf = {
-                       .get_block_size = _get_block_size,
-                       .get_bytes = _get_bytes,
-                       .allocate_bytes = _allocate_bytes,
-                       .get_key_size = _get_key_size,
-                       .set_key = _set_key,
-                       .destroy = _destroy,
+               .public = {
+                       .prf = {
+                               .get_block_size = _get_block_size,
+                               .get_bytes = _get_bytes,
+                               .allocate_bytes = _allocate_bytes,
+                               .get_key_size = _get_key_size,
+                               .set_key = _set_key,
+                               .destroy = _destroy,
+                       },
                },
        );
 
index bbeef549de12834d606fc322af910dd95a22ac58..06c20292f9ef3e5fac8ab1daf49c1fd258161050 100644 (file)
@@ -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),
        );
index d8461089af9395b89c0c21c14aedcdc948aa2920..027c53c7b458eb18e0aeb0f4e114dcb12c77a7c8 100644 (file)
@@ -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(),
        );
 
index 2f26a3afb6ebcbb92effe1a0129e4237c04d0855..3d805df9db0ab8d9ce5afbcca42aec978116add1 100644 (file)
@@ -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,
+                       },
                },
        );
 
index ed331d9b3dc8eb8ae3e6becefbe03124d655cc80..66a0773533288d7e4657b153d89192a83439e31f 100644 (file)
@@ -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;
index d61083626bed445e475867e1b75f624005b24682..6d327be4054a12e99aacd5c7f6880d92c9d62432 100644 (file)
@@ -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),
        );
index 5e527f47a2c3b09f5ae68343736e532fbf6fb25b..86fce1becd5d5d58398f6df3213eb0a6e12f766c 100644 (file)
@@ -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),
        );
index e51d0aae4369fae4ddb9707fb2cf2eef21dff21d..cabca3f548c3e8dea2e0326cd55bd09d8de82e60 100644 (file)
@@ -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,
        );
index d352a9583d59406d4883348d220af7f1c7998e53..02393b907544648414b019b81122aaaf4da80bc1 100644 (file)
@@ -52,7 +52,11 @@ plugin_t *revocation_plugin_create()
        private_revocation_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
                .validator = revocation_validator_create(),
        );
        lib->credmgr->add_validator(lib->credmgr, &this->validator->validator);
index 8c25a5ecfc27470e2c2317d47c49ea17b51d7992..88156f383aa8a7c6c851510ca5122992961234d8 100644 (file)
@@ -50,7 +50,11 @@ plugin_t *xcbc_plugin_create()
        private_xcbc_plugin_t *this;
 
        INIT(this,
-               .public.plugin.destroy = _destroy,
+               .public = {
+                       .plugin = {
+                               .destroy = _destroy,
+                       },
+               },
        );
 
        lib->crypto->add_prf(lib->crypto, PRF_AES128_XCBC,
index 33a6c4baf3e4f5588e975c494c1ff9ef389db95d..ac9e1fda073032a93bd70d338b5fd68a41aab089 100644 (file)
@@ -106,13 +106,15 @@ xcbc_prf_t *xcbc_prf_create(pseudo_random_function_t algo)
        }
 
        INIT(this,
-               .public.prf = {
-                       .get_bytes = _get_bytes,
-                       .allocate_bytes = _allocate_bytes,
-                       .get_block_size = _get_block_size,
-                       .get_key_size = _get_key_size,
-                       .set_key = _set_key,
-                       .destroy = _destroy,
+               .public = {
+                       .prf = {
+                               .get_bytes = _get_bytes,
+                               .allocate_bytes = _allocate_bytes,
+                               .get_block_size = _get_block_size,
+                               .get_key_size = _get_key_size,
+                               .set_key = _set_key,
+                               .destroy = _destroy,
+                       },
                },
                .xcbc = xcbc,
        );
index ad7e2f4e92617589b26669b962f9fb0568ad5d35..ece5923235646f4bfac6598267fc3c120f74aba9 100644 (file)
@@ -144,14 +144,16 @@ xcbc_signer_t *xcbc_signer_create(integrity_algorithm_t algo)
        }
 
        INIT(this,
-               .public.signer = {
-                       .get_signature = _get_signature,
-                       .allocate_signature = _allocate_signature,
-                       .verify_signature = _verify_signature,
-                       .get_key_size = _get_key_size,
-                       .get_block_size = _get_block_size,
-                       .set_key = _set_key,
-                       .destroy = _destroy,
+               .public = {
+                       .signer = {
+                               .get_signature = _get_signature,
+                               .allocate_signature = _allocate_signature,
+                               .verify_signature = _verify_signature,
+                               .get_key_size = _get_key_size,
+                               .get_block_size = _get_block_size,
+                               .set_key = _set_key,
+                               .destroy = _destroy,
+                       },
                },
                .xcbc = xcbc,
                .block_size = min(trunc, xcbc->get_block_size(xcbc)),
index 79f97ae40e1df4589cdcfcd2812d8c1dbab31272..01adc6c94f92f730a8c286bdbce6dc1ed2ee3c06 100644 (file)
@@ -645,20 +645,21 @@ tls_peer_t *tls_peer_create(tls_t *tls, tls_crypto_t *crypto,
        private_tls_peer_t *this;
 
        INIT(this,
-               .public.handshake = {
-                       .process = _process,
-                       .build = _build,
-                       .cipherspec_changed = _cipherspec_changed,
-                       .change_cipherspec = _change_cipherspec,
-                       .finished = _finished,
-                       .destroy = _destroy,
+               .public = {
+                       .handshake = {
+                               .process = _process,
+                               .build = _build,
+                               .cipherspec_changed = _cipherspec_changed,
+                               .change_cipherspec = _change_cipherspec,
+                               .finished = _finished,
+                               .destroy = _destroy,
+                       },
                },
                .state = STATE_INIT,
                .tls = tls,
                .crypto = crypto,
                .peer = peer,
                .server = server,
-               .peer_auth_requested = FALSE,
                .peer_auth = auth_cfg_create(),
                .server_auth = auth_cfg_create(),
        );
index faaecb5a07505da9d8c7ea2e77634976b46c1135..3303365fc6a463e521e2f7715c33786d924366ca 100644 (file)
@@ -635,13 +635,15 @@ tls_server_t *tls_server_create(tls_t *tls, tls_crypto_t *crypto,
        private_tls_server_t *this;
 
        INIT(this,
-               .public.handshake = {
-                       .process = _process,
-                       .build = _build,
-                       .cipherspec_changed = _cipherspec_changed,
-                       .change_cipherspec = _change_cipherspec,
-                       .finished = _finished,
-                       .destroy = _destroy,
+               .public = {
+                       .handshake = {
+                               .process = _process,
+                               .build = _build,
+                               .cipherspec_changed = _cipherspec_changed,
+                               .change_cipherspec = _change_cipherspec,
+                               .finished = _finished,
+                               .destroy = _destroy,
+                       },
                },
                .tls = tls,
                .crypto = crypto,