Harald Welte | 3aa901d | 2018-08-13 18:32:36 +0200 | [diff] [blame] | 1 | /*! \file main.c */ |
| 2 | /* |
| 3 | * (C) 2018 by Harald Welte <laforge@gnumonks.org> |
| 4 | * |
| 5 | * All Rights Reserved |
| 6 | * |
| 7 | * SPDX-License-Identifier: GPL-2.0+ |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License as published by |
| 11 | * the Free Software Foundation; either version 2 of the License, or |
| 12 | * (at your option) any later version. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU General Public License for more details. |
| 18 | * |
Harald Welte | 3aa901d | 2018-08-13 18:32:36 +0200 | [diff] [blame] | 19 | */ |
| 20 | |
| 21 | #include <string.h> |
| 22 | #include <stdint.h> |
| 23 | #include <stdio.h> |
| 24 | #include <errno.h> |
| 25 | |
| 26 | #include <talloc.h> |
| 27 | #include <osmocom/core/linuxlist.h> |
Harald Welte | 3aa901d | 2018-08-13 18:32:36 +0200 | [diff] [blame] | 28 | |
| 29 | #include <wintypes.h> |
| 30 | #include <winscard.h> |
| 31 | |
| 32 | #include "internal.h" |
| 33 | |
Harald Welte | 77911b0 | 2018-08-14 23:47:30 +0200 | [diff] [blame] | 34 | static void *g_ctx; |
| 35 | __thread void *talloc_asn1_ctx; |
Harald Welte | 43ab79f | 2018-10-03 23:34:21 +0200 | [diff] [blame] | 36 | int asn_debug; |
Harald Welte | 77911b0 | 2018-08-14 23:47:30 +0200 | [diff] [blame] | 37 | |
Harald Welte | 3aa901d | 2018-08-13 18:32:36 +0200 | [diff] [blame] | 38 | int main(int argc, char **argv) |
| 39 | { |
Harald Welte | 43ab79f | 2018-10-03 23:34:21 +0200 | [diff] [blame] | 40 | asn_debug = 0; |
Harald Welte | 77911b0 | 2018-08-14 23:47:30 +0200 | [diff] [blame] | 41 | g_ctx = talloc_named_const(NULL, 0, "main"); |
| 42 | talloc_asn1_ctx = talloc_named_const(g_ctx, 0, "asn1_context"); |
| 43 | card_readers_probe(g_ctx); |
Martin Hauke | 0584575 | 2018-10-13 20:43:57 +0200 | [diff] [blame] | 44 | return 0; |
Harald Welte | 3aa901d | 2018-08-13 18:32:36 +0200 | [diff] [blame] | 45 | } |