From 12062a1e0df85e0fdb23d5e1fe1c978d6fc1bec0 Mon Sep 17 00:00:00 2001 From: Patrik Dufresne Date: Mon, 10 Sep 2012 10:31:02 -0400 Subject: [PATCH] Remove reference to svn. --- license/.gitignore | 2 + license/.settings/.svn/all-wcprops | 11 - license/.settings/.svn/entries | 69 ---- .../org.eclipse.jdt.core.prefs.svn-base | 12 - license/.svn/all-wcprops | 57 --- license/.svn/dir-prop-base | 6 - license/.svn/entries | 342 ---------------- license/.svn/text-base/.classpath.svn-base | 6 - license/.svn/text-base/.project.svn-base | 17 - license/.svn/text-base/Apache.svn-base | 202 ---------- license/.svn/text-base/BSD.svn-base | 24 -- license/.svn/text-base/MIT.svn-base | 21 - license/.svn/text-base/README.svn-base | 36 -- license/.svn/text-base/build.xml.svn-base | 58 --- .../text-base/version.properties.svn-base | 2 - .../license/AbstractLicense.class | Bin 3287 -> 0 bytes .../license/EncryptionManager.class | Bin 3156 -> 0 bytes .../com/patrikdufresne/license/ILicense.class | Bin 152 -> 0 bytes .../license/KeyBlackListedException.class | Bin 491 -> 0 bytes .../license/KeyInvalidException.class | Bin 474 -> 0 bytes .../patrikdufresne/license/KeyManager.class | Bin 6740 -> 0 bytes .../license/LicenseException.class | Bin 805 -> 0 bytes .../license/LicenseExpiredException.class | Bin 490 -> 0 bytes .../license/LicenseManager.class | Bin 4084 -> 0 bytes .../LicenseVersionExpiredException.class | Bin 511 -> 0 bytes .../patrikdufresne/license/util/ILogger.class | Bin 444 -> 0 bytes .../license/util/Policy$1.class | Bin 1345 -> 0 bytes .../patrikdufresne/license/util/Policy.class | Bin 815 -> 0 bytes license/lib/.svn/all-wcprops | 5 - license/lib/.svn/entries | 35 -- license/src/.svn/all-wcprops | 5 - license/src/.svn/entries | 38 -- license/src/com/.svn/all-wcprops | 5 - license/src/com/.svn/entries | 38 -- .../src/com/patrikdufresne/.svn/all-wcprops | 5 - license/src/com/patrikdufresne/.svn/entries | 38 -- .../patrikdufresne/license/.svn/all-wcprops | 65 --- .../com/patrikdufresne/license/.svn/entries | 378 ------------------ .../text-base/AbstractLicense.java.svn-base | 233 ----------- .../text-base/EncryptionManager.java.svn-base | 197 --------- .../.svn/text-base/ILicense.java.svn-base | 23 -- .../KeyBlackListedException.java.svn-base | 27 -- .../KeyInvalidException.java.svn-base | 27 -- .../.svn/text-base/KeyManager.java.svn-base | 365 ----------------- .../text-base/LicenseException.java.svn-base | 71 ---- .../LicenseExpiredException.java.svn-base | 34 -- .../text-base/LicenseManager.java.svn-base | 232 ----------- ...censeVersionExpiredException.java.svn-base | 28 -- .../license/util/.svn/all-wcprops | 17 - .../patrikdufresne/license/util/.svn/entries | 103 ----- .../util/.svn/text-base/ILogger.java.svn-base | 61 --- .../util/.svn/text-base/Policy.java.svn-base | 65 --- unitest/.gitignore | 1 + unitest/.settings/.svn/all-wcprops | 11 - unitest/.settings/.svn/entries | 69 ---- .../org.eclipse.jdt.core.prefs.svn-base | 12 - unitest/.svn/all-wcprops | 35 -- unitest/.svn/entries | 212 ---------- unitest/.svn/prop-base/privkey.der.svn-base | 5 - unitest/.svn/prop-base/pubkey.der.svn-base | 5 - unitest/.svn/text-base/.classpath.svn-base | 8 - unitest/.svn/text-base/.project.svn-base | 17 - unitest/.svn/text-base/privkey.der.svn-base | Bin 1218 -> 0 bytes unitest/.svn/text-base/privkey.pem.svn-base | 27 -- unitest/.svn/text-base/pubkey.der.svn-base | Bin 294 -> 0 bytes .../license/EncryptionManagerTest.class | Bin 1944 -> 0 bytes .../license/KeyManagerTest.class | Bin 1534 -> 0 bytes .../LicenseManagerTest$MockLicense.class | Bin 543 -> 0 bytes .../license/LicenseManagerTest.class | Bin 1998 -> 0 bytes unitest/src/.svn/all-wcprops | 5 - unitest/src/.svn/entries | 38 -- unitest/src/com/.svn/all-wcprops | 5 - unitest/src/com/.svn/entries | 38 -- .../src/com/patrikdufresne/.svn/all-wcprops | 5 - unitest/src/com/patrikdufresne/.svn/entries | 38 -- .../patrikdufresne/license/.svn/all-wcprops | 23 -- .../com/patrikdufresne/license/.svn/entries | 137 ------- .../EncryptionManagerTest.java.svn-base | 72 ---- .../text-base/KeyManagerTest.java.svn-base | 44 -- .../LicenseManagerTest.java.svn-base | 80 ---- 80 files changed, 3 insertions(+), 3844 deletions(-) create mode 100644 license/.gitignore delete mode 100644 license/.settings/.svn/all-wcprops delete mode 100644 license/.settings/.svn/entries delete mode 100644 license/.settings/.svn/text-base/org.eclipse.jdt.core.prefs.svn-base delete mode 100644 license/.svn/all-wcprops delete mode 100644 license/.svn/dir-prop-base delete mode 100644 license/.svn/entries delete mode 100644 license/.svn/text-base/.classpath.svn-base delete mode 100644 license/.svn/text-base/.project.svn-base delete mode 100644 license/.svn/text-base/Apache.svn-base delete mode 100644 license/.svn/text-base/BSD.svn-base delete mode 100644 license/.svn/text-base/MIT.svn-base delete mode 100644 license/.svn/text-base/README.svn-base delete mode 100644 license/.svn/text-base/build.xml.svn-base delete mode 100644 license/.svn/text-base/version.properties.svn-base delete mode 100644 license/bin/com/patrikdufresne/license/AbstractLicense.class delete mode 100644 license/bin/com/patrikdufresne/license/EncryptionManager.class delete mode 100644 license/bin/com/patrikdufresne/license/ILicense.class delete mode 100644 license/bin/com/patrikdufresne/license/KeyBlackListedException.class delete mode 100644 license/bin/com/patrikdufresne/license/KeyInvalidException.class delete mode 100644 license/bin/com/patrikdufresne/license/KeyManager.class delete mode 100644 license/bin/com/patrikdufresne/license/LicenseException.class delete mode 100644 license/bin/com/patrikdufresne/license/LicenseExpiredException.class delete mode 100644 license/bin/com/patrikdufresne/license/LicenseManager.class delete mode 100644 license/bin/com/patrikdufresne/license/LicenseVersionExpiredException.class delete mode 100644 license/bin/com/patrikdufresne/license/util/ILogger.class delete mode 100644 license/bin/com/patrikdufresne/license/util/Policy$1.class delete mode 100644 license/bin/com/patrikdufresne/license/util/Policy.class delete mode 100644 license/lib/.svn/all-wcprops delete mode 100644 license/lib/.svn/entries delete mode 100644 license/src/.svn/all-wcprops delete mode 100644 license/src/.svn/entries delete mode 100644 license/src/com/.svn/all-wcprops delete mode 100644 license/src/com/.svn/entries delete mode 100644 license/src/com/patrikdufresne/.svn/all-wcprops delete mode 100644 license/src/com/patrikdufresne/.svn/entries delete mode 100644 license/src/com/patrikdufresne/license/.svn/all-wcprops delete mode 100644 license/src/com/patrikdufresne/license/.svn/entries delete mode 100644 license/src/com/patrikdufresne/license/.svn/text-base/AbstractLicense.java.svn-base delete mode 100644 license/src/com/patrikdufresne/license/.svn/text-base/EncryptionManager.java.svn-base delete mode 100644 license/src/com/patrikdufresne/license/.svn/text-base/ILicense.java.svn-base delete mode 100644 license/src/com/patrikdufresne/license/.svn/text-base/KeyBlackListedException.java.svn-base delete mode 100644 license/src/com/patrikdufresne/license/.svn/text-base/KeyInvalidException.java.svn-base delete mode 100644 license/src/com/patrikdufresne/license/.svn/text-base/KeyManager.java.svn-base delete mode 100644 license/src/com/patrikdufresne/license/.svn/text-base/LicenseException.java.svn-base delete mode 100644 license/src/com/patrikdufresne/license/.svn/text-base/LicenseExpiredException.java.svn-base delete mode 100644 license/src/com/patrikdufresne/license/.svn/text-base/LicenseManager.java.svn-base delete mode 100644 license/src/com/patrikdufresne/license/.svn/text-base/LicenseVersionExpiredException.java.svn-base delete mode 100644 license/src/com/patrikdufresne/license/util/.svn/all-wcprops delete mode 100644 license/src/com/patrikdufresne/license/util/.svn/entries delete mode 100644 license/src/com/patrikdufresne/license/util/.svn/text-base/ILogger.java.svn-base delete mode 100644 license/src/com/patrikdufresne/license/util/.svn/text-base/Policy.java.svn-base create mode 100644 unitest/.gitignore delete mode 100644 unitest/.settings/.svn/all-wcprops delete mode 100644 unitest/.settings/.svn/entries delete mode 100644 unitest/.settings/.svn/text-base/org.eclipse.jdt.core.prefs.svn-base delete mode 100644 unitest/.svn/all-wcprops delete mode 100644 unitest/.svn/entries delete mode 100644 unitest/.svn/prop-base/privkey.der.svn-base delete mode 100644 unitest/.svn/prop-base/pubkey.der.svn-base delete mode 100644 unitest/.svn/text-base/.classpath.svn-base delete mode 100644 unitest/.svn/text-base/.project.svn-base delete mode 100644 unitest/.svn/text-base/privkey.der.svn-base delete mode 100644 unitest/.svn/text-base/privkey.pem.svn-base delete mode 100644 unitest/.svn/text-base/pubkey.der.svn-base delete mode 100644 unitest/bin/com/patrikdufresne/license/EncryptionManagerTest.class delete mode 100644 unitest/bin/com/patrikdufresne/license/KeyManagerTest.class delete mode 100644 unitest/bin/com/patrikdufresne/license/LicenseManagerTest$MockLicense.class delete mode 100644 unitest/bin/com/patrikdufresne/license/LicenseManagerTest.class delete mode 100644 unitest/src/.svn/all-wcprops delete mode 100644 unitest/src/.svn/entries delete mode 100644 unitest/src/com/.svn/all-wcprops delete mode 100644 unitest/src/com/.svn/entries delete mode 100644 unitest/src/com/patrikdufresne/.svn/all-wcprops delete mode 100644 unitest/src/com/patrikdufresne/.svn/entries delete mode 100644 unitest/src/com/patrikdufresne/license/.svn/all-wcprops delete mode 100644 unitest/src/com/patrikdufresne/license/.svn/entries delete mode 100644 unitest/src/com/patrikdufresne/license/.svn/text-base/EncryptionManagerTest.java.svn-base delete mode 100644 unitest/src/com/patrikdufresne/license/.svn/text-base/KeyManagerTest.java.svn-base delete mode 100644 unitest/src/com/patrikdufresne/license/.svn/text-base/LicenseManagerTest.java.svn-base diff --git a/license/.gitignore b/license/.gitignore new file mode 100644 index 0000000..a65a85e --- /dev/null +++ b/license/.gitignore @@ -0,0 +1,2 @@ +/ant-target +/bin diff --git a/license/.settings/.svn/all-wcprops b/license/.settings/.svn/all-wcprops deleted file mode 100644 index 01ae42a..0000000 --- a/license/.settings/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 73 -/projects/!svn/ver/353/com.patrikdufresne.license/trunk/license/.settings -END -org.eclipse.jdt.core.prefs -K 25 -svn:wc:ra_dav:version-url -V 100 -/projects/!svn/ver/353/com.patrikdufresne.license/trunk/license/.settings/org.eclipse.jdt.core.prefs -END diff --git a/license/.settings/.svn/entries b/license/.settings/.svn/entries deleted file mode 100644 index c267b72..0000000 --- a/license/.settings/.svn/entries +++ /dev/null @@ -1,69 +0,0 @@ -10 - -dir -357 -https://svn.patrikdufresne.com/projects/com.patrikdufresne.license/trunk/license/.settings -https://svn.patrikdufresne.com/projects - - - -2012-04-04T16:27:30.286363Z -353 -ikus060 - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -392366b5-5131-0410-a9e1-b88d89b6244e - - - - - - -0 - -org.eclipse.jdt.core.prefs -file - - - - -2012-04-03T22:41:31.000000Z -24fd35997c3402c5b940e3c47fd7a898 -2012-04-04T16:27:30.286363Z -353 -ikus060 - - - - - - - - - - - - - - - - - - - - - -617 - diff --git a/license/.settings/.svn/text-base/org.eclipse.jdt.core.prefs.svn-base b/license/.settings/.svn/text-base/org.eclipse.jdt.core.prefs.svn-base deleted file mode 100644 index 906a736..0000000 --- a/license/.settings/.svn/text-base/org.eclipse.jdt.core.prefs.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -#Tue Apr 03 18:41:31 EDT 2012 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/license/.svn/all-wcprops b/license/.svn/all-wcprops deleted file mode 100644 index 41c7836..0000000 --- a/license/.svn/all-wcprops +++ /dev/null @@ -1,57 +0,0 @@ -K 26 -svn:wc:ra_dav:activity-url -V 19 -/projects/!svn/act/ -K 25 -svn:wc:ra_dav:version-url -V 63 -/projects/!svn/ver/358/com.patrikdufresne.license/trunk/license -END -BSD -K 25 -svn:wc:ra_dav:version-url -V 67 -/projects/!svn/ver/359/com.patrikdufresne.license/trunk/license/BSD -END -build.xml -K 25 -svn:wc:ra_dav:version-url -V 73 -/projects/!svn/ver/353/com.patrikdufresne.license/trunk/license/build.xml -END -MIT -K 25 -svn:wc:ra_dav:version-url -V 67 -/projects/!svn/ver/359/com.patrikdufresne.license/trunk/license/MIT -END -version.properties -K 25 -svn:wc:ra_dav:version-url -V 82 -/projects/!svn/ver/356/com.patrikdufresne.license/trunk/license/version.properties -END -.project -K 25 -svn:wc:ra_dav:version-url -V 72 -/projects/!svn/ver/353/com.patrikdufresne.license/trunk/license/.project -END -README -K 25 -svn:wc:ra_dav:version-url -V 70 -/projects/!svn/ver/359/com.patrikdufresne.license/trunk/license/README -END -Apache -K 25 -svn:wc:ra_dav:version-url -V 70 -/projects/!svn/ver/359/com.patrikdufresne.license/trunk/license/Apache -END -.classpath -K 25 -svn:wc:ra_dav:version-url -V 74 -/projects/!svn/ver/353/com.patrikdufresne.license/trunk/license/.classpath -END diff --git a/license/.svn/dir-prop-base b/license/.svn/dir-prop-base deleted file mode 100644 index 35db975..0000000 --- a/license/.svn/dir-prop-base +++ /dev/null @@ -1,6 +0,0 @@ -K 10 -svn:ignore -V 11 -ant-target - -END diff --git a/license/.svn/entries b/license/.svn/entries deleted file mode 100644 index 6788538..0000000 --- a/license/.svn/entries +++ /dev/null @@ -1,342 +0,0 @@ -10 - -dir -358 -https://svn.patrikdufresne.com/projects/com.patrikdufresne.license/trunk/license -https://svn.patrikdufresne.com/projects - - - -2012-04-04T19:55:25.868997Z -358 -ikus060 -has-props - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -392366b5-5131-0410-a9e1-b88d89b6244e - - - - - - -0 -immediates -() - -.classpath -file -357 - - - -2012-04-03T22:41:31.000000Z -0feefca3562e5167ed8224d805b3b922 -2012-04-04T16:27:30.286363Z -353 -ikus060 - - - - - - - - - - - - - - - - - - - - - -295 - -.project -file -357 - - - -2012-04-03T23:11:41.000000Z -73ab260e8c61166d65a8273391e8e3bb -2012-04-04T16:27:30.286363Z -353 -ikus060 - - - - - - - - - - - - - - - - - - - - - -366 - -.settings -dir - -Apache -file -359 - - - -2012-04-18T19:13:20.000000Z -175792518e4ac015ab6696d16c4f607e -2012-04-18T19:20:37.071362Z -359 -ikus060 - - - - - - - - - - - - - - - - - - - - - -11357 - -BSD -file -359 - - - -2012-04-18T19:15:04.000000Z -8e6d32ff6469dc7bd8ac9f5067680c4a -2012-04-18T19:20:37.071362Z -359 -ikus060 - - - - - - - - - - - - - - - - - - - - - -1461 - -LICENSE -file -359 - - - - - - - - - - - - - - - - - - - -deleted - -MIT -file -359 - - - -2012-04-18T18:57:17.000000Z -73a6092c9e82587a0fddc29d0c46d25d -2012-04-18T19:20:37.071362Z -359 -ikus060 - - - - - - - - - - - - - - - - - - - - - -1066 - -README -file -359 - - - -2012-04-18T19:16:09.000000Z -ca551f12a9e00adbb84851be4d0daef3 -2012-04-18T19:20:37.071362Z -359 -ikus060 - - - - - - - - - - - - - - - - - - - - - -1095 - -build.xml -file -357 - - - -2012-04-04T15:51:40.000000Z -967cdacc1e8d02cdddce34ca374b1c14 -2012-04-04T16:27:30.286363Z -353 -ikus060 - - - - - - - - - - - - - - - - - - - - - -2034 - -lib -dir - -src -dir - -version.properties -file -357 - - - -2012-04-04T19:49:12.000000Z -1fc6195b97f3e30e1fb4493dfeafa9b5 -2012-04-04T19:52:41.472047Z -356 -ikus060 - - - - - - - - - - - - - - - - - - - - - -51 - diff --git a/license/.svn/text-base/.classpath.svn-base b/license/.svn/text-base/.classpath.svn-base deleted file mode 100644 index 18d70f0..0000000 --- a/license/.svn/text-base/.classpath.svn-base +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/license/.svn/text-base/.project.svn-base b/license/.svn/text-base/.project.svn-base deleted file mode 100644 index 9c4301f..0000000 --- a/license/.svn/text-base/.project.svn-base +++ /dev/null @@ -1,17 +0,0 @@ - - - license - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/license/.svn/text-base/Apache.svn-base b/license/.svn/text-base/Apache.svn-base deleted file mode 100644 index 7a4a3ea..0000000 --- a/license/.svn/text-base/Apache.svn-base +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/license/.svn/text-base/BSD.svn-base b/license/.svn/text-base/BSD.svn-base deleted file mode 100644 index 79684c5..0000000 --- a/license/.svn/text-base/BSD.svn-base +++ /dev/null @@ -1,24 +0,0 @@ - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The views and conclusions contained in the software and documentation are those -of the authors and should not be interpreted as representing official policies, -either expressed or implied, of the FreeBSD Project. \ No newline at end of file diff --git a/license/.svn/text-base/MIT.svn-base b/license/.svn/text-base/MIT.svn-base deleted file mode 100644 index 4d644be..0000000 --- a/license/.svn/text-base/MIT.svn-base +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2012 - -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. \ No newline at end of file diff --git a/license/.svn/text-base/README.svn-base b/license/.svn/text-base/README.svn-base deleted file mode 100644 index c906d39..0000000 --- a/license/.svn/text-base/README.svn-base +++ /dev/null @@ -1,36 +0,0 @@ -Copyright (c) 2012 David Stites, Patrik Dufresne and others. - -LICENSING -========= - -This program is free software; you can redistribute it and/or modify -it under the terms of either: - - a) The MIT License (MIT) - - b) Apache License 2.0 - - c) Simplified BSD License - -You should have received a copy of the MIT License (MIT) with this -software, in the file named "MIT". If not, I'll be glad to provide one. - -You should have received a copy of the Apache License 2.0 -along with this program in the file named "Apache". - -You should have received a copy of the Simplified BSD License -along with this program in the file named "BSD". - -This package is based on the following article: -http://blog.afewguyscoding.com/2012/02/licensing-module-java/ - -Generate your keys -================== - -Create the private key (containing informationto create the public key). - - $ openssl genrsa -out privkey.pem 2048 - $ openssl pkcs8 -topk8 -in privkey.pem -inform PEM -nocrypt -outform DER -out privkey.der - -Extract the public key, fur publishing. - $ openssl rsa -in privkey.pem -out pubkey.der -pubout -outform DER \ No newline at end of file diff --git a/license/.svn/text-base/build.xml.svn-base b/license/.svn/text-base/build.xml.svn-base deleted file mode 100644 index e7babae..0000000 --- a/license/.svn/text-base/build.xml.svn-base +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/license/.svn/text-base/version.properties.svn-base b/license/.svn/text-base/version.properties.svn-base deleted file mode 100644 index f8f6da1..0000000 --- a/license/.svn/text-base/version.properties.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -version=0.2 -package.name=com.patrikdufresne.license \ No newline at end of file diff --git a/license/bin/com/patrikdufresne/license/AbstractLicense.class b/license/bin/com/patrikdufresne/license/AbstractLicense.class deleted file mode 100644 index 8e958efa653ae1385f5e37e35d16715f298d3a91..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3287 zcma)9OLr4x7=9+bB&I_zX(@6QsPvMy1gN)CE|wB%Fb$QIB1OSz`n4UJCLx*B0^WtK zZb99uOYt0AJaV)TQzBCkk-^D=l{ZpW+&=qJt)cOXv0y~fMrI~*X7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Y&DgJ@rynYAol28{Tw}|)XvO|CS4kqe-YWZ;UUnK66YybcN diff --git a/license/bin/com/patrikdufresne/license/EncryptionManager.class b/license/bin/com/patrikdufresne/license/EncryptionManager.class deleted file mode 100644 index 6caae18083f96fccfe67db202208f48a6ce141a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3156 zcmb7G+jA4w9sZ6iYi+RvY_8&B1Wkfv%LphWV5hXU1HnPI0fB;XZ)^EjUM%mbtCby7 z5}Ndq=F;ZYB#@>FPsvLj(wW9~;v~%Ep`Gb})7Q>4^gBoEm2WSZ!JOUmyM4d!cUk@W zyDz^1a2)pxLb+NE=Z>$GiRNGH&^y;*BP`Nt0+AKQGu;D ztQjj)vYcXOc0+jrOJTG(P)mL29%W11$oN zu8uS0=BkCs-cr$J*vaWo*}yh|j@7!AvMgik9Gv;6`)+G`nVDs!xWQ|wWW4hTH50iJ6o zkDg{l7<(C09BnwLoE;KqBoC>46CNg<%eme-9!0x>!veckyJ9-$tb*@)b0$*g5ZF|d z{(vr7K?)q%2-BKE)LrzbFliHAI3n;+Q99CN^=cIrcs%eGmRi#q@Y$1Ee1TTS7dw#t}I6{Q%YbO(8mMViQcd&DxF} zs!oqd?}{~6B4@2xw_ug>mS?N?;4#*U2kvBOl70*BX7q*Gtt2Fhw` zLSXH{tf&*q9E?^@d)|4X8Qvq&41KDsjLA=eElc zDp!4WwzQ^uQlotaE(mPX{iuY);b0gT6xhEk=$rFpujg5F!&N`Dk0Xm=)$12YPy0YB zuP!c|$l(f`f0i@NN~mQppk;YnGw{sHXmuziMsS^86yjiT29&p-n)n%hPO5x2grI^E zIn`|CfJ0lW$(rOibgq&f2&JKil}V7!hOsJ36|LAeRp->HI%k(;jiaK#u4O9J?Ftg( zn1HQFxWT%twIw40B@^etZ1QkSxN12y7D{e~v7!_7#VHLD>WBu|q~^+S2CB=n>BV$q z(sO5PjUJnko;|@G9xUDK2KaJNTZcnlUz;n+`)h&ZYPFnQbS%H>$xy2a&yoAw`QBr* zT+n)l-Np+BezVL+7$US)E9^yqu7HYFi?o*KdK>Pn+xVS{-{TMbW~i@7KFDfc;3l-G zuO!uOxA8|4FRNV}tCq*P=hW4!CT8$j&_$}LD6m-Nip?^bUd0NruK)6dBDMt^qUg}G z+TvbtN;#otW4sb(dfbE{rK zs$LSd+#ryZKQJn$)VOCEaH*wXh$O2HIL5EkxBm(2bOSb zB)xzib~o097Ia{QohA1)f3_1BCT7gAQUZhHwbONaGTY;xbNf z*_`CrjVtKIRc?%H=%Lm58ZbP8AMuS4nba93qMkPKDMC-j@nigiu@0e=wtbA#%^3Z7 zk}3C6>n!hLI7gekh&-UE!GJLE6#oJL!)XI;2ET31YPthLvNhCgn)92yy~X?IN!Tq)pTiD5 zC)m`gE;|`Y@ma>Ncs5f<1r5HY|XwRuIgPst2s19(l0vlY+crj9wyTLm%E zdTSBS4|R3?1DSdJwu|6i>LRhPd`e+NH&Uxsyu)no64(dWhL1Fuj+%q8NfP)|&?E`` zS<@J!?(2Aifdyyltqp;^MyZ;l6cL=#L-6)U>pKg0@4iMhm{#}mxRX}M2<(G;oe#0E z!PYRa$SQupeqUq_zs4?ng9Esahw-fjnydu~fu;hWyU3q{7t#C?WD9YAsPq2l|EOLC A82|tP diff --git a/license/bin/com/patrikdufresne/license/ILicense.class b/license/bin/com/patrikdufresne/license/ILicense.class deleted file mode 100644 index 3f9b0bb9bb07e2020f40fd6548b3c591f4cafe05..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 152 zcmX^0Z`VEs1_mPrPId++Mh4~N{9OHl#FC=S?3B{9qSWHNRQ;UHb=&!K?E$CnXez5T9lcXlUbFRl#|NHz!jWdT9lmX gmI>nU!pzYFDF$j{WMBqjR-h{wfHXUhWMbd|0MU>rIsgCw diff --git a/license/bin/com/patrikdufresne/license/KeyBlackListedException.class b/license/bin/com/patrikdufresne/license/KeyBlackListedException.class deleted file mode 100644 index d08e48c1bcd567b5b278a72252f2d4fa018ad2ff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--git a/license/bin/com/patrikdufresne/license/LicenseExpiredException.class b/license/bin/com/patrikdufresne/license/LicenseExpiredException.class deleted file mode 100644 index f868aad3ec7ea9b96aec059386a3856cead68ad3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 490 zcma)3yG{a85Iw`gB`XM`s4*r&hnlzv(F$V&m}oXOD6P3HBVJwZl6@FzJ3qh=u`;nR zvGt>jgV0!*(9D^cJLlxg+^_HV4*(5pSx6BYUNCaTDh~C-Ah``WGVJ);V-vCC&ag8X z>yQVXiO1tu2gX8%aIgq(P9T&b4z==o97ZB=ecmR}1)v1==hY7uJ82-nN~31999U$xwk6MOxZ}Il!uK~LZ$BBt4HPd$_$;ZY-EPbDZA)u z!Trf2cwB zk}n`^Ba0@Ay9saJik%ia{7>f}0MaEm3VyBfUtqs@_7?WUPFs92`8ry^Akvke04BhuO zshg#(Q<7$D6H?kV&_kr0ItTL9hrV??r{|=n`{_&ngFe*#?wyf5wke_K*t&P_{q5iP z`;GLg|NP<>fCun~hJZjrCO^?SsXMkgo-K~pM!_;#b7sb{3Px+MyB^mqeblfugap={ z*QfN>oNkS_o)|uFWE_D|fBNhZ0g)D1c_?oc9NlsT^jy&h0#OL8HLQ$1J?WTv%d;fV z(t8)TN0!QW2t*E;mgyW6*qiKK2%(>0TcaJzPZ|aUVn;4!4CS_>rB^UAMcZ_y zTYC)4u=QNO_god$uvTE5k~Q=5hkHo^=K)9d|Sgb!pfk5E$x` zE_TTvc2gla)HT%AFi=A@_Qp|zn84~@(=z&s6T^mmN*~S{G}fEX=(z#iHs!N-7;?tU zfkqF943d38Pn40GPnrMq-{>=j-ezpN@sOP7l_JZce}FR(KF-6^+^?n zh7T;Fo{PJ{)+PD7zN*zA305sW5@=pfNn4Xeho%gD!lRG`+;`{#^+8$o4+$jhtjU@a z=BgXNzJ>#SDlJ%M`6Y&4;UshdZ42gIEbmtGw5Qsk;iCfE7c)C;P3bu^%i>nKtARl- zX@I_be=#%GnH$ZsAI2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NUWbpMWoamp5y=Xa^k*N#!FI1OK6G6trA|A zYYDG%p*)uoUXyf-%H3=tdRwhG7+E(vK1=^DQI4wq`!x&r8}5EfqWq53`8{^x4=nP# z{L%bJ_RG7}`V;!_XU@96@H^RGY2k027=I^G{sD_?0smCMpQI(`Rt4Ts0I<9~lN1Q> zKBr&|(%&#Cc8&GfLIO$(gz2*zKjALIwS~mH#%f9MI5XzyG^#3oSBb5PbuOM@|q#@q-FugP3@UiG{(~ASRlN4MM*hE3O`UWbckp_@}H)Ec^lf z7+X8z;1N5enVB~`Z|2SH``7CmfMe{~$PiBbaO_S*Y}Dg0xid1-(hZa^btGLc^?hj~ z73$7xqKq7NX1<)njBQwi!{zi}0-+p9qeQT1*t@zQ&^4jh4s{d@9rs0$$lO!&vuD*l z>V%aurB!@R$Tkl81gjkmWgcsU(lpgnm#HWRS(FQKuuiBpyazEAZXoo??eb!J)S9zP zp3?Fr84skn6@x$$DqiTb8o`KVQ(|aAkPu^!z$YXXHGar?CoZy_=3{&Pf>-f!wV-?Z zhSrL|b60W|yMDM5QN~c61^t1?&>sJtO{trTdkoEiR%ymnHs>-I4tB|(86F9$58nOL zqk{&?g$VPQp)#5beFq1m61CJ+p8LVXL7UWu8%0hp2>igo2}xm$HVivb)79?P_W13c z>p8>C|IXQq(HkC0(JRdLsm@I#hKZyXH-3}2Ek0UfpxKmT73Z{SL^hEHhqzwiJ>q7G e_la92J|sRW@i8n4x`R^`fp>65T^V_b-WNYCAYU{9 diff --git a/license/bin/com/patrikdufresne/license/util/Policy$1.class b/license/bin/com/patrikdufresne/license/util/Policy$1.class deleted file mode 100644 index 14e7442d48e18656abbd7d9fa7d6cb1eaebc31ac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1345 zcma)+Yg5xe6o%g|g@h1Axd@_Q1%$R-BHp!#%FV&4!c3XY_|1?mA&_J{xuE$bT-#|sd-zb;>jOzUVjFfCFTO%&SQ5|5#mf3bKqa)jSJ`gSM*wUUSfi*Guz zeES*|xG1+oS{uIQija!#J&z7VMZqea@&6UEj&*Dh(B{#4?0F}2r5NTY>z9Qmmyew3 zTfWbOHP;M79wGxOVrt#=HRz&77m#MXGQvyEG8i}0vhJl|L{W$j>W2eXrOx192o>~pL8WuXq;~1y zK3CF|96h2@s;>4pQF}*osiw}8Tn$e;xs$ZDsTQu<dK_itDNO=7ahUiK)q8@s$lSCH}1>Pf*nQD`x!?j&O zXDi>=KHBI9=we>5G%}ffQBTIYc&)~%7KEcbR_U%PjIF1So$9SA1;d%h4Sxdn6J0&6 zCzE4R5!@O6Kj|*c5^0vi2I%Ixj}U$8Bpi`?5L^f_2hV4ADZl_{1PeQriVvTwqp2FN zbj^ahvjzRO(z@r-e%dPVck;T3^)q7)>o-*H+3ykr+gYZItyGnzF0o1$ZT>$;EGcFk z=5(HSk5$AdjB~e7;D2D!LcrT|k0BPA2TcPOvBb)^iuhuOhwQdz{wu=06P$a`{O|b{ zH*b4-IDb0z#O(tHAF=!$z0bJ#3CqmwblagXI?DISVx9HI>6R7OApzH2#+50F4aP 0x00FF) { - right -= 0x00FF; - } - left += right; - if (left > 0x00FF) { - left -= 0x00FF; - } - } - int sum = (left << 8) + right; - return intToHex(sum, 4); - } - - /** - * Get the key bytes. - * - * @param seed - * @param a - * @param b - * @param c - * @return - */ - private static byte getKeyByte(final int seed, final byte a, final byte b, - final byte c) { - final int a1 = a % 25; - final int b1 = b % 3; - if (a1 % 2 == 0) { - return (byte) (((seed >> a1) & 0x000000FF) ^ ((seed >> b1) | c)); - } else { - return (byte) (((seed >> a1) & 0x000000FF) ^ ((seed >> b1) & c)); - } - - } - - /** - * - * @param n - * @param chars - * @return - */ - private static String intToHex(final Number n, final int chars) { - return String.format("%0" + chars + "x", n); - } - - /** - * Sets of black listed keys. - */ - private Set blacklist; - - /** - * Default MAC address if no network interface is available. - */ - private byte[] defaultMac; - - /** - * The current key length. - */ - private int keyLen; - - /** - * Arrays used to generate and validate the key. - */ - private byte[][] params; - - public KeyManager() { - this(DEFAULT_KEY_LENGTH, DEFAULT_PARAMS, DEFAULT_MAC_ADRESS); - } - - /** - * - * @param keyLen - * the key length (>=8); - * @param params - * @param defaultMacAddress - * used if no network interface is available - * - */ - public KeyManager(int keyLen, byte[][] params, byte[] defaultMacAddress) { - if (keyLen < 8) { - throw new IllegalArgumentException("keyLen<8"); - } - this.keyLen = keyLen; - - this.params = params; - - this.defaultMac = defaultMacAddress; - - } - - /** - * Ass the given key to the black list. - * - * @param key - * the key to be added - */ - public void addBlackListedKey(String key) { - if (this.blacklist == null) { - this.blacklist = new HashSet(); - } - this.blacklist.add(key); - } - - /** - * - * @param seed - * @param entropy - * @return - */ - public String generateKey(final int seed, String authCode) { - - byte[] entropy = getHardwareEntropy(); - - final byte[] keyBytes = new byte[25]; - // fill keyBytes with values derived from seed. - // the parameters used here must be exactly the same - // as the ones used in the checkKey function. - keyBytes[0] = getKeyByte(seed, params[0][0], params[0][1], params[0][2]); - keyBytes[1] = getKeyByte(seed, params[1][0], params[1][1], params[1][2]); - keyBytes[2] = getKeyByte(seed, params[2][0], params[2][1], params[2][2]); - keyBytes[3] = getKeyByte(seed, params[3][0], params[3][1], params[3][2]); - for (int i = 4, j = 0; (j + 2) < entropy.length; i++, j += 3) { - keyBytes[i] = getKeyByte(seed, entropy[j], entropy[j + 1], - entropy[j + 2]); - } - - // The key string begins with a hexadecimal string of the seed - final StringBuilder result = new StringBuilder(intToHex(seed, 8)); - - // Then is followed by hexadecimal strings of each byte in the key - for (byte b : keyBytes) { - result.append(intToHex(b, 2)); - } - - // Add checksum to key string - String key = result.toString(); - key += calculateChecksum(key); - - return key; - } - - /** - * Return the complete list of blackl listed key. - * - * @return - */ - public String[] getBlackListedKeys() { - if (this.blacklist == null) { - return new String[0]; - } - String[] list = new String[this.blacklist.size()]; - return this.blacklist.toArray(list); - } - - /** - * Generate an hardate entropy based on the network address. - * - * @return the hardware entropy value. - */ - private byte[] getHardwareEntropy() { - // Get the MAC address value - byte[] mac; - try { - NetworkInterface ni = NetworkInterface.getByInetAddress(InetAddress - .getLocalHost()); - if (ni != null) { - mac = ni.getHardwareAddress(); - if (mac == null) { - mac = defaultMac; - } - } else { - mac = defaultMac; - } - } catch (Exception ex) { - mac = defaultMac; - } - - // Hash the value - byte[] entropyEncoded = null; - try { - MessageDigest digest = MessageDigest.getInstance("SHA-512"); - digest.reset(); - entropyEncoded = digest.digest(mac); - } catch (NoSuchAlgorithmException ex) { /* this will never happen */ - } - - return entropyEncoded; - } - - /** - * Remove the given key from the black list. - * - * @param key - * the key to remove. - */ - public void removeBlackListedKey(String key) { - if (this.blacklist != null) { - this.blacklist.remove(key); - if (this.blacklist.size() == 0) { - this.blacklist = null; - } - } - } - - /** - * Check if a key is valid. - * - * @param key - * the key to validate - * @throws KeyInvalidException - * if the key is invalid - */ - public void validateKey(final String key) throws KeyInvalidException, - KeyBlackListedException { - // Validate the key checksum - if (!validateKeyChecksum(key)) { - throw new KeyInvalidException(); - } - - // Look at the black list. - if (this.blacklist != null) { - for (String black : this.blacklist) { - if (key.startsWith(black)) { - throw new KeyBlackListedException(); - } - } - } - - // At this point, the key is either valid or forged, - // because a forged key can have a valid checksum. - // we now test the "bytes" of the key to determine if it is - // actually valid. - - // When building your release application, use conditional defines - // or comment out most of the byte checks! this is the heart - // of the partial key verification system. by not compiling in - // each check, there is no way for someone to build a keygen that - // will produce valid keys. if an invalid keygen is released, you can - // simply change which byte checks are compiled in, and any serial - // number built with the fake keygen no longer works. - - // note that the parameters used for getKeyByte calls MUST - // MATCH the values that makeKey uses to make the key in the - // first place! - - // Extract the seed from the supplied key string - final int seed; - try { - seed = Integer.valueOf(key.substring(0, 8), 16); - } catch (NumberFormatException e) { - throw new KeyInvalidException(); - } - - // test key 0 - final String kb0 = key.substring(8, 10); - final byte b0 = getKeyByte(seed, params[0][0], params[0][1], - params[0][2]); - if (!kb0.equals(intToHex(b0, 2))) { - throw new KeyInvalidException(); - } - - // test key1 - final String kb1 = key.substring(10, 12); - final byte b1 = getKeyByte(seed, params[1][0], params[1][1], - params[1][2]); - if (!kb1.equals(intToHex(b1, 2))) { - throw new KeyInvalidException(); - } - - // test key2 - final String kb2 = key.substring(12, 14); - final byte b2 = getKeyByte(seed, params[2][0], params[2][1], - params[2][2]); - if (!kb2.equals(intToHex(b2, 2))) { - throw new KeyInvalidException(); - } - - // test key3 - final String kb3 = key.substring(14, 16); - final byte b3 = getKeyByte(seed, params[3][0], params[3][1], - params[3][2]); - if (!kb3.equals(intToHex(b3, 2))) { - throw new KeyInvalidException(); - } - - // test the hardware entropy - byte[] encodedEntropy = getHardwareEntropy(); - for (int i = 16, j = 0; (j + 2) < encodedEntropy.length; i += 2, j += 3) { - String kb = key.substring(i, i + 2); - byte b = getKeyByte(seed, encodedEntropy[j], encodedEntropy[j + 1], - encodedEntropy[j + 2]); - if (!kb.equals(intToHex(b, 2))) { - throw new KeyInvalidException(); - } - } - - } - - /** - * Validate the key check sum. - * - * @param key - * the key value - * @return - */ - private boolean validateKeyChecksum(final String key) { - if (key.length() != this.keyLen) { - throw new IllegalArgumentException("key wrong length"); - } - // last four characters are the checksum - final String checksum = key.substring(this.keyLen - 4); - return checksum.equals(calculateChecksum(key.substring(0, - this.keyLen - 4))); - } - -} diff --git a/license/src/com/patrikdufresne/license/.svn/text-base/LicenseException.java.svn-base b/license/src/com/patrikdufresne/license/.svn/text-base/LicenseException.java.svn-base deleted file mode 100644 index 76c58c3..0000000 --- a/license/src/com/patrikdufresne/license/.svn/text-base/LicenseException.java.svn-base +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2012 David Stites, Patrik Dufresne and others. - * - * You may distribute under the terms of either the MIT License, the Apache - * License 2.0 or the Simplified BSD License, as specified in the README file. - * - * Contributors: - * David Stites - initial API and implementation - * Patrik Dufresne - refactoring - */ -package com.patrikdufresne.license; - -/** - * - * This exception regroup all the license exceptions. - * - * @author Patrik Dufresne - * - */ -public class LicenseException extends Exception { - - private static final long serialVersionUID = 7895696254570225320L; - - /** - * Constructs a new exception with null as its detail message. The cause is - * not initialized, and may subsequently be initialized by a call to - * Throwable.initCause(java.lang.Throwable). - */ - public LicenseException() { - this(null, null); - } - - /** - * Constructs a new exception with the specified message. - * - * @param message - * the detail message (which is saved for later retrieval by the - * Throwable.getMessage() method). - */ - public LicenseException(String message) { - this(message, null); - } - - /** - * Constructs a new exception with the specified cause. - * - * @param cause - * the cause (which is saved for later retrieval by the - * Throwable.getCause() method). (A null value is permitted, and - * indicates that the cause is nonexistent or unknown.) - */ - public LicenseException(Throwable cause) { - this(null, cause); - } - - /** - * Constructs a new exception with the specified detail message and cause. - * - * @param message - * the detail message (which is saved for later retrieval by the - * Throwable.getMessage() method). - * @param cause - * the cause (which is saved for later retrieval by the - * Throwable.getCause() method). (A null value is permitted, and - * indicates that the cause is nonexistent or unknown.) - */ - public LicenseException(String message, Throwable cause) { - super(message, cause); - } - -} diff --git a/license/src/com/patrikdufresne/license/.svn/text-base/LicenseExpiredException.java.svn-base b/license/src/com/patrikdufresne/license/.svn/text-base/LicenseExpiredException.java.svn-base deleted file mode 100644 index a7d7e86..0000000 --- a/license/src/com/patrikdufresne/license/.svn/text-base/LicenseExpiredException.java.svn-base +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2012 David Stites, Patrik Dufresne and others. - * - * You may distribute under the terms of either the MIT License, the Apache - * License 2.0 or the Simplified BSD License, as specified in the README file. - * - * Contributors: - * David Stites - initial API and implementation - * Patrik Dufresne - refactoring - */ -package com.patrikdufresne.license; - -/** - * Thrown when the license validation determine the license to be expired. The - * expiration date should then by retrieve using the - * {@link AbstractLicense#getExpiration()}. - * - * @author Patrik Dufresne - * - */ -public class LicenseExpiredException extends LicenseException { - - private static final long serialVersionUID = -9069804052012922999L; - - /** - * Constructs a new exception with null as its detail message. The cause is - * not initialized, and may subsequently be initialized by a call to - * Throwable.initCause(java.lang.Throwable). - */ - public LicenseExpiredException() { - super("license expired"); - } - -} diff --git a/license/src/com/patrikdufresne/license/.svn/text-base/LicenseManager.java.svn-base b/license/src/com/patrikdufresne/license/.svn/text-base/LicenseManager.java.svn-base deleted file mode 100644 index f8c30b6..0000000 --- a/license/src/com/patrikdufresne/license/.svn/text-base/LicenseManager.java.svn-base +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright (c) 2012 David Stites, Patrik Dufresne and others. - * - * You may distribute under the terms of either the MIT License, the Apache - * License 2.0 or the Simplified BSD License, as specified in the README file. - * - * Contributors: - * David Stites - initial API and implementation - * Patrik Dufresne - refactoring - */ -package com.patrikdufresne.license; - -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.security.GeneralSecurityException; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; -import java.security.SignatureException; - -/** - * This the main entry point of the licensing module. This class should be used - * to create and check license files. - *

- * Generally, an application will not required more then one instance of license - * manager. - * - * @author Patrik Dufresne - * - */ -public class LicenseManager { - private static final int SIZE = 2048; - /** - * The encryption manager used by this class.F - */ - private EncryptionManager encryptionManager; - - /** - * Create a new license manager. - * - * @param publicKey - * the public key filename. - * @param privateKey - * the private key filename (null if not available). - * @throws GeneralSecurityException - * if the provided key are invalid. - * @throws IOException - * if the file doesn't exists - */ - public LicenseManager(String publicKey, String privateKey) - throws GeneralSecurityException, IOException { - byte[] pubdata = EncryptionManager.readAll(new File(publicKey)); - byte[] privdata = null; - if (privateKey != null) { - privdata = EncryptionManager.readAll(new File(privateKey)); - } - this.encryptionManager = new EncryptionManager(pubdata, privdata); - } - - /** - * Create a new license manager. - * - * @param publicKey - * the public key file. - * @param privateKey - * the private key file (null if not available). - * @throws GeneralSecurityException - * if the provided key are invalid. - * @throws IOException - * if the file doesn't exists - */ - public LicenseManager(File publicKey, File privateKey) - throws GeneralSecurityException, IOException { - byte[] pubdata = EncryptionManager.readAll(publicKey); - byte[] privdata = null; - if (privateKey != null) { - privdata = EncryptionManager.readAll(privateKey); - } - this.encryptionManager = new EncryptionManager(pubdata, privdata); - } - - /** - * Create a new license manager. - * - * @param publicKey - * an input stream containing the public key - * @param privateKey - * an input stream containing the private key - */ - public LicenseManager(InputStream publicKey, InputStream privateKey) - throws GeneralSecurityException, IOException { - byte[] pubdata = EncryptionManager.readAll(publicKey); - byte[] privdata = null; - if (privateKey != null) { - privdata = EncryptionManager.readAll(privateKey); - } - this.encryptionManager = new EncryptionManager(pubdata, privdata); - } - - /** - * Create a new license manager. Generally, an application will not required - * more then one instance of license manager. - * - * @param publicKey - * the public key (can't be null). - * - * @param privateKey - * the private key (null if not available). - * @throws GeneralSecurityException - * if the provided key are invalid. - */ - public LicenseManager(byte[] publicKey, byte[] privateKey) - throws GeneralSecurityException { - this.encryptionManager = new EncryptionManager(publicKey, privateKey); - } - - /** - * Read the content of an encrypted license file. - * - * @param file - * the location to the license file. - * @return the license object if the license file is valid, null otherwise. - * @throws IOException - * if file not found or read error. - * @throws SignatureException - * if this signature algorithm is unable to process the content - * of the file - * @throws NoSuchAlgorithmException - * if the SHA algorithm doesn't exists - * @throws InvalidKeyException - * if the public key is invalid - * @throws ClassNotFoundException - * if the implementation of {@link ILicense} stored in the file - * can't be found - */ - public ILicense readLicenseFile(File file) throws IOException, - InvalidKeyException, NoSuchAlgorithmException, SignatureException, - ClassNotFoundException { - - // Read the content of the file - byte[] sig; - byte[] data; - ObjectInputStream fileIn = new ObjectInputStream( - new BufferedInputStream(new FileInputStream(file))); - try { - int sigLength = fileIn.readInt(); - sig = new byte[sigLength]; - fileIn.read(sig); - - ByteArrayOutputStream dataStream = new ByteArrayOutputStream(); - byte[] buf = new byte[SIZE]; - int len; - while ((len = fileIn.read(buf)) != -1) { - dataStream.write(buf, 0, len); - } - dataStream.flush(); - data = dataStream.toByteArray(); - dataStream.close(); - } finally { - fileIn.close(); - } - - // Validate the signature - if (!encryptionManager.verify(data, sig)) { - return null; - } - - // Read the license object from the data. - ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream( - data)); - try { - ILicense license = (ILicense) in.readObject(); - return license; - } finally { - in.close(); - } - - } - - /** - * Used to serialize a license object. - * - * @param license - * the license object. - * @param file - * the location where to save the new license file. If file - * exists, it's overwrite. - * @throws IOException - * if the file doesn't exists or can't be written to - * @throws SignatureException - * if this signature algorithm is unable to process the license - * data - * @throws NoSuchAlgorithmException - * if the algorithm SHA is not supported - * @throws InvalidKeyException - * if the private key is invalid. - */ - public void writeLicense(ILicense license, File file) throws IOException, - InvalidKeyException, NoSuchAlgorithmException, SignatureException { - // Write the license information into a byte array. - ByteArrayOutputStream dataStream = new ByteArrayOutputStream(); - ObjectOutputStream out = new ObjectOutputStream(dataStream); - out.writeObject(license); - byte[] data = dataStream.toByteArray(); - out.close(); - - // Then sign the byte array - byte[] signature = this.encryptionManager.sign(data); - - // Write all the data into one single file. - ObjectOutputStream fileOut = new ObjectOutputStream( - new BufferedOutputStream(new FileOutputStream(file))); - try { - fileOut.writeInt(signature.length); - fileOut.write(signature); - fileOut.write(data); - fileOut.flush(); - } finally { - fileOut.close(); - } - - } - -} diff --git a/license/src/com/patrikdufresne/license/.svn/text-base/LicenseVersionExpiredException.java.svn-base b/license/src/com/patrikdufresne/license/.svn/text-base/LicenseVersionExpiredException.java.svn-base deleted file mode 100644 index 3a53faf..0000000 --- a/license/src/com/patrikdufresne/license/.svn/text-base/LicenseVersionExpiredException.java.svn-base +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012 David Stites, Patrik Dufresne and others. - * - * You may distribute under the terms of either the MIT License, the Apache - * License 2.0 or the Simplified BSD License, as specified in the README file. - * - * Contributors: - * David Stites - initial API and implementation - * Patrik Dufresne - refactoring - */ -package com.patrikdufresne.license; - -/** - * This exception is throw when the license version doesn't match the current - * version. - * - * @author Patrik Dufresne - * - */ -public class LicenseVersionExpiredException extends LicenseException { - - private static final long serialVersionUID = 8947235554238066208L; - - public LicenseVersionExpiredException() { - super("version expired"); - } - -} diff --git a/license/src/com/patrikdufresne/license/util/.svn/all-wcprops b/license/src/com/patrikdufresne/license/util/.svn/all-wcprops deleted file mode 100644 index 5abb08f..0000000 --- a/license/src/com/patrikdufresne/license/util/.svn/all-wcprops +++ /dev/null @@ -1,17 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 99 -/projects/!svn/ver/353/com.patrikdufresne.license/trunk/license/src/com/patrikdufresne/license/util -END -ILogger.java -K 25 -svn:wc:ra_dav:version-url -V 112 -/projects/!svn/ver/359/com.patrikdufresne.license/trunk/license/src/com/patrikdufresne/license/util/ILogger.java -END -Policy.java -K 25 -svn:wc:ra_dav:version-url -V 111 -/projects/!svn/ver/359/com.patrikdufresne.license/trunk/license/src/com/patrikdufresne/license/util/Policy.java -END diff --git a/license/src/com/patrikdufresne/license/util/.svn/entries b/license/src/com/patrikdufresne/license/util/.svn/entries deleted file mode 100644 index 5a44f06..0000000 --- a/license/src/com/patrikdufresne/license/util/.svn/entries +++ /dev/null @@ -1,103 +0,0 @@ -10 - -dir -357 -https://svn.patrikdufresne.com/projects/com.patrikdufresne.license/trunk/license/src/com/patrikdufresne/license/util -https://svn.patrikdufresne.com/projects - - - -2012-04-04T16:27:30.286363Z -353 -ikus060 - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -392366b5-5131-0410-a9e1-b88d89b6244e - - - - - - -0 - -ILogger.java -file -359 - - - -2012-04-18T19:17:06.000000Z -6dd80050e27d223c0bee144da044a4d7 -2012-04-18T19:20:37.071362Z -359 -ikus060 - - - - - - - - - - - - - - - - - - - - - -1378 - -Policy.java -file -359 - - - -2012-04-18T19:17:13.000000Z -de974a113c7dc114f82a2e4555251fca -2012-04-18T19:20:37.071362Z -359 -ikus060 - - - - - - - - - - - - - - - - - - - - - -1480 - diff --git a/license/src/com/patrikdufresne/license/util/.svn/text-base/ILogger.java.svn-base b/license/src/com/patrikdufresne/license/util/.svn/text-base/ILogger.java.svn-base deleted file mode 100644 index 8f40717..0000000 --- a/license/src/com/patrikdufresne/license/util/.svn/text-base/ILogger.java.svn-base +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2012 David Stites, Patrik Dufresne and others. - * - * You may distribute under the terms of either the MIT License, the Apache - * License 2.0 or the Simplified BSD License, as specified in the README file. - * - * Contributors: - * David Stites - initial API and implementation - * Patrik Dufresne - refactoring - */ -package com.patrikdufresne.license.util; - -/** - * A mechanism to log errors throughout the license framework. - *

- * Clients may provide their own implementation to change how errors are logged - * from within the license framework. - *

- * - */ -public interface ILogger { - /** - * Trace level (value: trace). - */ - public static final String TRACE = "trace"; - /** - * Debug level (value: debug). - */ - public static final String DEBUG = "debug"; - /** - * Info level (value: info). - */ - public static final String INFO = "info"; - /** - * Warn level (value: warn). - */ - public static final String WARN = "warn"; - /** - * Error level (value: error). - */ - public static final String ERROR = "error"; - - /** - * Logs the given status. - * - * @param level - * The level - * @param message - * The message to be logged. - */ - public void log(String level, String message); - - /** - * Logs the given exception. - * - * @param level - * @param exception - */ - public void log(String level, Throwable exception); - -} diff --git a/license/src/com/patrikdufresne/license/util/.svn/text-base/Policy.java.svn-base b/license/src/com/patrikdufresne/license/util/.svn/text-base/Policy.java.svn-base deleted file mode 100644 index 00f54b0..0000000 --- a/license/src/com/patrikdufresne/license/util/.svn/text-base/Policy.java.svn-base +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2012 David Stites, Patrik Dufresne and others. - * - * You may distribute under the terms of either the MIT License, the Apache - * License 2.0 or the Simplified BSD License, as specified in the README file. - * - * Contributors: - * David Stites - initial API and implementation - * Patrik Dufresne - refactoring - */ -package com.patrikdufresne.license.util; - -/** - * The Policy class handles settings for behavior, debug flags and logging - * within the license framework. - * - */ -public class Policy { - - private static ILogger log; - - /** - * Returns the dummy log to use if none has been set - */ - private static ILogger getDummyLog() { - return new ILogger() { - @Override - public void log(String level, String message) { - System.out.print(level + " " + message); - } - - @Override - public void log(String level, Throwable exception) { - exception.printStackTrace(System.out); - } - }; - } - - /** - * Returns the logger used by the license framework to log errors. - *

- * The default logger prints the status to System.err. - *

- * - * @return the logger - */ - public static ILogger getLog() { - if (log == null) { - log = getDummyLog(); - } - return log; - } - - /** - * Sets the logger used by the license framework to log errors. - * - * @param logger - * the logger to use, or null to use the default - * logger - */ - public static void setLog(ILogger logger) { - log = logger; - } - -} diff --git a/unitest/.gitignore b/unitest/.gitignore new file mode 100644 index 0000000..5e56e04 --- /dev/null +++ b/unitest/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/unitest/.settings/.svn/all-wcprops b/unitest/.settings/.svn/all-wcprops deleted file mode 100644 index 88fc1a5..0000000 --- a/unitest/.settings/.svn/all-wcprops +++ /dev/null @@ -1,11 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 74 -/projects/!svn/ver/355/com.patrikdufresne.license/trunk/unittest/.settings -END -org.eclipse.jdt.core.prefs -K 25 -svn:wc:ra_dav:version-url -V 101 -/projects/!svn/ver/355/com.patrikdufresne.license/trunk/unittest/.settings/org.eclipse.jdt.core.prefs -END diff --git a/unitest/.settings/.svn/entries b/unitest/.settings/.svn/entries deleted file mode 100644 index 5a460f5..0000000 --- a/unitest/.settings/.svn/entries +++ /dev/null @@ -1,69 +0,0 @@ -10 - -dir -355 -https://svn.patrikdufresne.com/projects/com.patrikdufresne.license/trunk/unittest/.settings -https://svn.patrikdufresne.com/projects - - - -2012-04-04T16:28:32.290129Z -355 -ikus060 - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -392366b5-5131-0410-a9e1-b88d89b6244e - - - - - - -0 - -org.eclipse.jdt.core.prefs -file - - - - -2012-04-03T23:11:01.000000Z -2919c25f5c24570b020be2313653b347 -2012-04-04T16:28:32.290129Z -355 -ikus060 - - - - - - - - - - - - - - - - - - - - - -617 - diff --git a/unitest/.settings/.svn/text-base/org.eclipse.jdt.core.prefs.svn-base b/unitest/.settings/.svn/text-base/org.eclipse.jdt.core.prefs.svn-base deleted file mode 100644 index e4d9131..0000000 --- a/unitest/.settings/.svn/text-base/org.eclipse.jdt.core.prefs.svn-base +++ /dev/null @@ -1,12 +0,0 @@ -#Tue Apr 03 19:11:01 EDT 2012 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/unitest/.svn/all-wcprops b/unitest/.svn/all-wcprops deleted file mode 100644 index 8a2c050..0000000 --- a/unitest/.svn/all-wcprops +++ /dev/null @@ -1,35 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 64 -/projects/!svn/ver/354/com.patrikdufresne.license/trunk/unittest -END -privkey.der -K 25 -svn:wc:ra_dav:version-url -V 76 -/projects/!svn/ver/355/com.patrikdufresne.license/trunk/unittest/privkey.der -END -pubkey.der -K 25 -svn:wc:ra_dav:version-url -V 75 -/projects/!svn/ver/355/com.patrikdufresne.license/trunk/unittest/pubkey.der -END -privkey.pem -K 25 -svn:wc:ra_dav:version-url -V 76 -/projects/!svn/ver/355/com.patrikdufresne.license/trunk/unittest/privkey.pem -END -.project -K 25 -svn:wc:ra_dav:version-url -V 73 -/projects/!svn/ver/355/com.patrikdufresne.license/trunk/unittest/.project -END -.classpath -K 25 -svn:wc:ra_dav:version-url -V 75 -/projects/!svn/ver/355/com.patrikdufresne.license/trunk/unittest/.classpath -END diff --git a/unitest/.svn/entries b/unitest/.svn/entries deleted file mode 100644 index 87ad9c6..0000000 --- a/unitest/.svn/entries +++ /dev/null @@ -1,212 +0,0 @@ -10 - -dir -354 -https://svn.patrikdufresne.com/projects/com.patrikdufresne.license/trunk/unittest -https://svn.patrikdufresne.com/projects - - - -2012-04-04T16:28:05.037077Z -354 -ikus060 - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -392366b5-5131-0410-a9e1-b88d89b6244e - - - - - - - -immediates - -.classpath -file -355 - - - -2012-04-03T23:11:41.000000Z -7a0846df6dbcc5f879b144d2a823a877 -2012-04-04T16:28:32.290129Z -355 -ikus060 - - - - - - - - - - - - - - - - - - - - - -445 - -.project -file -355 - - - -2012-04-03T23:11:34.000000Z -96d99216fb8a223b7089af7dde329776 -2012-04-04T16:28:32.290129Z -355 -ikus060 - - - - - - - - - - - - - - - - - - - - - -366 - -.settings -dir - -privkey.der -file -355 - - - -2012-04-04T00:59:52.000000Z -a63b9f8de799c2e21e87bc8e82820c39 -2012-04-04T16:28:32.290129Z -355 -ikus060 -has-props - - - - - - - - - - - - - - - - - - - - -1218 - -privkey.pem -file -355 - - - -2012-04-04T00:13:27.000000Z -cb1635d326f29a28c3ee56b0ba892fb1 -2012-04-04T16:28:32.290129Z -355 -ikus060 - - - - - - - - - - - - - - - - - - - - - -1679 - -pubkey.der -file -355 - - - -2012-04-04T00:23:19.000000Z -290f95f56bc5f18c33906df91780251e -2012-04-04T16:28:32.290129Z -355 -ikus060 -has-props - - - - - - - - - - - - - - - - - - - - -294 - -src -dir - diff --git a/unitest/.svn/prop-base/privkey.der.svn-base b/unitest/.svn/prop-base/privkey.der.svn-base deleted file mode 100644 index 5e9587e..0000000 --- a/unitest/.svn/prop-base/privkey.der.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/unitest/.svn/prop-base/pubkey.der.svn-base b/unitest/.svn/prop-base/pubkey.der.svn-base deleted file mode 100644 index 5e9587e..0000000 --- a/unitest/.svn/prop-base/pubkey.der.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/unitest/.svn/text-base/.classpath.svn-base b/unitest/.svn/text-base/.classpath.svn-base deleted file mode 100644 index c882449..0000000 --- a/unitest/.svn/text-base/.classpath.svn-base +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/unitest/.svn/text-base/.project.svn-base b/unitest/.svn/text-base/.project.svn-base deleted file mode 100644 index c00d4c2..0000000 --- a/unitest/.svn/text-base/.project.svn-base +++ /dev/null @@ -1,17 +0,0 @@ - - - unitest - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/unitest/.svn/text-base/privkey.der.svn-base b/unitest/.svn/text-base/privkey.der.svn-base deleted file mode 100644 index 19a7bc7a3017c5e1d1d895a176dd4a28b8a4f170..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1218 zcmV;z1U>sOf&{(-0RS)!1_>&LNQUrs4#*Aqyhl|0)hbn0G_1M15AZE z&yP4Hzkl$NGeU0k?F8-j6g$bvOGDasbyU%LzuY2tPR6_LuUS{1vTTniX$fDl1;9ZX z%i4dD)3&FW+Zm_f(jaaG`0NP)ltBV1mc$o!c_3k7V9TEe5M;M)56nB{a|QjQkLY-q zLWf;-{|H%wKRe89rkB_XBOrR_IWRcy7p@3nNMVL#&PCggYSiu%EA}sji#!S7OJeyQ zzy>GM2e3|KKRlGord_lOt7L(IkT#mednKzx0lwqTAW0nuzE?fG+~hrp?IKYs=!4xg zAOaL7A&&zLjnT<009Dm0RaGp z6OLN5Wi>*wEF}V?!cjFHL}5dq67A~m%+F_JO z{%k47vxFN~1S=tHksDWO){jjLug!oZ#He22xsdL$VF>)#yE zO1ZbYkOXUha4WQ>OH@a|FHMl)e}R*W#`c2SWEJl6g!FsoCz4OtUk{+JHQDw4ET7C=NJVyIo+cmTZ7W4j?hGK{4Eu_gfQ>(nzj|pZ@4sxm#>vd+{G+LLL*U<2 zC{Xu!C|1qHSVM%_+E7Punhqm+@;X%lfq?+TMxvMt+E{|K?85pC8Av$t=MbbFxxb#h ziS%YH=u$4WMVs`E=^8KVUCu*qcB~vcwWuk5puG8-4h1NGs~g4}HH+bAWRM-?#<>f| zW&MKvvoT7zE`M>>nIVwt@ zfq)%!I}R<97UH_vbQy|tR)kv7L;$YT>rE~6nAtvQh|z8gQl9Y9?!c=VTd>0S{5ya= z?0fB*#VR%*4WhWDdSq*G6Ps1UF716G3iQOl1b?lbm+zkj}-!efdHqk%|qvefbbEvDv~662^ki3P~%m; z7dH^8=MvC0AK7NYE6$MHVG|{r{1@W~*+=;Fl0J);$ZHB)jInz`1xNkSTQ{N^~ zol&t1`@P8UDj~BUj--5gQIZw%;o9Es&_R6SzTO5;u*m@PVA;K^kS^q&5O9OSZ&OZ< z(3=8*fL9Jc6hIBXDHOlaMyscSG0Kmig9UBzkB{Hek>{&m@k36?+FZ4c5hmJ*L2j9( zXgnCudV1oQuyStW+mEjlLNuNprOQF=t4g~m&|x+2@|!UTZ~(fU9|?Gw!Eznyqi_gf g;?=4+%2iCdZOS<#P=N4)0cccnTCMU~v8D(Pt?W-k`2YX_ diff --git a/unitest/.svn/text-base/privkey.pem.svn-base b/unitest/.svn/text-base/privkey.pem.svn-base deleted file mode 100644 index 0cb2320..0000000 --- a/unitest/.svn/text-base/privkey.pem.svn-base +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAnqTSA0yFOc+POCS/f/CRM0Ju9O0E7fcUO8nKS0Pad3VU0Xm/ -3CJ4Tsa77q9ZV6CybI8oaQlfsgXAQRrL2n+R07anmNsZp+HSIG4E+OwJAJRBAimW -xBd2eSBhYWDLnwcQZLdtD8w75HMF/aOP6HiYQodddf8IWYM/O8xsppfYCiMgeuY5 -MDjvF64IY0hhhmTORduPatTuEyv2L4aLPAngS2L5HcAGJ9IHsE5jPzyUzKZdtAqr -ZIGAkDaaxnslq0QBvuPOIEkdB75XPbzc5D2J7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+73I8Cohsx+OpHx6UZIV8uHa3u/QQXzivt4GT7DJAPNg2b2rkC7knhBwg8Jv -U06N0JsCgYBXDkAUQA2/KRS/0Uarp4Ixyo+ggwVt8Y+P39OR56tg8UNOyNpctY4R -JtqIQW6ZpGg8GNB6euKXsHJu49uPrxRCNJ4epctB7KtKuynQYTXv8psxCHAAup0f -CXiZwXId6qNwCGLi1ao4ylVMum3KOSNQgPCCAWhUc1qt8lmxpggOrQ== ------END RSA PRIVATE KEY----- diff --git a/unitest/.svn/text-base/pubkey.der.svn-base b/unitest/.svn/text-base/pubkey.der.svn-base deleted file mode 100644 index 942833f549f72e7979bad294d002dd627417e361..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 294 zcmV+>0ondAf&n5h4F(A+hDe6@4FLfG1potr0S^E$f&mHwf&l>lo}|(POochmk2oa1 zfAEnrLT>c!1nu_}JITsRL)v$BRMC0A+#+~R#=GvXSy!O4Y>y~u316}Wz(E?z+JBML zwx^ie8K>dWAZ`Ts>{h3#20pXAYox(%by1jWVdY(%sb?B1^uIs=y;eyhh265 z2w8(aJIrjRm)Hs;AbRFGFgWiQt_WjDVTNSRMca>R)b0~2_AiEuJPF`SV)-4w1}D-7 zuufw?Je16)U9<|TWPyN?Hk!tJC96aMzT?gyNgW5iS3SJkz4kA{7)$HB_LG09(Nqlv+&+RBQkx7z#L3m*f(bCcDhOFy>P@ zeiUacbnJ{Dzz^m4+?!+rgMY~6W$)R0_MG2&&bj;dKY#uOU;#fF=n{BT_UhKD9s16z zN_6DQz?D|bDN8qy)~Z|f8>gY;xf`}?SEaurgU~>?z`%)pW?MDety)`$C$bz081<%) zz_(uNak&bG52R^SFM=cSIm_)i*emWoz9%vujS}xoi|^#{L2$+mRbO zby;!(hqdNh*9&dcAC^iP{Hk>lk=@G6BhQ!12JQ=(ZOS#LCX@J(b(}_ruViDsBK;J` zFs_t+z_O(ISNAj#RP--Q7)WyRC<`T5`Vh$ur8as3t%TC| znmPjaRoa)kZ0ib9UT(`U^4%iu*<45i-w2FfZE&ZzabFE^?$cM@;ux_Pi@MZdJ*uiV zt0va)jO8d27D3rq7mp8ZPS=_Aoufufm~$)7Jg*W*ZxQeK5n-RR9!=5e(WV!!d68R* z5mden6Pws#qGsf{QTr+UfTDqIa&`tW7X;D|P3+)D>S}9CB~$Y6tMi?`4!G-kZuP$i zRfZQP_EfCCW~?>47BE<<=tX{6s=*Q%y>@h!So5kfjI-YfzWuuR;YjHfo6qYl?(hY} z|2|q4uR`6;T)_NYyWQr0kG?sKJ6xMh2MpjHTAU9)oWNbKlf1r*VZ4vg)-(5bRbhW+ znr>bf-(qZU@PiAa-{7NyHfEZ}M&>Oh_Oi1V$iBw>;G@mV+&LCrW2pl%s=3qXXEmdE zz=Jl445s)-f2hGS%@i%Le(ropB%>GZ7z5Ll0ssT18y_8qlq>(oy8f@mt{*yV)n zb@m*EH~7Aj|2DnB^KD`Y_gJjzPLp9QW*CSWO8=8VQbxrv+0Ltq&L*;n#h#yk+iBly h!t8cn2DSP*!sIc86`q*2OF)w`&`1ol&m>(q_!k#nyQKgC diff --git a/unitest/bin/com/patrikdufresne/license/KeyManagerTest.class b/unitest/bin/com/patrikdufresne/license/KeyManagerTest.class deleted file mode 100644 index 6c560eef3149449215d7bb8075886d4298f892a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1534 zcma)5c~28T6#q?I+S0C|OF=;nm8*xcfHyTJ9GVd85g;}GVaT!_+JSbqZg&ZOEE9!9 z6F-0-%J^oxw964BX?JI4-}@bJ-uv_S=WhUuC?*hL$XRy7Xqv7g_AB15!&{OYbzyPY z;>H{P^{pw*DtESc%S|B0aDC4_Fpat?tH%4CJ#M)SiAFnyVYYN7up&eJg^!v z$_%kpyTVh5BCR2TBtw5mNdC@i>=3oNQ|AnN$+paT*>r^32Zu4YCRz-ItMMum#NDT; zyVe+nH$3Tz1}}@2Anau+ZP#>#EeV=vovN|tQHrs`cWsAL*)j~%S8|%d0Mfl+xT&EB zafW+UF1cg6ocOmt3b(fGxiw{edxN{4Bk7oG9OCpfCvlrfX4xM76y%tOaZE6zLugd} z?0TttJDYT)vRcfYKcb@VD;oWxPm>2`T~tB>%WALGwgqlE9$iN2)uF|keu)y8W|+IY z8tc+W?Ia~I%dmKP&Pv_1_DiDW@=7O9dCzIcqd?w6LKz0L=gp|bnhr(z^$w(*HI(Fs zO=@OdVVM6#fu>~r_L|D&eW#uITn8{)SL{Ewb0PcsgA&1YQZQCJwrtGA+367O_N5?UfLP- zX6iJ5jMO(;M4-_#?jOc+jn-N_0Db7E9l4|A2yO&XI=vOp6459iE&mGxpN=v314CWB z6lEx+G$D2|wGQU3Q<%d6<{Dx8dHL@cit8gs7%iQ})Cn`=V-5uzZJlXSbH}$&vq$Jr zOcH9GVx}E3t5$}VfsI? xFy|NUb3i>7qAuu$zHo$xrSlqe#7M&wX_z73SyGY@=@{$i&^tPwQ+xzV{{XOdU=aWS diff --git a/unitest/bin/com/patrikdufresne/license/LicenseManagerTest$MockLicense.class b/unitest/bin/com/patrikdufresne/license/LicenseManagerTest$MockLicense.class deleted file mode 100644 index 9620fb1d74ba8f51cf54a3f3759f7183be9633a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 543 zcmb7BJxc>Y5Pg%c3zv(D@gr(wVW9zYU?&klB0}UMf|`DFS#`~2Pj>e#{7H5;3KrV? zn?&5Zq!5IF&Age}_joh2pWkoq0QRu%AV=5_b=arRIJx#Xghl zhO0}i%~n4S$FsJB0--fWel*lZvCz!;gu3QRuxP-Q7O}kQ9TVu3Q0>N28z#+wMF}r{ zeC1!xpW2Uv(t(h|91`-|I|D+Y8;`h)JQh5-s1Ry_ko+u}4DE1i7;!=)h(l|@tc|T_ z&4RfVn$QX6%sPM74#B;M6BY6kk=iu>(%X0Jff2l(lw5TqrZv|NnuOhdxe_YBPK-_1 zNa{)0v6H8-j}ktj1`M+ JCSSG8@(+s;kbeLG diff --git a/unitest/bin/com/patrikdufresne/license/LicenseManagerTest.class b/unitest/bin/com/patrikdufresne/license/LicenseManagerTest.class deleted file mode 100644 index 747373fc7b8e0204eec59132fec86bd38d6cb67a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1998 zcma)7ZBrXn6n<`!vfE|bVrnTBZAqbRUP@M>pfwexw6u{Blwd0T(pff_wz!5gMs+Aq8LriY!|P#phv3Z}n=@oAp?FU;XJnK%_|Xf z`tuc!n*rbI@Ks@R1@{AJv`U#lpWncp9I_lV<=VAy-0x&GZIqB0WoF_4HTpIbkj!iTOt!EigsfV`xzbyCO zKgtP%8rwKWE;roJv!b40xOvvNvaBhphN?p^NhFk021keL4>@YTG(FP{DcOTG%g~(O zMEbr=D}zQx&qi1GNwO&Vp; zC4!Pc$BHMI*v@{G{rDKSe@AW*Un3k~nj+2&VT>gh(+P$~glBLc`5~NQjPn!mkm9CK zP})AmZ0!W)?d+$=m|HLYhFt04A6THz<9GOK06k9R0eS>jpy8>RZ}JA5}F zdz(@Pf>sGUOVE>eNo3ckacd-@9+58gU=q@$gmf+@T_&PiBqU7&exP_MH1Uc?jpUT* I^CQ&%0Mya;djJ3c diff --git a/unitest/src/.svn/all-wcprops b/unitest/src/.svn/all-wcprops deleted file mode 100644 index bac46ba..0000000 --- a/unitest/src/.svn/all-wcprops +++ /dev/null @@ -1,5 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 68 -/projects/!svn/ver/355/com.patrikdufresne.license/trunk/unittest/src -END diff --git a/unitest/src/.svn/entries b/unitest/src/.svn/entries deleted file mode 100644 index f1588e6..0000000 --- a/unitest/src/.svn/entries +++ /dev/null @@ -1,38 +0,0 @@ -10 - -dir -355 -https://svn.patrikdufresne.com/projects/com.patrikdufresne.license/trunk/unittest/src -https://svn.patrikdufresne.com/projects - - - -2012-04-04T16:28:32.290129Z -355 -ikus060 - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -392366b5-5131-0410-a9e1-b88d89b6244e - - - - - - -0 - -com -dir - diff --git a/unitest/src/com/.svn/all-wcprops b/unitest/src/com/.svn/all-wcprops deleted file mode 100644 index cefc92c..0000000 --- a/unitest/src/com/.svn/all-wcprops +++ /dev/null @@ -1,5 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 72 -/projects/!svn/ver/355/com.patrikdufresne.license/trunk/unittest/src/com -END diff --git a/unitest/src/com/.svn/entries b/unitest/src/com/.svn/entries deleted file mode 100644 index 37f108e..0000000 --- a/unitest/src/com/.svn/entries +++ /dev/null @@ -1,38 +0,0 @@ -10 - -dir -355 -https://svn.patrikdufresne.com/projects/com.patrikdufresne.license/trunk/unittest/src/com -https://svn.patrikdufresne.com/projects - - - -2012-04-04T16:28:32.290129Z -355 -ikus060 - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -392366b5-5131-0410-a9e1-b88d89b6244e - - - - - - -0 - -patrikdufresne -dir - diff --git a/unitest/src/com/patrikdufresne/.svn/all-wcprops b/unitest/src/com/patrikdufresne/.svn/all-wcprops deleted file mode 100644 index 6483820..0000000 --- a/unitest/src/com/patrikdufresne/.svn/all-wcprops +++ /dev/null @@ -1,5 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 87 -/projects/!svn/ver/355/com.patrikdufresne.license/trunk/unittest/src/com/patrikdufresne -END diff --git a/unitest/src/com/patrikdufresne/.svn/entries b/unitest/src/com/patrikdufresne/.svn/entries deleted file mode 100644 index ed559dc..0000000 --- a/unitest/src/com/patrikdufresne/.svn/entries +++ /dev/null @@ -1,38 +0,0 @@ -10 - -dir -355 -https://svn.patrikdufresne.com/projects/com.patrikdufresne.license/trunk/unittest/src/com/patrikdufresne -https://svn.patrikdufresne.com/projects - - - -2012-04-04T16:28:32.290129Z -355 -ikus060 - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -392366b5-5131-0410-a9e1-b88d89b6244e - - - - - - -0 - -license -dir - diff --git a/unitest/src/com/patrikdufresne/license/.svn/all-wcprops b/unitest/src/com/patrikdufresne/license/.svn/all-wcprops deleted file mode 100644 index 57ffc7d..0000000 --- a/unitest/src/com/patrikdufresne/license/.svn/all-wcprops +++ /dev/null @@ -1,23 +0,0 @@ -K 25 -svn:wc:ra_dav:version-url -V 95 -/projects/!svn/ver/355/com.patrikdufresne.license/trunk/unittest/src/com/patrikdufresne/license -END -KeyManagerTest.java -K 25 -svn:wc:ra_dav:version-url -V 115 -/projects/!svn/ver/355/com.patrikdufresne.license/trunk/unittest/src/com/patrikdufresne/license/KeyManagerTest.java -END -LicenseManagerTest.java -K 25 -svn:wc:ra_dav:version-url -V 119 -/projects/!svn/ver/355/com.patrikdufresne.license/trunk/unittest/src/com/patrikdufresne/license/LicenseManagerTest.java -END -EncryptionManagerTest.java -K 25 -svn:wc:ra_dav:version-url -V 122 -/projects/!svn/ver/355/com.patrikdufresne.license/trunk/unittest/src/com/patrikdufresne/license/EncryptionManagerTest.java -END diff --git a/unitest/src/com/patrikdufresne/license/.svn/entries b/unitest/src/com/patrikdufresne/license/.svn/entries deleted file mode 100644 index 57a7f43..0000000 --- a/unitest/src/com/patrikdufresne/license/.svn/entries +++ /dev/null @@ -1,137 +0,0 @@ -10 - -dir -355 -https://svn.patrikdufresne.com/projects/com.patrikdufresne.license/trunk/unittest/src/com/patrikdufresne/license -https://svn.patrikdufresne.com/projects - - - -2012-04-04T16:28:32.290129Z -355 -ikus060 - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -392366b5-5131-0410-a9e1-b88d89b6244e - - - - - - -0 - -EncryptionManagerTest.java -file - - - - -2012-04-04T01:03:07.000000Z -ad50153fd8a41e462faa155d3373c8a9 -2012-04-04T16:28:32.290129Z -355 -ikus060 - - - - - - - - - - - - - - - - - - - - - -1811 - -KeyManagerTest.java -file - - - - -2012-04-04T13:55:26.000000Z -9ae6a0492d2dbd63d2e122fb5655dcd3 -2012-04-04T16:28:32.290129Z -355 -ikus060 - - - - - - - - - - - - - - - - - - - - - -838 - -LicenseManagerTest.java -file - - - - -2012-04-04T15:49:27.000000Z -af23ee619a56b43d529e5e13af46a018 -2012-04-04T16:28:32.290129Z -355 -ikus060 - - - - - - - - - - - - - - - - - - - - - -1968 - diff --git a/unitest/src/com/patrikdufresne/license/.svn/text-base/EncryptionManagerTest.java.svn-base b/unitest/src/com/patrikdufresne/license/.svn/text-base/EncryptionManagerTest.java.svn-base deleted file mode 100644 index 74daf5a..0000000 --- a/unitest/src/com/patrikdufresne/license/.svn/text-base/EncryptionManagerTest.java.svn-base +++ /dev/null @@ -1,72 +0,0 @@ -package com.patrikdufresne.license; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; -import java.security.SignatureException; -import java.security.spec.InvalidKeySpecException; - -import org.junit.Before; -import org.junit.Test; - -import org.junit.Assert; - -/** - * Test the functionality provided by the class {@link EncryptionManager} - * - * @author Patrik Dufresne - * - */ -public class EncryptionManagerTest { - - private EncryptionManager manager; - - private byte[] data; - - @Before - public void initEncryptionManager() throws IOException, - NoSuchAlgorithmException, InvalidKeySpecException { - - byte[] pubKey = EncryptionManager.readAll(new File("pubkey.der")); - byte[] privateKey = EncryptionManager.readAll(new File("privkey.der")); - this.manager = new EncryptionManager(pubKey, privateKey); - - // Prepare data - String string = "This is some data to by sign"; - this.data = string.getBytes(); - } - - @Test - public void sign_WithData_ReturnSignature() throws InvalidKeyException, - NoSuchAlgorithmException, SignatureException { - - byte[] sig = this.manager.sign(data); - - } - - @Test - public void verify_WithDataAndGoodSignature_ReturnTrue() - throws InvalidKeyException, NoSuchAlgorithmException, - SignatureException, FileNotFoundException, IOException { - - byte[] sig = this.manager.sign(data); - - Assert.assertTrue(this.manager.verify(data, sig)); - - } - - @Test - public void verify_WithDataAndWrongSignature_ReturnTrue() - throws InvalidKeyException, NoSuchAlgorithmException, - SignatureException, FileNotFoundException, IOException { - - byte[] sig = this.manager.sign(data); - sig[0] = (byte) (((int) sig[0]) + 3); - - Assert.assertFalse(this.manager.verify(data, sig)); - - } - -} diff --git a/unitest/src/com/patrikdufresne/license/.svn/text-base/KeyManagerTest.java.svn-base b/unitest/src/com/patrikdufresne/license/.svn/text-base/KeyManagerTest.java.svn-base deleted file mode 100644 index 5ffe968..0000000 --- a/unitest/src/com/patrikdufresne/license/.svn/text-base/KeyManagerTest.java.svn-base +++ /dev/null @@ -1,44 +0,0 @@ -package com.patrikdufresne.license; - -import org.junit.Before; -import org.junit.Test; - -public class KeyManagerTest { - - private KeyManager manager; - - @Before - public void initKeyManager() { - this.manager = new KeyManager(); - } - - @Test - public void generateKey_WithAuthCode_ReturnKey() { - - String key = this.manager.generateKey(3, "coucou"); - - } - - @Test - public void validateKey_WithValidKey_ReturnTrue() - throws KeyInvalidException, KeyBlackListedException { - - String key = this.manager.generateKey(3, "coucou"); - - this.manager.validateKey(key); - - } - - @Test(expected = KeyInvalidException.class) - public void validateKey_WithInvalidKey_ReturnTrue() - throws KeyInvalidException, KeyBlackListedException { - - String key = this.manager.generateKey(3, "coucou"); - - key = key.replace("0", "1"); - - this.manager.validateKey(key); - - } - -} diff --git a/unitest/src/com/patrikdufresne/license/.svn/text-base/LicenseManagerTest.java.svn-base b/unitest/src/com/patrikdufresne/license/.svn/text-base/LicenseManagerTest.java.svn-base deleted file mode 100644 index aa853a6..0000000 --- a/unitest/src/com/patrikdufresne/license/.svn/text-base/LicenseManagerTest.java.svn-base +++ /dev/null @@ -1,80 +0,0 @@ -package com.patrikdufresne.license; - -import static org.junit.Assert.*; - -import java.io.File; -import java.io.IOException; -import java.security.GeneralSecurityException; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; -import java.security.SignatureException; - -import org.junit.Before; -import org.junit.Test; - -/** - * This class test all the functionnality provided by the {@link LicenseManager} - * . - * - * @author ikus060 - * - */ -public class LicenseManagerTest { - - static class MockLicense extends AbstractLicense { - - private static final long serialVersionUID = -4612807836761969030L; - - } - - private LicenseManager manager; - - @Before - public void initLicenseManager() throws GeneralSecurityException, - IOException { - this.manager = new LicenseManager("pubkey.der", "privkey.der"); - } - - /** - * Check to create a license file - * - * @throws IOException - * @throws SignatureException - * @throws NoSuchAlgorithmException - * @throws InvalidKeyException - */ - @Test - public void writeLicense_WithLicense_CreateTheFile() - throws InvalidKeyException, NoSuchAlgorithmException, - SignatureException, IOException { - MockLicense license = new MockLicense(); - File file = new File("unittest.lic"); - manager.writeLicense(license, file); - assertTrue(file.exists()); - } - - /** - * Read the license file. - * - * @throws IOException - * @throws SignatureException - * @throws NoSuchAlgorithmException - * @throws InvalidKeyException - * @throws ClassNotFoundException - */ - @Test - public void readLicense_WithValidFile_ReadLicense() - throws InvalidKeyException, NoSuchAlgorithmException, - SignatureException, IOException, ClassNotFoundException { - MockLicense license = new MockLicense(); - File file = new File("unittest2.lic"); - manager.writeLicense(license, file); - assertTrue(file.exists()); - - // Read the file - MockLicense license2 = (MockLicense) manager.readLicenseFile(file); - assertNotNull(license2); - - } - -} -- GitLab