author | Stephen Gaul Jr <steve.gaul@oracle.com> |
Tue, 12 Jul 2016 17:34:11 -0700 | |
changeset 6401 | 8e624b116c1d |
permissions | -rw-r--r-- |
6401
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
1 |
Upstream fixes already included in the latest community updates to coolkey v1.1.0 |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
2 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
3 |
Adds header definitions for buffer mangement issues. |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
4 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
5 |
--- ORIGINAL/./src/libckyapplet/cky_base.h 2016-06-24 16:08:04.151696616 -0400 |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
6 |
+++ ././src/libckyapplet/cky_base.h 2016-06-24 12:38:03.044096949 -0400 |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
7 |
@@ -170,9 +170,15 @@ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
8 |
/* append a short in applet order */ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
9 |
CKYStatus CKYBuffer_AppendShort(CKYBuffer *buf, unsigned short val); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
10 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
11 |
+/* append a short in little endian order */ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
12 |
+CKYStatus CKYBuffer_AppendShortLE(CKYBuffer *buf, unsigned short val); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
13 |
+ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
14 |
/* append a long in applet order */ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
15 |
CKYStatus CKYBuffer_AppendLong(CKYBuffer *buf, unsigned long val); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
16 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
17 |
+/* append a long in little endian order */ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
18 |
+CKYStatus CKYBuffer_AppendLongLE(CKYBuffer *buf, unsigned long val); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
19 |
+ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
20 |
/* append data. the data starts at data and extends len bytes */ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
21 |
CKYStatus CKYBuffer_AppendData(CKYBuffer *buf, const CKYByte *data, CKYSize len); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
22 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
23 |
@@ -210,12 +216,18 @@ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
24 |
CKYStatus CKYBuffer_SetShort(CKYBuffer *buf, CKYOffset offset, unsigned short val); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
25 |
CKYStatus CKYBuffer_SetLong(CKYBuffer *buf, CKYOffset offset, unsigned long val); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
26 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
27 |
+/* These functions work in little endian order */ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
28 |
+CKYStatus CKYBuffer_SetShortLE(CKYBuffer *buf, CKYOffset offset, unsigned short val); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
29 |
+CKYStatus CKYBuffer_SetLongLE(CKYBuffer *buf, CKYOffset offset, unsigned long val); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
30 |
/* read a character from offset. If offset is beyond the end of the buffer, |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
31 |
* then the function returns '0' */ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
32 |
CKYByte CKYBuffer_GetChar(const CKYBuffer *buf, CKYOffset offset); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
33 |
/* These functions work in applet order */ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
34 |
unsigned short CKYBuffer_GetShort(const CKYBuffer *buf, CKYOffset offset); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
35 |
unsigned long CKYBuffer_GetLong(const CKYBuffer *buf, CKYOffset offset); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
36 |
+/* These functions work in little endian order */ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
37 |
+unsigned short CKYBuffer_GetShortLE(const CKYBuffer *buf, CKYOffset offset); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
38 |
+unsigned long CKYBuffer_GetLongLE(const CKYBuffer *buf, CKYOffset offset); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
39 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
40 |
/* clear out all the data in a buffer */ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
41 |
void CKYBuffer_Zero(CKYBuffer *buf); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
42 |
@@ -266,9 +278,10 @@ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
43 |
/* set Le in the APDU header to the amount of bytes expected to be |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
44 |
* returned. */ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
45 |
CKYStatus CKYAPDU_SetReceiveLen(CKYAPDU *apdu, CKYByte recvlen); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
46 |
+CKYStatus CKYAPDU_AppendReceiveLen(CKYAPDU *apdu, CKYByte recvlen); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
47 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
48 |
/* set the parent loadmodule name */ |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
49 |
-void CKY_SetName(char *name); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
50 |
+void CKY_SetName(const char *name); |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
51 |
|
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
52 |
CKY_END_PROTOS |
8e624b116c1d
PSARC/2016/219 Coolkey PKCS#11 provider for smartcard devices
Stephen Gaul Jr <steve.gaul@oracle.com>
parents:
diff
changeset
|
53 |