aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cipher/cipher_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cipher/cipher_test.c')
-rw-r--r--tests/cipher/cipher_test.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/cipher/cipher_test.c b/tests/cipher/cipher_test.c
index 9d78a880..8ac4018c 100644
--- a/tests/cipher/cipher_test.c
+++ b/tests/cipher/cipher_test.c
@@ -10,7 +10,7 @@
* 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.
+ * GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -18,6 +18,7 @@
*/
#include <osmo-bts/bts.h>
+#include <osmo-bts/bts_sm.h>
#include <osmo-bts/logging.h>
#include <osmo-bts/paging.h>
#include <osmo-bts/gsm_data.h>
@@ -50,14 +51,14 @@ static void test_cipher_parsing(void)
ASSERT_TRUE(bts_supports_cipher(bts, i) == 0);
}
- /* checking default A5/1 to A5/3 support */
- bts->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2) | CIPHER_A5(3);
+ /* checking default A5/1 to A5/4 support */
+ bts->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2) | CIPHER_A5(3) | CIPHER_A5(4);
ASSERT_TRUE(bts_supports_cipher(bts, 0x0) == -ENOTSUP);
ASSERT_TRUE(bts_supports_cipher(bts, 0x1) == 1); /* A5/0 */
ASSERT_TRUE(bts_supports_cipher(bts, 0x2) == 1); /* A5/1 */
ASSERT_TRUE(bts_supports_cipher(bts, 0x3) == 1); /* A5/2 */
ASSERT_TRUE(bts_supports_cipher(bts, 0x4) == 1); /* A5/3 */
- ASSERT_TRUE(bts_supports_cipher(bts, 0x5) == 0); /* A5/4 */
+ ASSERT_TRUE(bts_supports_cipher(bts, 0x5) == 1); /* A5/4 */
ASSERT_TRUE(bts_supports_cipher(bts, 0x6) == 0); /* A5/5 */
ASSERT_TRUE(bts_supports_cipher(bts, 0x7) == 0); /* A5/6 */
ASSERT_TRUE(bts_supports_cipher(bts, 0x8) == 0); /* A5/7 */
@@ -71,7 +72,8 @@ int main(int argc, char **argv)
osmo_init_logging2(tall_bts_ctx, &bts_log_info);
- bts = gsm_bts_alloc(tall_bts_ctx, 0);
+ g_bts_sm = gsm_bts_sm_alloc(tall_bts_ctx);
+ bts = gsm_bts_alloc(g_bts_sm, 0);
if (bts_init(bts) < 0) {
fprintf(stderr, "unable to open bts\n");
exit(1);