blob: 9042594f2c41f977f5c9e0ea0813dfa645c5c62e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/*
* ISO 7816 command handler for GSM SIM commands
*
* Copyright (C) 2012 Harald Welte <laforge@gnumonks.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 or
* (at your option) version 3 of the License.
*
* 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.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include <osmocom/core/utils.h>
#include "apdu.h"
static int cmd_select_file(struct apdu_parser *ap, int mode,
const struct apdu_hdr *hdr)
{
return RV_SW(0x9000);
}
static const struct apdu_cmd gsm_cmds[] = {
{ .ins = 0xA4, .cb = cmd_select_file },
};
const struct apdu_class gsm_class = {
.mask = 0xff,
.compare = 0xa0,
.cmds = gsm_cmds,
.num_cmds = ARRAY_SIZE(gsm_cmds),
};
|