Include stdlib.h where needed
Warning fixes for various OS's mcheck.h is not portable, so remove it git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@285 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
f0d4252ea0
commit
2a4afb8319
|
@ -20,11 +20,11 @@
|
|||
|
||||
#include "sc-internal.h"
|
||||
#include "sc-log.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
static struct sc_atr_table miocos_atrs[] = {
|
||||
{ "\x3B\x9D\x94\x40\x23\x00\x68\x10\x11\x4D\x69\x6F\x43\x4F"
|
||||
"\x53\x00\x90\x00", 18 },
|
||||
{ (const u8 *) "\x3B\x9D\x94\x40\x23\x00\x68\x10\x11\x4D\x69\x6F\x43\x4F\x53\x00\x90\x00", 18 },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include "sc-internal.h"
|
||||
#include "sc-log.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define SETEC_PKI 1
|
||||
|
@ -27,11 +28,11 @@
|
|||
|
||||
static struct sc_atr_table setcos_atrs[] = {
|
||||
/* the current FINEID card has this ATR: */
|
||||
{ "\x3B\x9F\x94\x40\x1E\x00\x67\x11\x43\x46\x49\x53\x45\x10\x52\x66\xFF\x81\x90\x00", 20, SETEC_PKI },
|
||||
{ (const u8 *) "\x3B\x9F\x94\x40\x1E\x00\x67\x11\x43\x46\x49\x53\x45\x10\x52\x66\xFF\x81\x90\x00", 20, SETEC_PKI },
|
||||
/* RSA SecurID 3100 */
|
||||
{ "\x3B\x9F\x94\x40\x1E\x00\x67\x16\x43\x46\x49\x53\x45\x10\x52\x66\xFF\x81\x90\x00", 20, SETEC_PKI },
|
||||
{ (const u8 *) "\x3B\x9F\x94\x40\x1E\x00\x67\x16\x43\x46\x49\x53\x45\x10\x52\x66\xFF\x81\x90\x00", 20, SETEC_PKI },
|
||||
/* this is from a Nokia branded SC */
|
||||
{ "\x3B\1F\x11\x00\x67\x80\x42\x46\x49\x53\x45\x10\x52\x66\xFF\x81\x90\x00", 18, SETEC_OTHER },
|
||||
{ (const u8 *) "\x3B\1F\x11\x00\x67\x80\x42\x46\x49\x53\x45\x10\x52\x66\xFF\x81\x90\x00", 18, SETEC_OTHER },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -96,11 +96,9 @@ static int add_padding(struct sc_context *ctx, const u8 *in, size_t inlen, u8 *o
|
|||
{
|
||||
u8 buf[64];
|
||||
size_t buflen;
|
||||
const u8 *hdr_md5 = "\x30\x20\x30\x0c\x06\x08\x2a\x86\x48\x86\xf7"
|
||||
"\x0d\x02\x05\x05\x05\x00\x04\x10";
|
||||
const u8 *hdr_md5 = (const u8 *) "\x30\x20\x30\x0c\x06\x08\x2a\x86\x48\x86\xf7\x0d\x02\x05\x05\x05\x00\x04\x10";
|
||||
size_t hdr_md5_len = 19;
|
||||
const u8 *hdr_sha1 = "\x30\x21\x30\x09\x06\x05\x2b\x0e\x03\x02\x1a"
|
||||
"\x05\x00\x04\x10";
|
||||
const u8 *hdr_sha1 = (const u8 *) "\x30\x21\x30\x09\x06\x05\x2b\x0e\x03\x02\x1a\x05\x00\x04\x10";
|
||||
size_t hdr_sha1_len = 15;
|
||||
|
||||
if (flags & SC_ALGORITHM_RSA_HASH_SHA1) {
|
||||
|
|
|
@ -46,12 +46,12 @@ static int cflex_update_pin(struct sc_card *card, struct pin_info *info)
|
|||
memset(p, 0xFF, 3);
|
||||
p += 3;
|
||||
memset(p, '-', 8);
|
||||
strncpy(p, info->secret[0], 8);
|
||||
strncpy((char *) p, info->secret[0], 8);
|
||||
p += 8;
|
||||
*p++ = info->attempt[0];
|
||||
*p++ = info->attempt[0];
|
||||
memset(p, '-', 8);
|
||||
strncpy(p, info->secret[0], 8);
|
||||
strncpy((char *) p, info->secret[0], 8);
|
||||
p += 8;
|
||||
*p++ = info->attempt[1];
|
||||
*p++ = info->attempt[1];
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
* There are a very few tasks that are too card specific to have
|
||||
* a generic implementation; that is how PINs and keys are stored
|
||||
* on the card. These should be implemented in pkcs-<cardname>.c
|
||||
* on the card. These should be implemented in pkcs15-<cardname>.c
|
||||
*
|
||||
* Copyright (C) 2002, Olaf Kirch <okir@lst.de>
|
||||
*
|
||||
|
@ -171,8 +171,6 @@ static char * opt_newkey = 0;
|
|||
static char * opt_outkey = 0;
|
||||
static struct pkcs15_init_operations ops;
|
||||
|
||||
#include <mcheck.h>
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
|
|
|
@ -947,7 +947,7 @@ do_prkey_algorithm(int argc, char **argv)
|
|||
{
|
||||
struct sc_key_template *ki = cur_key;
|
||||
|
||||
if (map_str2int(argv[0], &ki->pkcs15_obj.type, algorithmNames))
|
||||
if (map_str2int(argv[0], (unsigned int *) &ki->pkcs15_obj.type, algorithmNames))
|
||||
return 1;
|
||||
switch (ki->pkcs15_obj.type) {
|
||||
case SC_PKCS15_TYPE_PRKEY_RSA:
|
||||
|
@ -1074,7 +1074,7 @@ do_pubkey_algorithm(int argc, char **argv)
|
|||
{
|
||||
struct sc_key_template *ki = cur_key;
|
||||
|
||||
if (map_str2int(argv[0], &ki->pkcs15_obj.type, algorithmNames))
|
||||
if (map_str2int(argv[0], (unsigned int *) &ki->pkcs15_obj.type, algorithmNames))
|
||||
return 1;
|
||||
ki->pkcs15.pub.access_flags = DEF_PUBKEY_ACCESS;
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue