diff options
author | Martin Willi <martin@revosec.ch> | 2011-03-08 14:17:53 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2011-03-08 16:42:27 +0100 |
commit | f58db7248253fa086575d7ab559b8da7303738a8 (patch) | |
tree | b408286f6562a307bfdab0cb06bf9ffd98a0f478 /src/libcharon/sa/authenticators/eap/sim_hooks.h | |
parent | c54e1bb83b6acd13de77221679d67a40365a7ffd (diff) | |
download | strongswan-f58db7248253fa086575d7ab559b8da7303738a8.tar.bz2 strongswan-f58db7248253fa086575d7ab559b8da7303738a8.tar.xz |
Splitted sim_manager.h header to sim_{card,provider,hooks}.h
Diffstat (limited to 'src/libcharon/sa/authenticators/eap/sim_hooks.h')
-rw-r--r-- | src/libcharon/sa/authenticators/eap/sim_hooks.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/libcharon/sa/authenticators/eap/sim_hooks.h b/src/libcharon/sa/authenticators/eap/sim_hooks.h new file mode 100644 index 000000000..0a675e4ab --- /dev/null +++ b/src/libcharon/sa/authenticators/eap/sim_hooks.h @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2008-2009 Martin Willi + * Hochschule fuer Technik Rapperswil + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +/** + * @defgroup sim_hooks sim_hooks + * @{ @ingroup eap + */ + +#ifndef SIM_HOOKS_H_ +#define SIM_HOOKS_H_ + +typedef struct sim_hooks_t sim_hooks_t; + +/** + * Additional hooks invoked during EAP-SIM/AKA message processing. + */ +struct sim_hooks_t { + + /** + * SIM/AKA message parsing. + * + * As a SIM/AKA optionally contains encrypted attributes, the hook + * might get invoked twice, once before and once after decryption. + * + * @param message SIM/AKA message + * @param inbound TRUE for incoming messages, FALSE for outgoing + * @param decrypted TRUE if AT_ENCR_DATA has been decrypted + */ + void (*message)(sim_hooks_t *this, simaka_message_t *message, + bool inbound, bool decrypted); + + /** + * SIM/AKA encryption/authentication key hooks. + * + * @param k_encr derived SIM/AKA encryption key k_encr + * @param k_auth derived SIM/AKA authentication key k_auth + */ + void (*keys)(sim_hooks_t *this, chunk_t k_encr, chunk_t k_auth); +}; + +#endif /** SIM_HOOKS_H_ @}*/ |