aboutsummaryrefslogtreecommitdiff
path: root/security/opensc/files
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2010-12-27 09:55:39 +0000
committerAlex Dupre <ale@FreeBSD.org>2010-12-27 09:55:39 +0000
commit0e89e724f12d3574405a26a32a5d3bcd8b7464a6 (patch)
treece55251dc81edc2a7ae2f7c9faedd91325675edb /security/opensc/files
parent14981a4bd161a07f46aabcb9ee1954fc8a3ea13d (diff)
downloadports-0e89e724f12d3574405a26a32a5d3bcd8b7464a6.tar.gz
ports-0e89e724f12d3574405a26a32a5d3bcd8b7464a6.zip
Update OpenSC to 0.12.0 release.
Notes
Notes: svn path=/head/; revision=266964
Diffstat (limited to 'security/opensc/files')
-rw-r--r--security/opensc/files/patch-src_libopensc_card-piv.c11
-rw-r--r--security/opensc/files/patch-src_libopensc_internal-winscard.h11
-rw-r--r--security/opensc/files/patch-src_libopensc_reader-pcsc.c29
-rw-r--r--security/opensc/files/patch-src_signer_dialog.c97
4 files changed, 11 insertions, 137 deletions
diff --git a/security/opensc/files/patch-src_libopensc_card-piv.c b/security/opensc/files/patch-src_libopensc_card-piv.c
new file mode 100644
index 000000000000..c95c863a0458
--- /dev/null
+++ b/security/opensc/files/patch-src_libopensc_card-piv.c
@@ -0,0 +1,11 @@
+--- src/libopensc/card-piv.c.orig 2010-12-23 11:56:55.000000000 +0100
++++ src/libopensc/card-piv.c 2010-12-23 11:57:17.000000000 +0100
+@@ -28,7 +28,7 @@
+ #include <string.h>
+ #include <fcntl.h>
+ #include <limits.h>
+-#ifndef __APPLE__
++#ifdef HAVE_MALLOC_H
+ #include <malloc.h>
+ #endif
+ #ifdef ENABLE_OPENSSL
diff --git a/security/opensc/files/patch-src_libopensc_internal-winscard.h b/security/opensc/files/patch-src_libopensc_internal-winscard.h
deleted file mode 100644
index da3e56ed880f..000000000000
--- a/security/opensc/files/patch-src_libopensc_internal-winscard.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/libopensc/internal-winscard.h.orig 2010-09-01 11:37:56.000000000 +0200
-+++ src/libopensc/internal-winscard.h 2010-09-01 11:38:31.000000000 +0200
-@@ -113,7 +113,7 @@
- typedef LONG (PCSC_API *SCardStatus_t)(SCARDHANDLE hCard, LPSTR mszReaderNames, LPDWORD pcchReaderLen,
- LPDWORD pdwState, LPDWORD pdwProtocol, LPBYTE pbAtr, LPDWORD pcbAtrLen);
- typedef LONG (PCSC_API *SCardGetStatusChange_t)(SCARDCONTEXT hContext, DWORD dwTimeout,
-- LPSCARD_READERSTATE_A rgReaderStates, DWORD cReaders);
-+ LPSCARD_READERSTATE rgReaderStates, DWORD cReaders);
- typedef LONG (PCSC_API *SCardControlOLD_t)(SCARDHANDLE hCard, LPCVOID pbSendBuffer, DWORD cbSendLength,
- LPVOID pbRecvBuffer, LPDWORD lpBytesReturned);
- typedef LONG (PCSC_API *SCardControl_t)(SCARDHANDLE hCard, DWORD dwControlCode, LPCVOID pbSendBuffer,
diff --git a/security/opensc/files/patch-src_libopensc_reader-pcsc.c b/security/opensc/files/patch-src_libopensc_reader-pcsc.c
deleted file mode 100644
index 5446f9ae73e1..000000000000
--- a/security/opensc/files/patch-src_libopensc_reader-pcsc.c
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/libopensc/reader-pcsc.c.orig 2010-09-01 12:44:28.000000000 +0200
-+++ src/libopensc/reader-pcsc.c 2010-09-01 12:44:52.000000000 +0200
-@@ -80,7 +80,7 @@
-
- struct pcsc_slot_data {
- SCARDHANDLE pcsc_card;
-- SCARD_READERSTATE_A reader_state;
-+ SCARD_READERSTATE reader_state;
- DWORD verify_ioctl;
- DWORD verify_ioctl_start;
- DWORD verify_ioctl_finish;
-@@ -353,7 +353,7 @@
- sc_context_t *ctx;
- SCARDCONTEXT pcsc_ctx;
- LONG ret;
-- SCARD_READERSTATE_A rgReaderStates[SC_MAX_READERS];
-+ SCARD_READERSTATE rgReaderStates[SC_MAX_READERS];
- unsigned long on_bits, off_bits;
- time_t end_time, now, delta;
- size_t i;
-@@ -401,7 +401,7 @@
- /* Wait for a status change and return if it's a card insert/removal
- */
- for( ; ; ) {
-- SCARD_READERSTATE_A *rsp;
-+ SCARD_READERSTATE *rsp;
-
- /* Scan the current state of all readers to see if they
- * match any of the events we're polling for */
diff --git a/security/opensc/files/patch-src_signer_dialog.c b/security/opensc/files/patch-src_signer_dialog.c
deleted file mode 100644
index c70406a21bfa..000000000000
--- a/security/opensc/files/patch-src_signer_dialog.c
+++ /dev/null
@@ -1,97 +0,0 @@
---- src/signer/dialog.c.orig 2010-02-16 07:03:25.000000000 -0200
-+++ src/signer/dialog.c 2010-06-26 06:42:17.000000000 -0300
-@@ -15,31 +15,31 @@
- char *buffer;
- };
-
--static AssuanError
-+static gpg_error_t
- getpin_cb (void *opaque, const void *buffer, size_t length)
- {
- struct entry_parm_s *parm = (struct entry_parm_s *) opaque;
-
- /* we expect the pin to fit on one line */
- if (parm->lines || length >= parm->size)
-- return ASSUAN_Too_Much_Data;
-+ return gpg_error(GPG_ERR_ASS_TOO_MUCH_DATA);
-
- /* fixme: we should make sure that the assuan buffer is allocated in
- secure memory or read the response byte by byte */
- memcpy(parm->buffer, buffer, length);
- parm->buffer[length] = 0;
- parm->lines++;
-- return (AssuanError) 0;
-+ return gpg_error(GPG_ERR_NO_ERROR);
- }
-
- int ask_and_verify_pin_code(struct sc_pkcs15_card *p15card,
- struct sc_pkcs15_object *pin)
- {
-- int r;
-+ gpg_error_t r;
- size_t len;
- const char *argv[3];
- const char *pgmname = PIN_ENTRY;
-- ASSUAN_CONTEXT ctx;
-+ assuan_context_t ctx = NULL;
- char buf[500];
- char errtext[100];
- struct entry_parm_s parm;
-@@ -48,16 +48,26 @@
- argv[0] = pgmname;
- argv[1] = NULL;
-
-- r = assuan_pipe_connect(&ctx, pgmname, (char **) argv, NULL);
-+ assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT);
-+
-+ r = assuan_new(&ctx);
-+ if (r) {
-+ printf("Can't initialize assuan context: %s\n)",
-+ gpg_strerror(r));
-+ goto err;
-+ }
-+
-+ r = assuan_pipe_connect(ctx, pgmname, (const char **) argv, \
-+ NULL, NULL, NULL, 0);
- if (r) {
- printf("Can't connect to the PIN entry module: %s\n",
-- assuan_strerror((AssuanError) r));
-+ gpg_strerror(r));
- goto err;
- }
- sprintf(buf, "SETDESC Enter PIN [%s] for digital signing ", pin->label);
- r = assuan_transact(ctx, buf, NULL, NULL, NULL, NULL, NULL, NULL);
- if (r) {
-- printf("SETDESC: %s\n", assuan_strerror((AssuanError) r));
-+ printf("SETDESC: %s\n", gpg_strerror(r));
- goto err;
- }
- errtext[0] = 0;
-@@ -71,12 +81,12 @@
- parm.size = sizeof(buf);
- parm.buffer = buf;
- r = assuan_transact(ctx, "GETPIN", getpin_cb, &parm, NULL, NULL, NULL, NULL);
-- if (r == ASSUAN_Canceled) {
-- assuan_disconnect(ctx);
-+ if (gpg_err_code(r) == GPG_ERR_ASS_CANCELED) {
-+ assuan_release(ctx);
- return -2;
- }
- if (r) {
-- printf("GETPIN: %s\n", assuan_strerror((AssuanError) r));
-+ printf("GETPIN: %s\n", gpg_strerror(r));
- goto err;
- }
- len = strlen(buf);
-@@ -104,9 +114,9 @@
- break;
- }
-
-- assuan_disconnect(ctx);
-+ assuan_release(ctx);
- return 0;
- err:
-- assuan_disconnect(ctx);
-+ assuan_release(ctx);
- return -1;
- }