aboutsummaryrefslogtreecommitdiff
path: root/security/sectok
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2015-05-22 07:10:00 +0000
committerXin LI <delphij@FreeBSD.org>2015-05-22 07:10:00 +0000
commit4d6a5b28b4da94186f6cf8b3d382f46182f09096 (patch)
tree89310c9e5b4e756e9b79f4325216f79e8939fa4f /security/sectok
parentdd5bb00341bb402a1375f2ae8b4ef775dbb32322 (diff)
downloadports-4d6a5b28b4da94186f6cf8b3d382f46182f09096.tar.gz
ports-4d6a5b28b4da94186f6cf8b3d382f46182f09096.zip
Use new DES_ methods instead of the long deprecated des_ methods.
PR: 198366 Submitted by: Bernard Spil <spil.oss gmail com>
Notes
Notes: svn path=/head/; revision=386986
Diffstat (limited to 'security/sectok')
-rw-r--r--security/sectok/Makefile2
-rw-r--r--security/sectok/files/patch-cyberflex.c48
2 files changed, 47 insertions, 3 deletions
diff --git a/security/sectok/Makefile b/security/sectok/Makefile
index 71241295772e..d3cc082b8936 100644
--- a/security/sectok/Makefile
+++ b/security/sectok/Makefile
@@ -3,7 +3,7 @@
PORTNAME= sectok
PORTVERSION= 20030825
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= http://www.citi.umich.edu/projects/smartcard/
EXTRACT_SUFX= .tgz
diff --git a/security/sectok/files/patch-cyberflex.c b/security/sectok/files/patch-cyberflex.c
index 5dbbf31f50a5..30bfa6e6f29c 100644
--- a/security/sectok/files/patch-cyberflex.c
+++ b/security/sectok/files/patch-cyberflex.c
@@ -1,5 +1,5 @@
---- cyberflex.c.orig Thu Jun 19 23:37:35 2003
-+++ cyberflex.c Mon Sep 29 00:58:56 2003
+--- cyberflex.c.orig 2003-06-20 00:37:35.000000000 +0200
++++ cyberflex.c 2015-02-28 15:57:55.093727371 +0100
@@ -48,7 +48,13 @@
#define SHA1Init SHA1_Init
#define SHA1Update SHA1_Update
@@ -15,3 +15,47 @@
#include <sha1.h>
#endif
#else
+@@ -69,7 +75,7 @@
+ #include "sc.h"
+
+ #ifdef __sun
+-#define des_set_key(key, schedule) des_key_sched(key, schedule)
++#define DES_set_key(key, &schedule) DES_key_sched(key, &schedule)
+ #endif
+
+ #define JDIRSIZE 40
+@@ -91,7 +97,7 @@
+
+ #ifndef __palmos__
+ /* default signed applet key of Cyberflex Access */
+-static des_cblock app_key = {0x6A, 0x21, 0x36, 0xF5, 0xD8, 0x0C, 0x47, 0x83};
++static DES_cblock app_key = {0x6A, 0x21, 0x36, 0xF5, 0xD8, 0x0C, 0x47, 0x83};
+ #endif
+
+ static int
+@@ -663,8 +669,8 @@
+ unsigned char aid[16], app_data[MAX_APP_SIZE], data[MAX_BUF_SIZE];
+ int i, j, vflag = 0, gotprog = 0, gotcont = 0, fd_app, size, aidlen = 0, sw;
+ int cont_size = 1152, inst_size = 1024;
+- des_cblock tmp;
+- des_key_schedule schedule;
++ DES_cblock tmp;
++ DES_key_schedule schedule;
+ static unsigned char acl[] = {0x81, 0, 0, 0xff, 0, 0, 0, 0};
+
+ optind = optreset = 1;
+@@ -777,12 +783,12 @@
+ /* chain. DES encrypt one block, XOR the cyphertext with the next block,
+ ... continues until the end of the buffer */
+
+- des_set_key (&app_key, schedule);
++ DES_set_key (&app_key, &schedule);
+
+ for (i = 0; i < size/BLOCK_SIZE; i++) {
+ for (j = 0; j < BLOCK_SIZE; j++)
+ tmp[j] = tmp[j] ^ app_data[i*BLOCK_SIZE + j];
+- des_ecb_encrypt (&tmp, &tmp, schedule, DES_ENCRYPT);
++ DES_ecb_encrypt (&tmp, &tmp, &schedule, DES_ENCRYPT);
+ }
+
+ if (vflag) {