Skip to content

Commit

Permalink
Merge pull request #3 from christianpaquin/cp-undocument-windows
Browse files Browse the repository at this point in the history
Undocument Windows support, since we don't yet support the platform.
  • Loading branch information
jimouris authored Jun 16, 2020
2 parents 3cc7500 + c269a13 commit 6dd475f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 35 deletions.
18 changes: 1 addition & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,10 @@ ninja
sudo ninja install
```

#### Windows
Refer to [liboqs](https://github.com/open-quantum-safe/liboqs/) building instructions using [`CMake Tools`](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) with Visual Studio.



### Building the Java OQS wrapper

To build the `liboqs-java` wrapper type for different operating systems add the `-P <OS>` flag, where `<OS> = {linux, macosx, windows}`.
To build the `liboqs-java` wrapper type for different operating systems add the `-P <OS>` flag, where `<OS> = {linux, macosx}`.

For instance, to build `liboqs-java` for MacOS, type:
```
Expand Down Expand Up @@ -262,18 +258,6 @@ OpenSSL: 86 B6 46 9C 56 44 6B FB F8 B1 37 F0 86 4D 4D 74 0F FD 51 99
System (default): 37 55 6F 4F 03 53 BB 71 E8 70 C2 3D DF 85 69 57 30 CE FA 11 EF 50 8A F5 AE 25 35 6F 91 CF EC 1D
```

#### Windows

To run the examples on Windows, compilation is the same, but the command to run the program is slightly different since the PATH environment variable in Windows is separated by semicolons `;` instead of `:`.

For instance, to compile and run the KEM example, type:
```
$ javac -cp target/liboqs-java.jar examples/KEMExample.java
$ java -Djava.library.path=target/ -cp target/liboqs-java.jar;examples/ KEMExample
```

Similarly, you can run the `SigExample` and `RandExample` located in the [examples](./examples/) directory.


## Troubleshooting
* __Compiler errors__
Expand Down
2 changes: 1 addition & 1 deletion examples/RandExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static void main(String[] args) {
System.out.println("NIST-KAT:\t\t" + Common.to_hex(Rand.randombytes(32)));

String os = System.getProperty("os.name");
if (!os.equals("Windows")) {
if (!os.equals("Windows")) { // OQS note: Windows not yet supported, but leaving this here for when we do
Rand.randombytes_switch_algorithm("OpenSSL");
System.out.println("OpenSSL:\t\t" + Common.to_hex(Rand.randombytes(32)));
}
Expand Down
17 changes: 0 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,6 @@
</dependencies>

<profiles>
<profile>
<id>windows</id>
<activation>
<property>
<name>platform</name>
<value>win</value>
</property>
</activation>
<properties>
<lib_name>oqs-jni.dll</lib_name>
<!-- Provide default liboqs Windows installation directories -->

<!-- <liboqs.include.dir>/usr/local/include</liboqs.include.dir>-->
<!-- <liboqs.lib.dir>/usr/local/lib</liboqs.lib.dir>-->
<java.os.include>-I${JAVA_HOME}/include -I${JAVA_HOME}/include/win32</java.os.include>
</properties>
</profile>
<profile>
<id>macosx</id>
<activation>
Expand Down

0 comments on commit 6dd475f

Please sign in to comment.