Use a seperate section for each nested struct member in INIT macro
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
|
||||
@@ -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)),
|
||||
|
||||
Reference in New Issue
Block a user