proto_write_info (p11_rpc_message *msg,
                  CK_INFO_PTR info)
{
	assert (msg != NULL);
	assert (info != NULL);

	if (!p11_rpc_message_write_version (msg, &info->cryptokiVersion) ||
	    !p11_rpc_message_write_space_string (msg, info->manufacturerID, 32) ||
	    !p11_rpc_message_write_ulong (msg, info->flags) ||
	    !p11_rpc_message_write_space_string (msg, info->libraryDescription, 32) ||
	    !p11_rpc_message_write_version (msg, &info->libraryVersion))
		return PREP_ERROR;

	return CKR_OK;
}
proto_write_info (p11_rpc_message *msg,
                  CK_INFO_PTR info)
{
	assert (msg != NULL);
	assert (info != NULL);

	if (!p11_rpc_message_write_version (msg, &info->cryptokiVersion) ||
	    !p11_rpc_message_write_space_string (msg, info->manufacturerID, 32) ||
	    !p11_rpc_message_write_ulong (msg, info->flags) ||
	    !p11_rpc_message_write_space_string (msg, info->libraryDescription, 32) ||
	    !p11_rpc_message_write_version (msg, &info->libraryVersion))
		return PREP_ERROR;

	return CKR_OK;
}