forked from arekinath/PivApplet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
77 lines (69 loc) · 3.02 KB
/
Copy pathbuild.xml
File metadata and controls
77 lines (69 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?xml version="1.0" encoding="UTF-8"?>
<project name="JavaCard PIV applet" default="dist" basedir=".">
<description>Builds the project. </description>
<!-- feature controls -->
<!--
PIV_SUPPORT_*: choose whether RSA/EC family algorithms are supported.
-->
<property name="PIV_SUPPORT_RSA" value="true" />
<property name="PIV_SUPPORT_EC" value="true" />
<!--
PIV_USE_EC_PRECOMPHASH: build with support for using signPreComputedHash()
for EC signing. This can only work with JC3.0.5, but will build an applet
that is capable of PIV standards-compliant EC signing.
-->
<property name="PIV_USE_EC_PRECOMPHASH" value="false" />
<!--
PIV_STRICT_CONTACTLESS: if true, strictly enforce the PIV spec requirements
around which slots and keys are allowed to be used over the contactless
interface. If false, allow anything to be used over contactless.
-->
<property name="PIV_STRICT_CONTACTLESS" value="true" />
<!--
YKPIV_ATTESTATION: whether to build support for YubicoPIV attestation.
Without this, the attestation slots and commands will all return
unsupported errors.
-->
<property name="YKPIV_ATTESTATION" value="true" />
<!--
APPLET_EXTLEN: build with support for extended length APDUs. This doesn't
work properly on all cards and some may need to use an applet built without
support for this (due to bugs in getOffsetCdata()).
-->
<property name="APPLET_EXTLEN" value="true" />
<!--
APPLET_USE_RESET_MEM: use CLEAR_ON_RESET memory in cipher and signature
instances (rather than CLEAR_ON_DESELECT). Only set this if you trust other
applets on the card not to leak info left in RAM after deselect (e.g.
PivApplet is the only applet installed). Some cards are very short on
CLEAR_ON_DESELECT memory and need this to use RSA.
-->
<property name="APPLET_USE_RESET_MEM" value="false" />
<!--
APPLET_SIMULATOR: tries to pretend we have memory limits like a real card
when running in the simulator. Useful for testing/debugging SGList code.
-->
<property name="APPLET_SIMULATOR" value="false" />
<target name="preprocess" description="proprocess java source">
<taskdef resource="jpp.xml" classpath="ext/jpp-1.0.3.jar" />
<jpp destdir="src-gen" readonly="true" verbose="false">
<fileset dir="src/" includes="**/*.java" />
</jpp>
</target>
<target name="dist" depends="preprocess" description="generate the distribution">
<tstamp/>
<ant dir="ext/ant"/>
<!-- Create the distribution directory -->
<taskdef name="javacard" classname="pro.javacard.ant.JavaCard" classpath="ext/ant/ant-javacard.jar"/>
<javacard>
<cap aid="a0:00:00:03:08:00:00:10" output="bin/PivApplet.cap" sources="src-gen" classes="bin" version="1.0">
<applet class="net.cooperi.pivapplet.PivApplet" aid="a0:00:00:03:08:00:00:10:00:01:00"/>
</cap>
</javacard>
</target>
<target name="clean" description="clean up">
<!-- Delete the built applet -->
<delete dir="bin"/>
<delete dir="src-gen"/>
</target>
</project>