blob: 7b5367bf0b4adcf51d9775543519a797934e0dcb [file] [log] [blame]
Sylvain Munaut30a15382009-12-24 00:27:26 +01001/* Authentication related functions */
2
3/*
4 * (C) 2010 by Sylvain Munaut <tnt@246tNt.com>
5 *
6 * All Rights Reserved
7 *
8 * This program is free software; you can redistribute it and/or modify
Harald Welte9af6ddf2011-01-01 15:25:50 +01009 * it under the terms of the GNU Affero General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
Sylvain Munaut30a15382009-12-24 00:27:26 +010011 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Harald Welte9af6ddf2011-01-01 15:25:50 +010016 * GNU Affero General Public License for more details.
Sylvain Munaut30a15382009-12-24 00:27:26 +010017 *
Harald Welte9af6ddf2011-01-01 15:25:50 +010018 * You should have received a copy of the GNU Affero General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
Sylvain Munaut30a15382009-12-24 00:27:26 +010020 *
21 */
22
Neels Hofmeyr90843962017-09-04 15:04:35 +020023#include <osmocom/msc/db.h>
24#include <osmocom/msc/debug.h>
25#include <osmocom/msc/auth.h>
26#include <osmocom/msc/gsm_data.h>
Sylvain Munaut30a15382009-12-24 00:27:26 +010027
Pablo Neira Ayuso136f4532011-03-22 16:47:59 +010028#include <osmocom/gsm/comp128.h>
Neels Hofmeyrb42dc432016-12-16 14:16:53 +010029#include <osmocom/core/utils.h>
Sylvain Munaut30a15382009-12-24 00:27:26 +010030
Daniel Willmann62a63f52015-10-08 16:10:25 +020031#include <openssl/rand.h>
32
Sylvain Munaut30a15382009-12-24 00:27:26 +010033#include <stdlib.h>
34
Neels Hofmeyr37984bd2016-03-30 11:22:24 +020035const struct value_string auth_action_names[] = {
Neels Hofmeyrb42dc432016-12-16 14:16:53 +010036 OSMO_VALUE_STRING(AUTH_ERROR),
37 OSMO_VALUE_STRING(AUTH_NOT_AVAIL),
38 OSMO_VALUE_STRING(AUTH_DO_AUTH_THEN_CIPH),
39 OSMO_VALUE_STRING(AUTH_DO_CIPH),
40 OSMO_VALUE_STRING(AUTH_DO_AUTH),
Neels Hofmeyrecdfd6d2016-12-16 14:16:41 +010041 { 0, NULL }
Neels Hofmeyr37984bd2016-03-30 11:22:24 +020042};