Check-in [6723914ef9]
Overview
Comment:Removed incomplete and never-used SPM implementation
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6723914ef908adb365b0baaf9bd599a2c7d44052
User & Date: rkeene on 2011-08-24 03:44:12
Other Links: manifest | tags
Context
2011-08-25
04:00
Fixed bug in UUID of package

Added PKCS11.tokend package to CACKey on Mac OS X

Removed legacy (pre-Mac OS X 10.5) build support check-in: 059330a9a5 user: rkeene tags: trunk

2011-08-24
03:44
Removed incomplete and never-used SPM implementation check-in: 6723914ef9 user: rkeene tags: trunk
03:36
Corrected typo check-in: 8cb81a67c7 user: rkeene tags: trunk
Changes

Deleted cackey_spm.c version [2a7170f089].

     1         -/*
     2         - * GSC-IS (v2.1) Service Call Level Service Provider Module for PC/SC Lite and
     3         - * DoD CAC/CACv2/PIV/PIVv2 Cards
     4         - */
     5         -
     6         -#ifdef HAVE_CONFIG_H
     7         -#include "config.h"
     8         -#endif
     9         -
    10         -#include "cackey_spm.h"
    11         -
    12         -#ifdef HAVE_STDIO_H
    13         -#  include <stdio.h>
    14         -#endif
    15         -#ifdef HAVE_STDLIB_H
    16         -#  include <stdlib.h>
    17         -#endif
    18         -
    19         -unsigned long gscBsiUtilAcquireContext(unsigned long hCard, unsigned char *AID, struct BSIAuthenticator strctAuthenticator[], unsigned long authNb) {
    20         -}
    21         -
    22         -unsigned long gscBsiUtilConnect(unsigned char *readerName, unsigned long *hCard) {
    23         -}
    24         -
    25         -unsigned long gscBsiUtilDisconnect(unsigned long hCard) {
    26         -}
    27         -
    28         -unsigned long gscBsiUtilBeginTransaction(unsigned long hCard, _Bool blType) {
    29         -}
    30         -
    31         -unsigned long gscBsiUtilEndTransaction(unsigned long hCard) {
    32         -}
    33         -
    34         -unsigned long gscBsiUtilGetVersion(unsigned char **version) {
    35         -	int sprintf_ret;
    36         -
    37         -	if (version == NULL) {
    38         -		return(BSI_UNKNOWN_ERROR);
    39         -	}
    40         -
    41         -	if (*version == NULL) {
    42         -		sprintf_ret = sprintf(NULL, "2,1,0,%s", PACKAGE_VERSION);
    43         -
    44         -		if (sprintf_ret <= 0) {
    45         -			return(BSI_UNKNOWN_ERROR);
    46         -		}
    47         -
    48         -		*version = malloc(sprintf_ret + 1);
    49         -	}
    50         -
    51         -	/* Hopefully their buffer is large enough ... */
    52         -	sprintf(*version, "2,1,0,%s", PACKAGE_VERSION);
    53         -
    54         -	return(BSI_OK);
    55         -}
    56         -
    57         -unsigned long gscBsiUtilGetCardProperties(unsigned long hCard, unsigned char **CCCUniqueID, unsigned long *cardCapability) {
    58         -}
    59         -
    60         -unsigned long gscBsiUtilGetCardStatus(unsigned long hCard) {
    61         -}
    62         -
    63         -unsigned long gscBsiUtilGetExtendedErrorText(unsigned long hCard, unsigned char **errorText) {
    64         -	if (errorText == NULL) {
    65         -		return(BSI_UNKNOWN_ERROR);
    66         -	}
    67         -
    68         -	*errorText = NULL;
    69         -
    70         -	return(BSI_NO_TEXT_AVAILABLE);
    71         -}
    72         -
    73         -unsigned long gscBsiUtilGetReaderList(unsigned char ***readerList) {
    74         -}
    75         -
    76         -unsigned long gscBsiUtilPassthru(unsigned long hCard, unsigned char *cardCommand, unsigned char **cardResponse) {
    77         -}
    78         -
    79         -unsigned long gscBsiUtilReleaseContext(unsigned long hCard, unsigned char *AID) {
    80         -}
    81         -
    82         -unsigned long gscBsiGcDataCreate(unsigned long hCard, unsigned char *AID, unsigned char tag, unsigned char *value) {
    83         -}
    84         -
    85         -unsigned long gscBsiGcDataDelete(unsigned long hCard, unsigned char *AID, unsigned char tag) {
    86         -}
    87         -
    88         -unsigned long gscBsiGcGetContainerProperties(unsigned long hCard, unsigned char *AID, struct GCacr *strctGCacr, struct GCContainerSize *strctContainerSizes, unsigned char **containerVersion) {
    89         -}
    90         -
    91         -unsigned long gscBsiGcReadTagList(unsigned long hCard, unsigned char *AID, unsigned char **tagArray) {
    92         -}
    93         -
    94         -unsigned long gscBsiGcReadValue(unsigned long hCard, unsigned char *AID, unsigned char tag, unsigned char **value) {
    95         -}
    96         -
    97         -unsigned long gscBsiGcUpdateValue(unsigned long hCard, unsigned char *AID, unsigned char tag, unsigned char *value) {
    98         -}
    99         -
   100         -unsigned long gscBsiGetChallenge(unsigned long hCard, unsigned char *AID, unsigned char **challenge) {
   101         -}
   102         -
   103         -unsigned long gscBsiSkiInternalAuthenticate(unsigned long hCard, unsigned char *AID, unsigned char algoID, unsigned char *challenge, unsigned char **cryptogram) {
   104         -}
   105         -
   106         -unsigned long gscBsiPkiCompute(unsigned long hCard, unsigned char *AID, unsigned char algoID, unsigned char *message, unsigned char **result) {
   107         -}
   108         -
   109         -unsigned long gscBsiPkiGetCertificate(unsigned long hCard, unsigned char *AID, unsigned char **Certificate) {
   110         -}
   111         -
   112         -unsigned long gscBsiGetCryptoProperties(unsigned long hCard, unsigned char *AID, struct CRYPTOacr *strctCRYPTOacr, unsigned long *keyLen) {
   113         -}

Deleted cackey_spm.h version [8f907a66a1].

     1         -/*
     2         - * GSC-IS (v2.1) Service Call Level Service Provider Module for PC/SC Lite and
     3         - * DoD CAC/CACv2/PIV/PIVv2 Cards
     4         - */
     5         -
     6         -/* Access ... ? */
     7         -#define BSI_AM_XAUTH                 0x02
     8         -#define BSI_AM_SECURE_CHANNEL_GP     0x04
     9         -#define BSI_AM_PIN                   0x06
    10         -#define BSI_AM_SECURE_CHANNEL_ISO    0x0B
    11         -
    12         -/* Access Control Rules */
    13         -#define BSI_ACR_ALWYS                0x00
    14         -#define BSI_ACR_NEVER                0x01
    15         -#define BSI_ACR_XAUTH                0x02
    16         -#define BSI_ACR_XAUTH_OR_PIN         0x03
    17         -#define BSI_SECURE_CHANNEL_GP        0x04 /* typo in spec? */
    18         -#define BSI_ACR_SECURE_CHANNEL_GP    0x04
    19         -#define BSI_ACR_PIN_ALWAYS           0x05
    20         -#define BSI_ACR_PIN                  0x06
    21         -#define BSI_ACR_XAUTH_THEN_PIN       0x07
    22         -#define BSI_ACR_UPDATE_ONCE          0x08
    23         -#define BSI_ACR_PIN_THEN_XAUTH       0x09
    24         -#define BSI_SECURE_CHANNEL_ISO       0x0B /* typo in spec? */
    25         -#define BSI_ACR_SECURE_CHANNEL_ISO   0x0B
    26         -#define BSI_ACR_XAUTH_AND_PIN        0x0C
    27         -
    28         -/* Algorithms */
    29         -#define BSI_CKM_DES3_ECB             0x81
    30         -#define BSI_CKM_DES3_CBC             0x82
    31         -#define BSI_CKM_RSA_NO_PAD           0xA3
    32         -
    33         -/* Return Codes */
    34         -#define BSI_OK                       0x00
    35         -#define BSI_ACCESS_DENIED            0x01
    36         -#define BSI_ACR_NOT_AVAILABLE        0x02
    37         -#define BSI_BAD_AID                  0x03
    38         -#define BSI_BAD_ALGO_ID              0x04
    39         -#define BSI_BAD_AUTH                 0x05
    40         -#define BSI_BAD_HANDLE               0x06
    41         -#define BSI_BAD_PARAM                0x07
    42         -#define BSI_BAD_TAG                  0x08
    43         -#define BSI_CARD_ABSENT              0x09
    44         -#define BSI_CARD_REMOVED             0x0A
    45         -#define BSI_NO_SPSSERVICE            0x0B
    46         -#define BSI_IO_ERROR                 0x0C
    47         -#define BSI_INSUFFICIENT_BUFFER      0x0E
    48         -#define BSI_NO_CARDSERVICE           0x0F
    49         -#define BSI_NO_MORE_SPACE            0x10
    50         -#define BSI_PIN_BLOCKED              0x11
    51         -#define BSI_TAG_EXISTS               0x13
    52         -#define BSI_TIMEOUT_ERROR            0x14
    53         -#define BSI_TERMINAL_AUTH            0x15
    54         -#define BSI_NO_TEXT_AVAILABLE        0x16
    55         -#define BSI_UNKNOWN_ERROR            0x17
    56         -#define BSI_UNKNOWN_READER           0x18
    57         -#define BSI_SC_LOCKED                0x19
    58         -#define BSI_NOT_TRANSACTED           0x20
    59         -
    60         -#define MaxNbAM 50
    61         -
    62         -struct BSIAcr {
    63         -	unsigned long ACRType;
    64         -	unsigned long keyIDOrReference[MaxNbAM];
    65         -	unsigned long AuthNb;
    66         -	unsigned long ACRID;
    67         -};
    68         -
    69         -struct GCacr {
    70         -	struct BSIAcr createACR;
    71         -	struct BSIAcr deleteACR;
    72         -	struct BSIAcr readTagListACR;
    73         -	struct BSIAcr readValueACR;
    74         -	struct BSIAcr updateValueACR;
    75         -};
    76         -
    77         -struct GCContainerSize {
    78         -	unsigned long maxNbDataItems;
    79         -	unsigned long maxValueStorageSize;
    80         -	
    81         -};
    82         -
    83         -struct CRYPTOacr {
    84         -	struct BSIAcr getChallengeACR;
    85         -	struct BSIAcr internalAuthenticateACR;
    86         -	struct BSIAcr pkiComputeACR;
    87         -	struct BSIAcr createACR;
    88         -	struct BSIAcr deleteACR;
    89         -	struct BSIAcr readTagListACR;
    90         -	struct BSIAcr readValueACR;
    91         -	struct BSIAcr updateValueACR;
    92         -};
    93         -
    94         -struct BSIAuthenticator {
    95         -};
    96         -
    97         -unsigned long gscBsiUtilAcquireContext(unsigned long hCard, unsigned char *AID, struct BSIAuthenticator strctAuthenticator[], unsigned long authNb);
    98         -unsigned long gscBsiUtilConnect(unsigned char *readerName, unsigned long *hCard);
    99         -unsigned long gscBsiUtilDisconnect(unsigned long hCard);
   100         -unsigned long gscBsiUtilBeginTransaction(unsigned long hCard, _Bool blType);
   101         -unsigned long gscBsiUtilEndTransaction(unsigned long hCard);
   102         -unsigned long gscBsiUtilGetVersion(unsigned char **version);
   103         -unsigned long gscBsiUtilGetCardProperties(unsigned long hCard, unsigned char **CCCUniqueID, unsigned long *cardCapability);
   104         -unsigned long gscBsiUtilGetCardStatus(unsigned long hCard);
   105         -unsigned long gscBsiUtilGetExtendedErrorText(unsigned long hCard, unsigned char **errorText);
   106         -unsigned long gscBsiUtilGetReaderList(unsigned char ***readerList);
   107         -unsigned long gscBsiUtilPassthru(unsigned long hCard, unsigned char *cardCommand, unsigned char **cardResponse);
   108         -unsigned long gscBsiUtilReleaseContext(unsigned long hCard, unsigned char *AID);
   109         -unsigned long gscBsiGcDataCreate(unsigned long hCard, unsigned char *AID, unsigned char tag, unsigned char *value);
   110         -unsigned long gscBsiGcDataDelete(unsigned long hCard, unsigned char *AID, unsigned char tag);
   111         -unsigned long gscBsiGcGetContainerProperties(unsigned long hCard, unsigned char *AID, struct GCacr *strctGCacr, struct GCContainerSize *strctContainerSizes, unsigned char **containerVersion);
   112         -unsigned long gscBsiGcReadTagList(unsigned long hCard, unsigned char *AID, unsigned char **tagArray);
   113         -unsigned long gscBsiGcReadValue(unsigned long hCard, unsigned char *AID, unsigned char tag, unsigned char **value);
   114         -unsigned long gscBsiGcUpdateValue(unsigned long hCard, unsigned char *AID, unsigned char tag, unsigned char *value);
   115         -unsigned long gscBsiGetChallenge(unsigned long hCard, unsigned char *AID, unsigned char **challenge);
   116         -unsigned long gscBsiSkiInternalAuthenticate(unsigned long hCard, unsigned char *AID, unsigned char algoID, unsigned char *challenge, unsigned char **cryptogram);
   117         -unsigned long gscBsiPkiCompute(unsigned long hCard, unsigned char *AID, unsigned char algoID, unsigned char *message, unsigned char **result);
   118         -unsigned long gscBsiPkiGetCertificate(unsigned long hCard, unsigned char *AID, unsigned char **Certificate);
   119         -unsigned long gscBsiGetCryptoProperties(unsigned long hCard, unsigned char *AID, struct CRYPTOacr *strctCRYPTOacr, unsigned long *keyLen);