diff --git a/LICENSE b/LICENSE index 35660f6..4c8c63b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015-2023 Martin Paljak +Copyright (c) 2015-2024 Martin Paljak Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/capfile/src/main/java/pro/javacard/HexUtils.java b/capfile/src/main/java/pro/javacard/HexUtils.java index 5106c4c..3738d2f 100644 --- a/capfile/src/main/java/pro/javacard/HexUtils.java +++ b/capfile/src/main/java/pro/javacard/HexUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 Martin Paljak + * Copyright (c) 2016-2024 Martin Paljak * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/capfile/src/main/java/pro/javacard/capfile/AID.java b/capfile/src/main/java/pro/javacard/capfile/AID.java index 4490edf..75243f8 100644 --- a/capfile/src/main/java/pro/javacard/capfile/AID.java +++ b/capfile/src/main/java/pro/javacard/capfile/AID.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Martin Paljak + * Copyright (c) 2018-2024 Martin Paljak * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/capfile/src/main/java/pro/javacard/capfile/CAPFile.java b/capfile/src/main/java/pro/javacard/capfile/CAPFile.java index 18a9046..ea546d4 100644 --- a/capfile/src/main/java/pro/javacard/capfile/CAPFile.java +++ b/capfile/src/main/java/pro/javacard/capfile/CAPFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Martin Paljak + * Copyright (c) 2018-2024 Martin Paljak * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/capfile/src/main/java/pro/javacard/capfile/CAPPackage.java b/capfile/src/main/java/pro/javacard/capfile/CAPPackage.java index 66daf6f..0102d21 100644 --- a/capfile/src/main/java/pro/javacard/capfile/CAPPackage.java +++ b/capfile/src/main/java/pro/javacard/capfile/CAPPackage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Martin Paljak + * Copyright (c) 2018-2024 Martin Paljak * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/capfile/src/main/java/pro/javacard/capfile/WellKnownAID.java b/capfile/src/main/java/pro/javacard/capfile/WellKnownAID.java index edc80c5..c2e2337 100644 --- a/capfile/src/main/java/pro/javacard/capfile/WellKnownAID.java +++ b/capfile/src/main/java/pro/javacard/capfile/WellKnownAID.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Martin Paljak + * Copyright (c) 2018-2024 Martin Paljak * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/capfile/src/main/java/pro/javacard/sdk/ExportFileHelper.java b/capfile/src/main/java/pro/javacard/sdk/ExportFileHelper.java index 2958964..813c4e3 100644 --- a/capfile/src/main/java/pro/javacard/sdk/ExportFileHelper.java +++ b/capfile/src/main/java/pro/javacard/sdk/ExportFileHelper.java @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2024 Martin Paljak + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package pro.javacard.sdk; import java.io.DataInputStream; diff --git a/capfile/src/main/java/pro/javacard/sdk/JavaCardSDK.java b/capfile/src/main/java/pro/javacard/sdk/JavaCardSDK.java index a51b8f1..d1eff80 100644 --- a/capfile/src/main/java/pro/javacard/sdk/JavaCardSDK.java +++ b/capfile/src/main/java/pro/javacard/sdk/JavaCardSDK.java @@ -1,16 +1,16 @@ -/** - * Copyright (c) 2015-2022 Martin Paljak - *

+/* + * Copyright (c) 2015-2024 Martin Paljak + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - *

+ * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - *

+ * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/capfile/src/main/java/pro/javacard/sdk/OffCardVerifier.java b/capfile/src/main/java/pro/javacard/sdk/OffCardVerifier.java index 2e73092..da85667 100644 --- a/capfile/src/main/java/pro/javacard/sdk/OffCardVerifier.java +++ b/capfile/src/main/java/pro/javacard/sdk/OffCardVerifier.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2022 Martin Paljak + * Copyright (c) 2018-2024 Martin Paljak * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/capfile/src/main/java/pro/javacard/sdk/SDKVersion.java b/capfile/src/main/java/pro/javacard/sdk/SDKVersion.java index c40d421..c27ef1d 100644 --- a/capfile/src/main/java/pro/javacard/sdk/SDKVersion.java +++ b/capfile/src/main/java/pro/javacard/sdk/SDKVersion.java @@ -1,16 +1,16 @@ -/** - * Copyright (c) 2022 Martin Paljak - *

+/* + * Copyright (c) 2022-2024 Martin Paljak + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - *

+ * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - *

+ * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/capfile/src/main/java/pro/javacard/sdk/VerifierError.java b/capfile/src/main/java/pro/javacard/sdk/VerifierError.java index bcbd170..0246a14 100644 --- a/capfile/src/main/java/pro/javacard/sdk/VerifierError.java +++ b/capfile/src/main/java/pro/javacard/sdk/VerifierError.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2022 Martin Paljak + * Copyright (c) 2018-2024 Martin Paljak * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/task/src/main/java/pro/javacard/ant/DummyMain.java b/task/src/main/java/pro/javacard/ant/DummyMain.java index 301846b..64f306f 100644 --- a/task/src/main/java/pro/javacard/ant/DummyMain.java +++ b/task/src/main/java/pro/javacard/ant/DummyMain.java @@ -1,16 +1,16 @@ -/** - * Copyright (c) 2015-2023 Martin Paljak - *

+/* + * Copyright (c) 2015-2024 Martin Paljak + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - *

+ * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - *

+ * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/task/src/main/java/pro/javacard/ant/HelpingBuildException.java b/task/src/main/java/pro/javacard/ant/HelpingBuildException.java index 48ca3e4..8d32b46 100644 --- a/task/src/main/java/pro/javacard/ant/HelpingBuildException.java +++ b/task/src/main/java/pro/javacard/ant/HelpingBuildException.java @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2015-2024 Martin Paljak + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package pro.javacard.ant; import org.apache.tools.ant.BuildException; diff --git a/task/src/main/java/pro/javacard/ant/JCApplet.java b/task/src/main/java/pro/javacard/ant/JCApplet.java index 9b8901c..fe753cd 100644 --- a/task/src/main/java/pro/javacard/ant/JCApplet.java +++ b/task/src/main/java/pro/javacard/ant/JCApplet.java @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2015-2024 Martin Paljak + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package pro.javacard.ant; import org.apache.tools.ant.BuildException; diff --git a/task/src/main/java/pro/javacard/ant/JCCap.java b/task/src/main/java/pro/javacard/ant/JCCap.java index ae0ed3a..0b19554 100644 --- a/task/src/main/java/pro/javacard/ant/JCCap.java +++ b/task/src/main/java/pro/javacard/ant/JCCap.java @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2015-2024 Martin Paljak + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package pro.javacard.ant; import org.apache.tools.ant.BuildException; @@ -22,6 +43,7 @@ import static pro.javacard.sdk.SDKVersion.*; +// ... and actual execution of core task. public class JCCap extends Task { private final String master_jckit_path; private JavaCardSDK jckit = null; diff --git a/task/src/main/java/pro/javacard/ant/JCImport.java b/task/src/main/java/pro/javacard/ant/JCImport.java index 1c6a2f2..2701b52 100644 --- a/task/src/main/java/pro/javacard/ant/JCImport.java +++ b/task/src/main/java/pro/javacard/ant/JCImport.java @@ -1,6 +1,27 @@ +/* + * Copyright (c) 2015-2024 Martin Paljak + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package pro.javacard.ant; -// Just for Ant +// Just for Ant: public class JCImport { String exps = null; String jar = null; diff --git a/task/src/main/java/pro/javacard/ant/JavaCard.java b/task/src/main/java/pro/javacard/ant/JavaCard.java index b360d16..86ee467 100644 --- a/task/src/main/java/pro/javacard/ant/JavaCard.java +++ b/task/src/main/java/pro/javacard/ant/JavaCard.java @@ -1,16 +1,16 @@ -/** - * Copyright (c) 2015-2023 Martin Paljak - *

+/* + * Copyright (c) 2015-2024 Martin Paljak + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - *

+ * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - *

+ * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -30,8 +30,8 @@ import java.util.List; import java.util.Vector; -// -// This is a wrapper task that can contain one or more subtasks. +// ... +// This is a wrapper task that can contain one or more subtasks for building capfiles. public final class JavaCard extends Task { static List temporary = new ArrayList<>(); diff --git a/task/src/main/java/pro/javacard/ant/Misc.java b/task/src/main/java/pro/javacard/ant/Misc.java index 9ffb7a0..9c17626 100644 --- a/task/src/main/java/pro/javacard/ant/Misc.java +++ b/task/src/main/java/pro/javacard/ant/Misc.java @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2015-2024 Martin Paljak + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package pro.javacard.ant; import java.io.FileNotFoundException; @@ -40,7 +61,7 @@ static byte[] decodeHexString(String str) { } - // Dirty way to get major version of JDK: 8, 11, 17 + // Dirty way to get major version of JDK: 8, 11, 17 etc static int getCurrentJDKVersion() { String v = System.getProperty("java.version", "0.0.0"); if (v.startsWith("1.8."))