Skip to content

Commit 7269955

Browse files
committed
v4.1.0
1 parent 5455083 commit 7269955

File tree

449 files changed

+17407
-5634
lines changed

Some content is hidden

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

449 files changed

+17407
-5634
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ ant.properties
1212
#Gradle
1313
.gradle
1414
build
15-
gradle.properties
1615

1716
#Maven
1817
target

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ This includes the following artifacts of the SDK (cf. [overview of all artifacts
1616
| de.cotech:hwsecurity-intent-nfc | 14 | |
1717
| de.cotech:hwsecurity-intent-usb | 14 | |
1818
| de.cotech:hwsecurity-fido | 14 | 19 |
19+
| de.cotech:hwsecurity-fido2 | 14 | 19 |
1920
| de.cotech:hwsecurity-openpgp | 14 | |
2021
| de.cotech:hwsecurity-piv | 14 | |
2122
| de.cotech:hwsecurity-ui | 14 | 19 |
@@ -24,7 +25,7 @@ This includes the following artifacts of the SDK (cf. [overview of all artifacts
2425
## Notice
2526

2627
This open source release does not reflect the newest version of the SDK.
27-
Some parts are currently not released as GPLv3, such as FIDO2 support.
28+
Some parts are currently not released as GPLv3.
2829

2930
## Contributing
3031

build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ buildscript {
55
}
66

77
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.4.2'
8+
classpath 'com.android.tools.build:gradle:4.0.0'
99
classpath 'org.jetbrains.dokka:dokka-android-gradle-plugin:0.9.17'
10-
classpath 'digital.wup:android-maven-publish:3.6.2'
1110
}
1211
}
1312

@@ -19,6 +18,6 @@ allprojects {
1918
}
2019

2120
ext {
22-
compileSdkVersion = 28
23-
hwSdkVersionName = '3.2.1'
21+
compileSdkVersion = 29
22+
hwSdkVersionName = '4.1.0'
2423
}

gen-dokka.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

gradle.properties

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Project-wide Gradle settings.
2+
# IDE (e.g. Android Studio) users:
3+
# Gradle settings configured through the IDE *will override*
4+
# any settings specified in this file.
5+
# For more details on how to configure your build environment visit
6+
# http://www.gradle.org/docs/current/userguide/build_environment.html
7+
# Specifies the JVM arguments used for the daemon process.
8+
# The setting is particularly useful for tweaking memory settings.
9+
org.gradle.jvmargs=-Xmx1536m
10+
# When configured, Gradle will run in incubating parallel mode.
11+
# This option should only be used with decoupled projects. More details, visit
12+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13+
# org.gradle.parallel=true
14+
15+
16+
android.useAndroidX=true
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Tue Jun 18 09:22:28 CEST 2019
1+
#Wed Jun 24 11:02:11 CEST 2020
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

gradlew

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/usr/bin/env sh
22

3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
319
##############################################################################
420
##
521
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
2844
APP_BASE_NAME=`basename "$0"`
2945

3046
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS='"-Xmx64m"'
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
3248

3349
# Use the maximum available, or set MAX_FD != -1 to use that value.
3450
MAX_FD="maximum"

gradlew.bat

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem http://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
117
@if "%DEBUG%" == "" @echo off
218
@rem ##########################################################################
319
@rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
1430
set APP_HOME=%DIRNAME%
1531

1632
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS="-Xmx64m"
33+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
1834

1935
@rem Find java.exe
2036
if defined JAVA_HOME goto findJavaFromJavaHome

hwsecurity/core/build.gradle

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
apply plugin: 'com.android.library'
2-
apply plugin: 'digital.wup.android-maven-publish'
2+
apply plugin: 'maven-publish'
33
apply plugin: 'org.jetbrains.dokka-android'
44

55
dependencies {
6-
implementation 'androidx.lifecycle:lifecycle-runtime:2.0.0'
6+
implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0'
77

8-
compileOnly 'androidx.annotation:annotation:1.0.0'
8+
compileOnly 'androidx.annotation:annotation:1.1.0'
99

1010
api 'com.google.auto.value:auto-value-annotations:1.6.2'
1111
annotationProcessor 'com.google.auto.value:auto-value:1.6.2'
@@ -35,51 +35,54 @@ android {
3535
}
3636
}
3737

38-
publishing {
39-
publications {
40-
mavenAar(MavenPublication) {
41-
groupId = 'de.cotech'
42-
artifactId = 'hwsecurity'
43-
version = android.defaultConfig.versionName
38+
// https://developer.android.com/studio/build/maven-publish-plugin
39+
afterEvaluate {
40+
publishing {
41+
publications {
42+
release(MavenPublication) {
43+
from components.release
4444

45-
from components.android
45+
groupId = 'de.cotech'
46+
artifactId = 'hwsecurity'
47+
version = android.defaultConfig.versionName
4648

47-
pom {
48-
url = 'https://hwsecurity.dev'
49-
licenses {
50-
license {
51-
name = 'Commercial'
52-
url = 'https://hwsecurity.dev/sales/'
53-
distribution = 'repo'
49+
pom {
50+
url = 'https://hwsecurity.dev'
51+
licenses {
52+
license {
53+
name = 'Commercial'
54+
url = 'https://hwsecurity.dev/sales/'
55+
distribution = 'repo'
56+
}
57+
license {
58+
name = 'GNU General Public License, version 3'
59+
url = 'https://www.gnu.org/licenses/gpl-3.0.txt'
60+
}
5461
}
55-
license {
56-
name = 'GNU General Public License, version 3'
57-
url = 'https://www.gnu.org/licenses/gpl-3.0.txt'
62+
organization {
63+
name = 'Confidential Technologies GmbH'
64+
url = 'https://www.cotech.de'
5865
}
5966
}
60-
organization {
61-
name = 'Confidential Technologies GmbH'
62-
url = 'https://www.cotech.de'
63-
}
6467
}
6568
}
66-
}
67-
/*
68-
* To upload release, create file gradle.properties in ~/.gradle/ with this content:
69-
*
70-
* cotechMavenName=xxx
71-
* cotechMavenPassword=xxx
72-
*/
73-
if (project.hasProperty('cotechMavenName') && project.hasProperty('cotechMavenPassword')) {
74-
println "Found cotechMavenName, cotechMavenPassword in gradle.properties!"
69+
/*
70+
* To upload release, create file gradle.properties in ~/.gradle/ with this content:
71+
*
72+
* cotechMavenName=xxx
73+
* cotechMavenPassword=xxx
74+
*/
75+
if (project.hasProperty('cotechMavenName') && project.hasProperty('cotechMavenPassword')) {
76+
println "Found cotechMavenName, cotechMavenPassword in gradle.properties!"
7577

76-
repositories {
77-
maven {
78-
credentials {
79-
username cotechMavenName
80-
password cotechMavenPassword
78+
repositories {
79+
maven {
80+
credentials {
81+
username cotechMavenName
82+
password cotechMavenPassword
83+
}
84+
url = "https://maven.cotech.de"
8185
}
82-
url = "https://maven.cotech.de"
8386
}
8487
}
8588
}
@@ -90,8 +93,9 @@ dokka {
9093
dokkaFatJar = files('libs/dokka-hugo-fatjar-0.9.17.jar')
9194
// does not work correctly with Maven:
9295
//dokkaFatJar = 'de.cotech:dokka-hugo-fatjar:0.9.17'
96+
moduleName = 'hwsecurity'
9397
outputFormat = "hugo"
94-
outputDirectory = "$buildDir/dokka/reference"
98+
outputDirectory = "$projectDir/../../hwsecurity.dev/content/reference"
9599
sourceDirs = files('src/main/java')
96100

97101
packageOptions {

hwsecurity/core/src/main/java/de/cotech/hw/SecurityKey.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018-2019 Confidential Technologies GmbH
2+
* Copyright (C) 2018-2020 Confidential Technologies GmbH
33
*
44
* You can purchase a commercial license at https://hwsecurity.dev.
55
* Buying such a license is mandatory as soon as you develop commercial
@@ -29,7 +29,7 @@
2929

3030
import androidx.annotation.AnyThread;
3131
import androidx.annotation.WorkerThread;
32-
import androidx.lifecycle.LifecycleOwner;
32+
3333
import de.cotech.hw.internal.transport.SecurityKeyInfo.TransportType;
3434
import de.cotech.hw.internal.transport.Transport;
3535

@@ -81,7 +81,7 @@ public boolean isTransportNfc() {
8181
*/
8282
@AnyThread
8383
public boolean isTransportUsb() {
84-
return transport.getTransportType() == TransportType.USB_CCID || transport.getTransportType() == TransportType.USB_U2FHID;
84+
return transport.getTransportType() == TransportType.USB_CCID || transport.getTransportType() == TransportType.USB_CTAPHID;
8585
}
8686

8787
/**

0 commit comments

Comments
 (0)