diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-07-01 08:19:51 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-07-01 08:19:51 +0200 |
commit | 8ee53ed9ec5e5f045778ab8b30f10cb86ec55c4a (patch) | |
tree | 93034ab4d9e3657b9148ce3f17dc342a13ffb923 /openbsc/include | |
parent | 57ee78078905c7499bd4e6857f8981d22badfcac (diff) | |
parent | 694d98042f1adfad0e54f97d0e4c8787c5fccbac (diff) |
Merge branch 'zecke/features/auth'
Introduce another authentication scheme using MILENAGE. In the
future reading from /dev/urandom will be replaced with libcrypto.
Diffstat (limited to 'openbsc/include')
-rw-r--r-- | openbsc/include/openbsc/bsc_msc.h | 2 | ||||
-rw-r--r-- | openbsc/include/openbsc/bsc_nat.h | 7 | ||||
-rw-r--r-- | openbsc/include/openbsc/osmo_msc_data.h | 3 |
3 files changed, 11 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/bsc_msc.h b/openbsc/include/openbsc/bsc_msc.h index 763bae508..39258d364 100644 --- a/openbsc/include/openbsc/bsc_msc.h +++ b/openbsc/include/openbsc/bsc_msc.h @@ -60,6 +60,6 @@ void bsc_msc_schedule_connect(struct bsc_msc_connection *); void bsc_msc_lost(struct bsc_msc_connection *); -struct msgb *bsc_msc_id_get_resp(const char *token); +struct msgb *bsc_msc_id_get_resp(int fixed, const char *token, const uint8_t *res, int len); #endif diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h index ae940b390..72773a981 100644 --- a/openbsc/include/openbsc/bsc_nat.h +++ b/openbsc/include/openbsc/bsc_nat.h @@ -84,6 +84,7 @@ struct bsc_connection { /* do we know anything about this BSC? */ int authenticated; + uint8_t last_rand[16]; /* the fd we use to communicate */ struct osmo_wqueue write_queue; @@ -147,6 +148,8 @@ enum bsc_cfg_ctr { struct bsc_config { struct llist_head entry; + uint8_t key[16]; + uint8_t key_present; char *token; int nr; @@ -304,6 +307,9 @@ struct bsc_nat { /* control interface */ struct ctrl_handle *ctrl; + + /* for random values */ + int random_fd; }; struct bsc_nat_ussd_con { @@ -319,6 +325,7 @@ struct bsc_nat_ussd_con { /* create and init the structures */ struct bsc_config *bsc_config_alloc(struct bsc_nat *nat, const char *token); struct bsc_config *bsc_config_num(struct bsc_nat *nat, int num); +struct bsc_config *bsc_config_by_token(struct bsc_nat *nat, const char *token, int len); void bsc_config_free(struct bsc_config *); void bsc_config_add_lac(struct bsc_config *cfg, int lac); void bsc_config_del_lac(struct bsc_config *cfg, int lac); diff --git a/openbsc/include/openbsc/osmo_msc_data.h b/openbsc/include/openbsc/osmo_msc_data.h index 2d863aa32..ed3818791 100644 --- a/openbsc/include/openbsc/osmo_msc_data.h +++ b/openbsc/include/openbsc/osmo_msc_data.h @@ -59,6 +59,9 @@ struct osmo_msc_data { /* Connection data */ char *bsc_token; + uint8_t bsc_key[16]; + uint8_t bsc_key_present; + int ping_timeout; int pong_timeout; struct osmo_timer_list ping_timer; |