used as part of the
detection process in Windows.
This release can be found at the following locations:
https://www.spice-space.org/download/libcacard/
https://gitlab.freedesktop.org/spice/libcacard/-/releases
It is signed with my GPG key:
F7DC 50A5 7DFD 52B9 4253 295E F649 07AC 15B5 C33D
Jakub
/
https://gitlab.freedesktop.org/spice/libcacard/-/releases
It is signed with Viktor Toso's GPG key:
206D 3B35 2F56 6F3B 0E65 72E9 97D9 123D E37A 484F
Regards,
Jakub Jelen
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
Hello all,
during my work on libcacard, I identified several issues that are
not completely related to the thing I was working on, but make sense
to have them fixed, including potential crashes, and behavior
that does not match existing cards.
They are fixed in the following commits. Other feature
without PCSC support and adds colors
for better oriantation in the differences.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
Makefile.am | 4 +-
src/vscclient.c | 161 +---
2 files changed, 156 insertions(+), 9 deletions(-)
diff --git a
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/vcard_emul_nss.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/vcard_emul_nss.c b/src/vcard_emul_nss.c
index c320f8f..c75bc3b 100644
--- a/src/vcard_emul_nss.c
+++ b/src/vcard_emul_nss.c
@@ -673,6 +673,7
* In case we already know that the card does not know raw RSA
nor the data look like PKCS#1.5, we need to gracefully return.
* If the client passed invalid data, the applications used to
segfault here because of negative length argument to memset().
Signed-off-by: Jakub Jelen
Reviewed
* This might need some attention
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/vcard.c | 4
src/vcard_emul_nss.c | 4
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/vcard.c b/src/vcard.c
index 2edf1d0..afa3bb8 100644
--- a/src/vcard.c
+++ b/src
* This structure was never freed
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/vcard_emul_nss.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/vcard_emul_nss.c b/src/vcard_emul_nss.c
index f2678d5..0c8f0e9 100644
--- a/src/vcard_emul_nss.c
+++ b/src/vcard_emul_nss.c
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
README.md | 2 ++
docs/libcacard.txt | 48 --
2 files changed, 27 insertions(+), 23 deletions(-)
diff --git a/README.md b/README.md
index 3f4b9bf..ec67f02 100644
--- a/README.md
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/vcard_emul_nss.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/vcard_emul_nss.c b/src/vcard_emul_nss.c
index 0c8f0e9..c320f8f 100644
--- a/src/vcard_emul_nss.c
+++ b/src/vcard_emul_nss.c
@@ -246,7 +246,7
APDU request (I would left for consideration to
somehow log such problem).
Patch was successfully tested on Fedora 24 host and solves our problem
(though we worked around the problem already in the driver too).
[1] https://github.com/SPICE/libcacard/pull/1
Kind regards,
Jakub Jelen
>F
The patch was prepared using git format-patch
If the send-email was intended, it should be mentioned explicitly.
[1] http://www.spice-space.org/developers.html
Regards,
--
Jakub Jelen
Associate Software Engineer
Security Technologies
Red Hat
___
Spice-d
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac.c| 4
src/card_7816.c | 2 ++
src/vcard_emul_nss.c | 1 +
3 files changed, 7 insertions(+)
diff --git a/src/cac.c b/src/cac.c
index 34ea03a..8adb7f3 100644
--- a/src/cac.c
+++ b/src/cac.c
@@ -1,6 +1,9
location of the CI once it will be set up, but for now, they point to my
fork on gitlab, where the results can be observed:
https://gitlab.com/jjelen/libcacard/
Regards,
Jakub Jelen
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/common.c | 40
src/common.h | 2 ++
2 files changed, 42 insertions(+)
diff --git a/src/common.c b/src/common.c
index 521ef51..2e06314 100644
--- a/src/common.c
+++ b/src/common.c
@@ -26,7
(from "5.3.3.5 Get ACR APDU" of GSC-IS 2.1)
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
Makefile.am|2 +
docs/libcacard.txt |1 +
src/cac-aca.c | 1106
src/cac-aca.h | 32 ++
src/cac.c
* Introduce a new API to get the key size from the key to present it in
CAC properties structures later
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
docs/libcacard.txt | 4
src/libcacard.syms | 1 +
src/vcard_emul.h | 1 +
src/vcard_emul_nss.c | 22
* Also verify the key size inside matches expectation
* This involves parsing SimpleTLV structures
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/libcacard.c | 61 +++
1 file changed, 56 insertions(+), 5 deletions(-)
diff --git a
* So far, the ACA tables were static from existing card.
* This change allows adjusting the ACA tables based on the real
certificates and PKI applets present in virtual smart card
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac-aca.c | 244
* The CAC is sometimes using nested SimpleTLV structures that might
be ambiguous, which is covered too.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
Makefile.am| 13 ++-
docs/libcacard.txt | 1 +
tests/simpletlv.c | 207
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/simpletlv.c | 11 -
src/simpletlv.h | 5 ++--
tests/simpletlv.c | 60 +++
3 files changed, 73 insertions(+), 3 deletions(-)
diff --git a/src/simpletlv.c b/src/simpletlv.c
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
build-aux/glib-tap.mk | 2 +-
build-aux/glib.supp | 35 +++
build-aux/nss.supp| 81 +++
3 files changed, 117 insertions(+), 1 deletion(-)
create mode 100644 build-aux
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/libcacard.c | 48 ---
1 file changed, 41 insertions(+), 7 deletions(-)
diff --git a/tests/libcacard.c b/tests/libcacard.c
index 0e3d10b..5bbd080 100644
--- a/tests/libcacard.c
+++ b
dynamically
allocated. The dynamic one need to be recursivelly freed.
* Dynamic structures can be created by mergig other provided structures,
which is common in ACA, where all the responses are prefixed with
applet information.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
* This involves creation of properties structures in the applet,
that are used to discover pki buffers in the applet and its
properties.
* This also removes the old way of accessing certificates using
GET CERTIFICATE APDU
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src
generic ISO 7816 code, but the responses are improved.
* This loads the GP applet separately from CAC applet
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
Makefile.am | 2 +
docs/libcacard.txt| 1 +
src/cac.c | 38 +++-
src/card_7816.c
* Make sure the GET PROPERTIES APDU returns something on every applet
* Make sure the GET ACR APDU returns something reasonable on ACA applet
with valid and invalid parameters
* Make sure the READ BUFFER APDU retunrs valid buffers
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
README.md | 4
1 file changed, 4 insertions(+)
diff --git a/README.md b/README.md
index ec67f02..6edef77 100644
--- a/README.md
+++ b/README.md
@@ -22,4 +22,8 @@ This project was originally developped by:
- Alon Levy
- Robert
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
m4/ax_append_compile_flags.m4 | 65 -
m4/ax_append_flag.m4| 71 --
m4/ax_append_link_flags.m4 | 63 -
m4/ax_check_compile_flag.m4 | 74 ---
m4/ax_check_enable_debug.m4 | 124
CF (Access Control File) are one of the
mandatory parts of CAC, but they are not exposed in PKCS#11
and impossible to emulate (signatures of the internal structures),
but ActivClient does not really need them.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac.c
* This function creates a deep copy of the whole structure.
* The new structure is dynamically allocated and needs to be freed.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/simpletlv.c | 42 ++
src/simpletlv.h | 9 +
tests
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/cac.c b/src/cac.c
index 4b54e91..c7b5006 100644
--- a/src/cac.c
+++ b/src/cac.c
@@ -627,6 +627,7 @@ cac_new_pki_applet_private(int i, const unsigned
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac.c | 315 ++
1 file changed, 315 insertions(+)
diff --git a/src/cac.c b/src/cac.c
index c7b5006..947f622 100644
--- a/src/cac.c
+++ b/src/cac.c
@@ -770,6 +770,321 @@ failure
* The Card Capability Container (CCC) is mandatory applet of CAC 2
and is used to discover other applets, card capabilities and
properties
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac.c | 359 +-
src/cac.h | 15
* This function is used to read generic data objects presented by
the underlying card, if available. It can provide some structures
that we are not able to emulate in softeare card.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
docs/libcacard.txt | 8 +++
src
Rewrite tests to read buffers directly without explicit GET RESPONSE APDU
requests.
Test GET RESPONSE APDU separately.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/libcacard.c | 171 --
1 file changed, 106 insertions(+), 65
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/libcacard.c | 60 +++
1 file changed, 56 insertions(+), 4 deletions(-)
diff --git a/tests/libcacard.c b/tests/libcacard.c
index adbf0f8..0e3d10b 100644
--- a/tests/libcacard.c
+++ b
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/libcacard.c | 99 +++
1 file changed, 99 insertions(+)
diff --git a/tests/libcacard.c b/tests/libcacard.c
index 650e2e7..ea9cee6 100644
--- a/tests/libcacard.c
+++ b/tests/libcacard.c
* The PKI Credential, PKI Certificate and Person Instance applets
are hard to emulate with bogus data and therefore we will
make them available from the existing cards.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac.c | 260
* This provides the real list of applets in the emulated card
in the CCC applet CardURLs, which is mandatory for applet and certificated
discovery.
* This also increaseses the amount of possible certificates to 10
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac.c
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/common.c| 74 +++
tests/common.h| 2 ++
tests/hwtests.c | 23 +++
tests/libcacard.c | 46 -
4 files changed, 99 insertions(+), 46
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/libcacard.c | 4
1 file changed, 4 insertions(+)
diff --git a/tests/libcacard.c b/tests/libcacard.c
index ea9cee6..3abd1a9 100644
--- a/tests/libcacard.c
+++ b/tests/libcacard.c
@@ -163,6 +163,7 @@ static void get_properties
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/libcacard.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/tests/libcacard.c b/tests/libcacard.c
index 5bbd080..9fc4462 100644
--- a/tests/libcacard.c
+++ b/tests/libcacard.c
@@ -157,6 +157,10 @@ static void
applets
* The NSS DB needs to be created under tests/hwdb/ and local
pkcs#11 module needs to be added to the database
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
Makefile.am| 10 +-
docs/libcacard.txt | 1 +
tests/common.c | 504
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/libcacard.c | 83 ++-
1 file changed, 82 insertions(+), 1 deletion(-)
diff --git a/tests/libcacard.c b/tests/libcacard.c
index 3abd1a9..d5e18ad 100644
--- a/tests/libcacard.c
+++ b/tests
* The ATR code paths are not covered
* The card resets code paths are not covered
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/libcacard.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/libcacard.c b/tests/libcacard.c
index 6f073cc..e13c8eb 100644
--- a/tests
* The function parses SimpleTLV string to internal structures,
that can be handled with more ease in the code.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/simpletlv.c | 52 ++
src/simpletlv.h | 13
tests/simpletlv.c | 80
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
README.md | 16
1 file changed, 16 insertions(+)
diff --git a/README.md b/README.md
index 6edef77..c7053e3 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,22 @@ For more information and API documentation, read the
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
.gitlab-ci.yml | 53 ++
1 file changed, 53 insertions(+)
create mode 100644 .gitlab-ci.yml
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000..7eb7a22
queries
* invalid GET ACR APDU queries
* properly clean up the memory when the test is finished
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/common.c| 108 ++-
tests/common.h| 5 +-
tests/hwtests.c | 44 -
tests/libcacard.c | 468
* This is not documented in specification so this is an attempt to
mimic real cards.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac-aca.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/src/cac-aca.c b/src/cac-aca.c
index
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
README.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index c7053e3..86dda38 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# libcacard ![alt text][travis]
+# libcacard ![alt text
* This includes also the key bits discovery in test suite.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/common.c | 6
tests/common.h | 2 ++
tests/hwtests.c | 80 +
3 files changed, 88 insertions(+)
diff --git a
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/common.c| 19 ---
tests/common.h| 2 ++
tests/libcacard.c | 34 ++
3 files changed, 52 insertions(+), 3 deletions(-)
diff --git a/tests/common.c b/tests/common.c
index
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/common.c| 43 +--
tests/common.h| 3 +++
tests/libcacard.c | 41 +
3 files changed, 85 insertions(+), 2 deletions(-)
diff --git a/tests
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/common.c| 20
tests/hwtests.c | 44 +---
tests/libcacard.c | 3 +--
3 files changed, 26 insertions(+), 41 deletions(-)
diff --git a/tests/common.c b/tests
* This is useful for CI or manual running of the tests without a need
of a physical CAC card.
* The script goes through the whole setting of environment, soft token,
generating testing keys, certificates and running the test suite.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
standard GET ACR parameters, but if
P1 | 0x40 is set, the response should come in this new format.
* This affects also GET PROPERTIES APDU, where we get also other bunch of
TLVs in case of this bit is set.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac-aca.c | 293
On Tue, 2018-07-31 at 18:14 +0200, Marc-André Lureau wrote:
> Hi
>
> On Tue, Jul 31, 2018 at 4:50 PM, Jakub Jelen
> wrote:
> > Signed-off-by: Jakub Jelen
> > Reviewed-by: Robert Relyea
> > ---
> > .gitlab-ci.yml | 53
> >
On Tue, 2018-07-31 at 19:46 +0200, Marc-André Lureau wrote:
> Hi
>
> supression/suppression
>
> On Tue, Jul 31, 2018 at 4:50 PM, Jakub Jelen
> wrote:
> > Signed-off-by: Jakub Jelen
> > Reviewed-by: Robert Relyea
> > ---
> > build-aux/glib-tap.
On Tue, 2018-07-31 at 20:07 +0200, Marc-André Lureau wrote:
> Hi
>
> On Tue, Jul 31, 2018 at 4:49 PM, Jakub Jelen
> wrote:
> > [...]
> > -test_programs = tests/libcacard
> > -tests_libcacard_LDADD = libcacard.la $(GT
On Tue, 2018-07-31 at 20:29 +0200, Marc-André Lureau wrote:
> Hi
>
> On Tue, Jul 31, 2018 at 4:49 PM, Jakub Jelen
> wrote:
> > * The source code is originally based on the OpenSC cac card
> > driver
> >
> > * The SimpleTLV encoding is used in various plac
On Tue, 2018-07-31 at 23:58 +0200, Marc-André Lureau wrote:
> Hi
>
> On Tue, Jul 31, 2018 at 11:53 PM, Marc-André Lureau
> wrote:
> > Hi
> >
> > On Tue, Jul 31, 2018 at 4:50 PM, Jakub Jelen
> > wrote:
> > > Signed-off-by: Jakub Jelen
> > >
On Wed, 2018-08-01 at 00:19 +0200, Marc-André Lureau wrote:
> Hi
>
> On Tue, Jul 31, 2018 at 4:50 PM, Jakub Jelen
> wrote:
> > * This is useful for CI or manual running of the tests without a
> > need
> >of a physical CAC card.
> > * The script goes thro
On Wed, 2018-08-01 at 00:16 +0200, Marc-André Lureau wrote:
> Hi Jakub,
>
> On Tue, Jul 31, 2018 at 4:50 PM, Jakub Jelen
> wrote:
> > * This involves creation of properties structures in the applet,
> >that are used to discover pki buffers in the applet a
* The Card Capability Container (CCC) is mandatory applet of CAC 2
and is used to discover other applets, card capabilities and
properties
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac.c | 361 +-
src/cac.h | 15
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/libcacard.c | 60 +++
1 file changed, 56 insertions(+), 4 deletions(-)
diff --git a/tests/libcacard.c b/tests/libcacard.c
index 67ea089..01335c2 100644
--- a/tests/libcacard.c
+++ b
---
tests/libcacard.c | 26 +-
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/tests/libcacard.c b/tests/libcacard.c
index a6ff49b..2b769be 100644
--- a/tests/libcacard.c
+++ b/tests/libcacard.c
@@ -17,7 +17,8 @@ events_thread(gpointer arg)
while (1) {
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/libcacard.c | 48 ---
1 file changed, 41 insertions(+), 7 deletions(-)
diff --git a/tests/libcacard.c b/tests/libcacard.c
index 01335c2..838e3c1 100644
--- a/tests/libcacard.c
+++ b
* Introduce a new API to get the key size from the key to present it in
CAC properties structures later
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
docs/libcacard.txt | 4
src/libcacard.syms | 1 +
src/vcard_emul.h | 1 +
src/vcard_emul_nss.c | 22
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/libcacard.c | 24
1 file changed, 24 insertions(+)
diff --git a/tests/libcacard.c b/tests/libcacard.c
index 838e3c1..5112838 100644
--- a/tests/libcacard.c
+++ b/tests/libcacard.c
@@ -159,6 +159,10
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/common.c| 73 +++
tests/common.h| 2 ++
tests/hwtests.c | 23 +++
tests/libcacard.c | 46 -
4 files changed, 98 insertions(+), 46
vcard_emul_rsa_bits() to expose the
real key size in properties buffer
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac.c | 474 --
src/cac.h | 30 ++-
tests/libcacard.c | 26 +--
3 files changed, 439 insertions(+), 91 deletions
generic ISO 7816 code, but the responses are improved.
* This affects also the existing testsuite, which needs
adjustments, since the SELECT APDU retunrs different data.
* This loads the GP applet separately from CAC applet
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
Makefile.am
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
build-aux/glib.supp | 35 +++
1 file changed, 35 insertions(+)
create mode 100644 build-aux/glib.supp
diff --git a/build-aux/glib.supp b/build-aux/glib.supp
new file mode 100644
index 000..ff2edbe
(from "5.3.3.5 Get ACR APDU" of GSC-IS 2.1)
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
Makefile.am|2 +
docs/libcacard.txt |1 +
src/cac-aca.c | 1106
src/cac-aca.h | 32 ++
src/cac.c
buffer matches the expected key size
* Separate test for GET RESPONSE APDU
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
Makefile.am | 6 +-
tests/libcacard.c | 426 --
2 files changed, 418 insertions(+), 14 deletions(-)
diff
* So far, the ACA tables were static from existing card.
* This change allows adjusting the ACA tables based on the real
certificates and PKI applets present in virtual smart card
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac-aca.c | 244
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/libcacard.c | 83 ++-
1 file changed, 82 insertions(+), 1 deletion(-)
diff --git a/tests/libcacard.c b/tests/libcacard.c
index 97ba2ab..5323a2c 100644
--- a/tests/libcacard.c
+++ b/tests
This is second version of unmerged changes from the patch set I sent
earlier this week:
https://lists.freedesktop.org/archives/spice-devel/2018-July/044955.html
This makes use of some more clean up and reordering to make sure every
commit makes the tests pass. Unfortunatelly, this is not case fro
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/libcacard.c | 99 +++
1 file changed, 99 insertions(+)
diff --git a/tests/libcacard.c b/tests/libcacard.c
index 6768a03..67bd0be 100644
--- a/tests/libcacard.c
+++ b/tests/libcacard.c
* The PKI Credential, PKI Certificate and Person Instance applets
are hard to emulate with bogus data and therefore we will
make them available from the existing cards.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac.c | 259
* This includes also the key bits discovery in test suite.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/common.c | 6
tests/common.h | 2 ++
tests/hwtests.c | 80 +
3 files changed, 88 insertions(+)
diff --git a
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac.c | 315 ++
1 file changed, 315 insertions(+)
diff --git a/src/cac.c b/src/cac.c
index 2f871e2..cc07923 100644
--- a/src/cac.c
+++ b/src/cac.c
@@ -774,6 +774,321 @@ failure
* The function parses SimpleTLV string to internal structures,
that can be handled with more ease in the code.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/simpletlv.c | 52 ++
src/simpletlv.h | 13
tests/simpletlv.c | 80
* This is not documented in specification so this is an attempt to
mimic real cards.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac-aca.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/src/cac-aca.c b/src/cac-aca.c
index
* This function is used to read generic data objects presented by
the underlying card, if available. It can provide some structures
that we are not able to emulate in softeare card.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
docs/libcacard.txt | 8 +++
src
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/libcacard.c | 4
1 file changed, 4 insertions(+)
diff --git a/tests/libcacard.c b/tests/libcacard.c
index 67bd0be..97ba2ab 100644
--- a/tests/libcacard.c
+++ b/tests/libcacard.c
@@ -165,6 +165,7 @@ static void get_properties
applets
* The NSS DB needs to be created under tests/hwdb/ and local
pkcs#11 module needs to be added to the database
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
Makefile.am| 15 ++
docs/libcacard.txt | 1 +
tests/common.c | 525
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/common.c| 43 +--
tests/common.h| 3 +++
tests/libcacard.c | 41 +
3 files changed, 85 insertions(+), 2 deletions(-)
diff --git a/tests
CF (Access Control File) are one of the
mandatory parts of CAC, but they are not exposed in PKCS#11
and impossible to emulate (signatures of the internal structures),
but ActivClient does not really need them.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac.c
* This provides the real list of applets in the emulated card
in the CCC applet CardURLs, which is mandatory for applet and certificated
discovery.
* This also increaseses the amount of possible certificates to 10
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac.c
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/common.c| 20
tests/hwtests.c | 44 +---
tests/libcacard.c | 3 +--
3 files changed, 26 insertions(+), 41 deletions(-)
diff --git a/tests/common.c b/tests
standard GET ACR parameters, but if
P1 | 0x40 is set, the response should come in this new format.
* This affects also GET PROPERTIES APDU, where we get also other bunch of
TLVs in case of this bit is set.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
src/cac-aca.c | 293
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
.gitlab-ci.yml | 53 ++
1 file changed, 53 insertions(+)
create mode 100644 .gitlab-ci.yml
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000..7eb7a22
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
README.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index c7053e3..86dda38 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# libcacard ![alt text][travis]
+# libcacard ![alt text
queries
* invalid GET ACR APDU queries
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/common.c| 105 ++-
tests/common.h| 5 +-
tests/hwtests.c | 20 ++-
tests/libcacard.c | 442 +-
4 files changed, 565 insertions
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
tests/common.c| 20 +---
tests/common.h| 2 ++
tests/libcacard.c | 35 +++
3 files changed, 54 insertions(+), 3 deletions(-)
diff --git a/tests/common.c b/tests/common.c
index
* This is useful for CI or manual running of the tests without a need
of a physical CAC card.
* The script goes through the whole setting of environment, soft token,
generating testing keys, certificates and running the test suite.
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
Signed-off-by: Jakub Jelen
Reviewed-by: Robert Relyea
---
README.md | 16
1 file changed, 16 insertions(+)
diff --git a/README.md b/README.md
index 6edef77..c7053e3 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,22 @@ For more information and API documentation, read the
1 - 100 of 120 matches
Mail list logo