Skip to content

Commit 3654863

Browse files
authored
Merge pull request #10 from Cosmian/feature/add_findex_ffi
Feature/add findex ffi
2 parents 4b11548 + 05dd8e2 commit 3654863

81 files changed

Lines changed: 2962 additions & 2820 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.classpath

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@
2929
<attribute name="test" value="true"/>
3030
</attributes>
3131
</classpathentry>
32-
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
33-
<attributes>
34-
<attribute name="maven.pomderived" value="true"/>
35-
</attributes>
36-
</classpathentry>
3732
<classpathentry kind="src" path="target/generated-sources/annotations">
3833
<attributes>
3934
<attribute name="optional" value="true"/>

.gitlab-ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
image: gitlab.cosmian.com:5000/core/ci-java-8:latest
2+
3+
variables:
4+
CARGO_HOME: ${CI_PROJECT_DIR}/.cargo/
5+
SCCACHE_DIR: ${CI_PROJECT_DIR}/.cache/sccache
6+
COSMIAN_SERVER_URL: http://localhost:9998
7+
KMS_PUBLIC_PATH: /tmp
8+
KMS_PRIVATE_PATH: /tmp
9+
KMS_SHARED_PATH: /tmp
10+
11+
stages:
12+
- build
13+
14+
build:
15+
stage: build
16+
services:
17+
- name: gitlab.cosmian.com:5000/core/kms:2.1.0_ci
18+
alias: kms_ci
19+
script:
20+
- mvn package
21+
artifacts:
22+
paths:
23+
- target/*.jar
24+
expire_in: 3 mos

.vscode/settings.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
],
1111
"java.format.settings.url": ".vscode/codestyle-java.xml",
1212
"[java]": {
13-
"editor.detectIndentation": false
13+
"editor.detectIndentation": false,
14+
"editor.insertSpaces": true,
15+
"editor.tabSize": 4,
1416
},
1517
"files.watcherExclude": {
1618
"**/target": true
1719
}
18-
}
20+
}

README.md

100644100755
Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ In addition, please have a look at the following tests for implementation exampl
1717

1818
- [TestCoverCrypt](./src/test/java/com/cosmian/TestCoverCrypt.java) for using the CoverCrypt scheme with Cosmian KMS
1919
- [TestFfiCoverCrypt](./src/test/java/com/cosmian/TestFfiCoverCrypt.java) for using the CoverCrypt scheme with the local native library
20-
- [TestAbe](./src/test/java/com/cosmian/TestAbe.java) for using the ABE GPSW scheme with Cosmian KMS
21-
- [TestFfiAbe](./src/test/java/com/cosmian/TestFfiAbe.java) for using the ABE GPSW scheme with the local native library
20+
- [TestGpsw](./src/test/java/com/cosmian/TestAbe.java) for using the ABE GPSW scheme with Cosmian KMS
21+
- [TestFfiGpsw](./src/test/java/com/cosmian/TestFfiAbe.java) for using the ABE GPSW scheme with the local native library
2222
- [TestKmip](./src/test/java/com/cosmian/TestKmip.java) for using the KMIP 2.1 interface with the Cosmian KMS
23+
- [TestFfiFindex](./src/test/java/com/cosmian/TestFfiAbe.java) for using the SSE Findex scheme with the local native library
2324

2425

2526
## Using in Java projects
@@ -30,7 +31,7 @@ This library free software and is available on Maven Central
3031
<dependency>
3132
<groupId>com.cosmian</groupId>
3233
<artifactId>cosmian_java_lib</artifactId>
33-
<version>0.7.5</version>
34+
<version>0.7.6</version>
3435
</dependency>
3536
```
3637

@@ -40,13 +41,24 @@ When using local encryption and decryption with [GPSW](https://github.com/Cosmia
4041

4142
Check the main pages of the respective projects to build the native librairies appropriate for your systems. The [test directory](./src/test/resources/linux-x86-64/) provides pre-built libraries for Linux GLIBC 2.17. These librairies should run fine on a system with a more recent GLIBC version.
4243

43-
This table shows the minimum versions correspondances between the various components
44+
This table shows the minimum versions correspondences between the various components
4445

45-
KMS Server | Java Lib | abe_gpsw lib | CoverCrypt lib
46-
-----------|-----------|--------------|---------------
47-
1.2.0 | 0.5.0 | 0.3.0 | N/A
48-
1.2.1 | 0.5.2 | 0.4.0 | N/A
49-
1.2.1 | ~~0.6.0~~ | ~~0.6.0~~ | N/A
50-
1.2.1 | 0.6.1 | 0.6.1 | N/A
51-
2.0.1 | 0.7.2 | 0.6.5 | 1.0.2
52-
2.0.2 | 0.7.5 | 0.6.10 | 2.0.0
46+
KMS Server | Java Lib | GPSW lib | CoverCrypt lib | Findex
47+
-----------|-----------|-----------|----------------|-------
48+
1.2.0 | 0.5.0 | 0.3.0 | N/A | N/A
49+
1.2.1 | 0.5.2 | 0.4.0 | N/A | N/A
50+
1.2.1 | ~~0.6.0~~ | ~~0.6.0~~ | N/A | N/A
51+
1.2.1 | 0.6.1 | 0.6.1 | N/A | N/A
52+
2.0.1 | 0.7.2 | 0.6.5 | 1.0.2 | N/A
53+
2.0.2 | 0.7.5 | 0.6.10 | 2.0.0 | N/A
54+
2.1.0 | 0.7.6 | 1.1.1 | 4.0.0 | 0.2.3
55+
56+
## Update native libraries
57+
58+
The Cosmian Java lib uses JNA to access functions of the 2 native shared libraries `CoverCrypt` and `ABE GPSW`.
59+
60+
On Linux, those 2 libraries must be found in 1 of these folders:
61+
- src/resources/linux-x86-64
62+
- src/test/resources/linux-x86-64
63+
64+
To update those native libraries, the script `src/test/resources/linux-x86-64/update_native_libraries.sh`

pom.xml

100644100755
Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.cosmian</groupId>
55
<artifactId>cosmian_java_lib</artifactId>
6-
<version>0.7.5</version>
6+
<version>0.7.6</version>
77

88
<name>cosmian_java_lib</name>
99
<description>The Cosmian Java Lib provides local encryption/decyption and access to the Cosmian public platform APIs</description>
@@ -67,6 +67,12 @@
6767
<artifactId>jna</artifactId>
6868
<version>${jna.version}</version>
6969
</dependency>
70+
<dependency>
71+
<groupId>com.rover12421.android</groupId>
72+
<artifactId>dx</artifactId>
73+
<version>1.16</version>
74+
</dependency>
75+
<!-- Scope test -->
7076
<dependency>
7177
<groupId>org.junit.jupiter</groupId>
7278
<artifactId>junit-jupiter-engine</artifactId>
@@ -85,6 +91,12 @@
8591
<version>20210307</version>
8692
<scope>test</scope>
8793
</dependency>
94+
<dependency>
95+
<groupId>org.xerial</groupId>
96+
<artifactId>sqlite-jdbc</artifactId>
97+
<version>3.8.7</version>
98+
<scope>test</scope>
99+
</dependency>
88100

89101
</dependencies>
90102
<build>
@@ -146,4 +158,4 @@
146158
</plugin>
147159
</plugins>
148160
</build>
149-
</project>
161+
</project>

0 commit comments

Comments
 (0)