You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by sd...@apache.org on 2016/07/22 07:00:30 UTC

[02/50] commons-crypto git commit: Show JNA status

Show JNA status

Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/d3bb874a
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/d3bb874a
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/d3bb874a

Branch: refs/heads/CRYPTO-1.0.0
Commit: d3bb874acf65b26e06417fd096496f48c4296cd9
Parents: c446231
Author: Sebb <se...@apache.org>
Authored: Thu Jul 7 18:05:17 2016 +0100
Committer: Sebb <se...@apache.org>
Committed: Thu Jul 7 18:05:17 2016 +0100

----------------------------------------------------------------------
 .../crypto/jna/OpenSslNativeJnaTest.java        | 33 ++++++++++++++++++++
 1 file changed, 33 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/d3bb874a/src/test/java/org/apache/commons/crypto/jna/OpenSslNativeJnaTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/crypto/jna/OpenSslNativeJnaTest.java b/src/test/java/org/apache/commons/crypto/jna/OpenSslNativeJnaTest.java
new file mode 100644
index 0000000..28b3381
--- /dev/null
+++ b/src/test/java/org/apache/commons/crypto/jna/OpenSslNativeJnaTest.java
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+package org.apache.commons.crypto.jna;
+
+import org.junit.Test;
+
+public class OpenSslNativeJnaTest {
+
+    @Test
+    public void test() {
+        if (OpenSslJna.isEnabled()) {
+            System.out.println("** INFO: JNA is using: " + OpenSslNativeJna.SSLeay_version(0));
+        } else {
+            System.out.println("** WARN: JNA could not be enabled: " + OpenSslJna.initialisationError().getMessage());
+        }
+    }
+}