aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/include/openbsc/gprs_llc.h1
-rw-r--r--openbsc/include/openbsc/gprs_sgsn.h9
-rw-r--r--openbsc/src/gprs/gprs_llc.c5
-rw-r--r--openbsc/src/gprs/sgsn_main.c3
4 files changed, 11 insertions, 7 deletions
diff --git a/openbsc/include/openbsc/gprs_llc.h b/openbsc/include/openbsc/gprs_llc.h
index 0ddb51804..d0c30a68b 100644
--- a/openbsc/include/openbsc/gprs_llc.h
+++ b/openbsc/include/openbsc/gprs_llc.h
@@ -144,6 +144,7 @@ int gprs_llgmm_assign(struct gprs_llc_llme *llme,
uint32_t old_tlli, uint32_t new_tlli,
enum gprs_ciph_algo alg, const uint8_t *kc);
+int gprs_llc_init(const char *cipher_plugin_path);
int gprs_llc_vty_init(void);
#endif
diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h
index 08011502d..b32c5cd4c 100644
--- a/openbsc/include/openbsc/gprs_sgsn.h
+++ b/openbsc/include/openbsc/gprs_sgsn.h
@@ -6,6 +6,8 @@
#include <osmocore/gsm48.h>
+#include <osmocom/crypt/gprs_cipher.h>
+
#define GSM_IMSI_LENGTH 17
#define GSM_IMEI_LENGTH 17
#define GSM_EXTENSION_LENGTH 15
@@ -21,13 +23,6 @@ enum gprs_mm_state {
GMM_DEREGISTERED_INIT, /* 4.1.3.3.1.4 */
};
-enum gprs_ciph_algo {
- GPRS_ALGO_GEA0,
- GPRS_ALGO_GEA1,
- GPRS_ALGO_GEA2,
- GPRS_ALGO_GEA3,
-};
-
enum gprs_mm_ctr {
GMM_CTR_PKTS_SIG_IN,
GMM_CTR_PKTS_SIG_OUT,
diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c
index 98193d9fd..7e16d1b96 100644
--- a/openbsc/src/gprs/gprs_llc.c
+++ b/openbsc/src/gprs/gprs_llc.c
@@ -749,3 +749,8 @@ int gprs_llgmm_assign(struct gprs_llc_llme *llme,
return 0;
}
+
+int gprs_llc_init(const char *cipher_plugin_path)
+{
+ return gprs_cipher_load(cipher_plugin_path);
+}
diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c
index 26478671b..92f431082 100644
--- a/openbsc/src/gprs/sgsn_main.c
+++ b/openbsc/src/gprs/sgsn_main.c
@@ -170,6 +170,9 @@ int main(int argc, char **argv)
exit(1);
}
bssgp_nsi = sgsn_inst.cfg.nsi = sgsn_nsi;
+
+ gprs_llc_init("/usr/local/lib/osmocom/crypt/");
+
gprs_ns_vty_init(bssgp_nsi);
gprs_bssgp_vty_init();
gprs_llc_vty_init();