Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy changes from 0.15.2 to master #1041

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test-java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ jobs:

java-example:
name: Example project – JavaThemis
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Install system dependencies
run: |
sudo sh -c 'echo "DEBIAN_FRONTEND=noninteractive" >> /etc/environment'
sudo apt update
sudo apt install --yes gcc make libssl-dev default-jdk
sudo apt install --yes gcc make libssl-dev default-jdk dpkg-dev
- name: Check out code
uses: actions/checkout@v2
- name: Install Themis Core with JNI
Expand All @@ -128,10 +128,10 @@ jobs:
- name: Build JavaThemis example
run: |
cd docs/examples/java
./gradlew --no-daemon build
JAVA_TOOL_OPTIONS=-Djava.library.path=/usr/local/lib ./gradlew --no-daemon build
# Thus runs a bit of an abomination: Themis Core and JNI libs are built
# from source while JavaThemis binaries are installed from Maven Central.
- name: Run JavaThemis example
run: |
cd docs/examples/java
java -Djava.library.path=/usr/local/lib -jar app/build/libs/app.jar
JAVA_TOOL_OPTIONS=-Djava.library.path=/usr/local/lib ./gradlew --no-daemon run
60 changes: 60 additions & 0 deletions .github/workflows/test-nodejs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
paths:
- '.github/workflows/test-nodejs.yaml'
- 'docs/examples/js/**'
- 'docs/examples/ts/**'
- 'src/soter/**'
- 'src/themis/**'
- 'src/wrappers/themis/jsthemis/**'
Expand Down Expand Up @@ -132,3 +133,62 @@ jobs:
node secure_comparator_client.js
kill -SIGTERM "$!"
echo "ok"
- name: Test 'import' syntax
if: always()
run: |
cd $GITHUB_WORKSPACE/docs/examples/js/
echo "Test import syntax..."
node import_module.mjs
echo "ok"
- name: Install Typescript deps
if: always()
run: |
cd $GITHUB_WORKSPACE/docs/examples/ts/
npm install
npm run compile
- name: Test Typescript examples (Secure Keygen)
if: always()
run: |
cd $GITHUB_WORKSPACE/docs/examples/ts
echo "Test Secure Keygen..."
node secure_keygen.js
echo "ok"
- name: Test Typescript examples (Secure Cell)
if: always()
run: |
cd $GITHUB_WORKSPACE/docs/examples/ts
echo "Test Secure Cell..."
node secure_cell.js
echo "ok"
- name: Test Typescript examples (Secure Message)
if: always()
run: |
cd $GITHUB_WORKSPACE/docs/examples/ts
echo "Test Secure Message..."
alice=($(node secure_keygen.js | cut -c 15-))
bob=($(node secure_keygen.js | cut -c 15-))
enc=$(node secure_message.js enc "${alice[1]}" "${bob[2]}" message)
dec=$(node secure_message.js dec "${bob[1]}" "${alice[2]}" "$enc")
test "$dec" = "message"
echo "ok"
- name: Test Typescript examples (Secure Session)
if: always()
run: |
cd $GITHUB_WORKSPACE/docs/examples/ts
echo "Test Secure Session..."
node secure_session_server.js &
sleep 1 # give the server time to launch
node secure_session_client.js > output.txt
kill -SIGTERM "$!"
grep -q 'Hello server!!!' output.txt
echo "ok"
- name: Test Typescript examples (Secure Comparator)
if: always()
run: |
cd $GITHUB_WORKSPACE/docs/examples/ts
echo "Test Secure Comparator..."
node secure_comparator_server.js &
sleep 1 # give the server time to launch
node secure_comparator_client.js
kill -SIGTERM "$!"
echo "ok"
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@

Changes that are currently in development and have not been released yet.

## [0.15.2](https://github.com/cossacklabs/themis/releases/tag/0.15.2), November 24 2023

### JsThemis wrapper
- Added the ability to use the `import` syntax for the jsthemis module.
- Added a declaration file for TypeScript.

### Android, ReactNative wrappers
Updated versions of dependencies. New minimum versions of iOS, Android are set.
- Target API level 33
- Minimum API level 21
- Minumum iOS set to 12.4 due to ReactNative requirements

## [0.15.1](https://github.com/cossacklabs/themis/releases/tag/0.15.1), September 13 2023

### Swift, Objective-C wrappers
- Updated OpenSSL to 1.1.1v
- Removed support of 32-bit platforms
- Minimum iOS: 11, macOS: 10.13, Catalyst: 14

## [0.15.0](https://github.com/cossacklabs/themis/releases/tag/0.15.0), June 21st 2023

**TL;DR:**
Expand Down
5 changes: 3 additions & 2 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# OpenSSL 1.1.1k
binary "https://raw.githubusercontent.com/cossacklabs/openssl-apple/cossacklabs/carthage/openssl-static-xcframework.json" == 1.1.11101
# OpenSSL 1.1.1v - we need this to build themis framework.
binary "https://raw.githubusercontent.com/cossacklabs/openssl-apple/cossacklabs/carthage/openssl-static-xcframework.json" == 1.1.12201

2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
binary "https://raw.githubusercontent.com/cossacklabs/openssl-apple/cossacklabs/carthage/openssl-static-xcframework.json" "1.1.11101"
binary "https://raw.githubusercontent.com/cossacklabs/openssl-apple/cossacklabs/carthage/openssl-static-xcframework.json" "1.1.12201"
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ LDFLAGS += -L$(BIN_PATH)
# Build shared libraries
CFLAGS += -fPIC

#----- Mode packaging ----------------------------------------------------------
# Default value is not packaging mode. Goals: dev, rpm, deb_php will set it to 1
MODE_PACKAGING = 0


########################################################################
#
# Pretty-printing utilities
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ let package = Package(
targets: [
.binaryTarget(name: "themis",
// update version in URL path
url: "https://github.com/cossacklabs/themis/releases/download/0.14.0/themis.xcframework.zip",
url: "https://github.com/cossacklabs/themis/releases/download/0.15.1/themis.xcframework.zip",
// The scripts/create_xcframework.sh calculates the checksum when generating the XCF.
// Alternatively, run from package directory:
// swift package compute-checksum build/xcf_output/themis.xcframework.zip
checksum: "182587c9070b94e552816d3cc174d64ea0f0a64d5b19483210bcf3dcac4d2658"),
checksum: "2d5bfbba7d5d3ecd0d40acdaee65d1b5d42dee5df5ae9d99faec4119087238c5"),

]
)
44 changes: 26 additions & 18 deletions Themis.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 52;
objectVersion = 56;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -1022,7 +1022,7 @@
};
};
buildConfigurationList = 738B81092239809D00A9947C /* Build configuration list for PBXProject "Themis" */;
compatibilityVersion = "Xcode 9.3";
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Expand Down Expand Up @@ -1321,7 +1321,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 11;
CURRENT_PROJECT_VERSION = 12;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand All @@ -1342,9 +1342,9 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 0.14.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 0.15.1;
ONLY_ACTIVE_ARCH = YES;
SUPPORTS_MACCATALYST = NO;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
Expand Down Expand Up @@ -1387,7 +1387,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 11;
CURRENT_PROJECT_VERSION = 12;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand All @@ -1402,9 +1402,9 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 0.14.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 0.15.1;
SUPPORTS_MACCATALYST = NO;
SWIFT_COMPILATION_MODE = wholemodule;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down Expand Up @@ -1439,7 +1439,8 @@
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 0.14.0;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 0.15.1;
PRODUCT_BUNDLE_IDENTIFIER = com.cossacklabs.themis;
PRODUCT_MODULE_NAME = themis;
PRODUCT_NAME = themis;
Expand Down Expand Up @@ -1475,7 +1476,8 @@
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 0.14.0;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 0.15.1;
PRODUCT_BUNDLE_IDENTIFIER = com.cossacklabs.themis;
PRODUCT_MODULE_NAME = themis;
PRODUCT_NAME = themis;
Expand All @@ -1488,15 +1490,16 @@
9F4A24A7223A8D7F005CB63A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 11;
DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_BITCODE = YES;
ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = "";
EXPORTED_SYMBOLS_FILE = "$(PROJECT_DIR)/src/wrappers/themis/Obj-C/exported.symbols";
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -1510,15 +1513,17 @@
);
INFOPLIST_FILE = "src/wrappers/themis/Obj-c/Themis/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 0.14.0;
MARKETING_VERSION = 0.15.1;
PRODUCT_BUNDLE_IDENTIFIER = com.cossacklabs.themis;
PRODUCT_MODULE_NAME = themis;
PRODUCT_NAME = themis;
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = NO;
Expand All @@ -1529,15 +1534,16 @@
9F4A24A8223A8D7F005CB63A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 11;
DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_BITCODE = YES;
ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = "";
EXPORTED_SYMBOLS_FILE = "$(PROJECT_DIR)/src/wrappers/themis/Obj-C/exported.symbols";
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -1551,15 +1557,17 @@
);
INFOPLIST_FILE = "src/wrappers/themis/Obj-c/Themis/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 0.14.0;
MARKETING_VERSION = 0.15.1;
PRODUCT_BUNDLE_IDENTIFIER = com.cossacklabs.themis;
PRODUCT_MODULE_NAME = themis;
PRODUCT_NAME = themis;
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = NO;
Expand Down
17 changes: 17 additions & 0 deletions docs/examples/android/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Android example

## Compile
```
./gradlew clean build
```

## Install
```
./gradlew installDebug
```
You should see the empty screen with the message "Hello from themis!" and title "ThemisTestApp".
Also, you may to run `adb logcat | grep SMC` and see something like this:
```agsl
10-03 21:36:57.842 16956 16956 D SMC : encrypted string = AAEBQQwAAAAQAAAADQAAABYAAAASizR1/IPS4UYioLPeH8VpdgvaXl9875aZorAZ/soEABAAa/ARqQwo6liyQrluj06zohARxU/0LBNYb3UvKAc=
10-03 21:36:58.776 16956 16956 D SMC : decrypted data = hello message
```
9 changes: 5 additions & 4 deletions docs/examples/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 29
buildToolsVersion '29.0.2'
compileSdkVersion 33
buildToolsVersion '34.0.0'
defaultConfig {
applicationId "com.cossacklabs.themis.android.example"
minSdkVersion 25
targetSdkVersion 29
targetSdkVersion 33
versionCode 1
versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
Expand All @@ -20,6 +20,7 @@ android {
}
productFlavors {
}
namespace 'com.cossacklabs.themis.android.example'
}

dependencies {
Expand All @@ -29,7 +30,7 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.12'
implementation 'com.cossacklabs.com:themis:0.14.0'
implementation 'com.cossacklabs.com:themis:0.15.2'
implementation "androidx.core:core-ktx:1.3.2"
//noinspection GradleDependency: we use slightly outdated "kotlin_version" on purpose
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
Expand Down
Loading
Loading