"Fossies" - the Fresh Open Source Software Archive

Member "opensc-0.22.0/src/libopensc/jpki.h" (10 Aug 2021, 1399 Bytes) of package /linux/privat/opensc-0.22.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "jpki.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * jpki.h: Support for JPKI(Japanese Individual Number Cards).
    3  *
    4  * Copyright (C) 2016, HAMANO Tsukasa <hamano@osstech.co.jp>
    5  *
    6  * This library is free software; you can redistribute it and/or
    7  * modify it under the terms of the GNU Lesser General Public
    8  * License as published by the Free Software Foundation; either
    9  * version 2.1 of the License, or (at your option) any later version.
   10  *
   11  * This library is distributed in the hope that it will be useful,
   12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   14  * Lesser General Public License for more details.
   15  *
   16  * You should have received a copy of the GNU Lesser General Public
   17  * License along with this library; if not, write to the Free Software
   18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   19  */
   20 
   21 #ifndef _OPENSC_JPKI_H
   22 #define _OPENSC_JPKI_H
   23 
   24 #define SELECT_MF 0
   25 #define SELECT_JPKI_AP 1
   26 
   27 #define AID_JPKI "D392f000260100000001"
   28 #define JPKI_AUTH_KEY "0017"
   29 #define JPKI_AUTH_PIN "0018"
   30 #define JPKI_AUTH_PIN_MAX_TRIES 3
   31 
   32 #define JPKI_SIGN_KEY "001A"
   33 #define JPKI_SIGN_PIN "001B"
   34 #define JPKI_SIGN_PIN_MAX_TRIES 5
   35 
   36 #define JPKI_DRVDATA(card) ((struct jpki_private_data *) ((card)->drv_data))
   37 
   38 struct jpki_private_data {
   39     sc_file_t *mf;
   40     int selected;
   41     int logged_in;
   42 };
   43 
   44 int jpki_select_ap(struct sc_card *card);
   45 
   46 #endif