Skip to content

Commit d13fc13

Browse files
authored
update ziti-tunnel-sdk-c@v1.10.6 (#312)
* updat ziti-tunnel-sdk-c@v1.10.6 * clean up swift warnings * use xcode 26 * enable vcpkg caching for tsdk builds
1 parent 8f4173c commit d13fc13

File tree

6 files changed

+24
-7
lines changed

6 files changed

+24
-7
lines changed

.github/workflows/CI.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
- uses: maxim-lobanov/setup-xcode@v1
3434
with:
35-
xcode-version: '16.4'
35+
xcode-version: '26.2'
3636

3737
- name: macOS tools
3838
if: runner.os == 'macOS'
@@ -43,9 +43,24 @@ jobs:
4343
with:
4444
vcpkgJsonGlob: './deps/ziti-tunnel-sdk-c/vcpkg.json'
4545

46+
- name: get vcpkg cache key
47+
id: get_vcpkg_cache_key
48+
shell: bash
49+
env:
50+
KEY_PREFIX: vcpkg_cache-${{ matrix.spec.toolchain }}
51+
run: |
52+
common_key="${KEY_PREFIX}-vcpkg_json_md5=$(md5sum ./deps/ziti-tunnel-sdk-c/vcpkg.json | awk '{ print $1 }')"
53+
echo "key=${common_key}-ImageVersion=${ImageVersion}" | tee -a $GITHUB_OUTPUT
54+
55+
- uses: actions/cache@v5
56+
with:
57+
key: ${{ steps.get_vcpkg_cache_key.outputs.key }}
58+
path: ./deps/ziti-tunnel-sdk-c/${{ matrix.spec.toolchain }}/vcpkg_cache
59+
4660
- name: ${{ matrix.spec.name }}
4761
env:
4862
TOOLCHAIN: ${{ matrix.spec.toolchain && format('../../toolchains/{0}.cmake', matrix.spec.toolchain) || '' }}
63+
VCPKG_BINARY_SOURCES: "clear;files,/Users/runner/work/ziti-sdk-swift/ziti-sdk-swift/deps/ziti-tunnel-sdk-c/${{ matrix.spec.toolchain }}/vcpkg_cache,readwrite"
4964
run: |
5065
(cd deps/ziti-tunnel-sdk-c && git fetch --tags)
5166
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DTLSUV_TLSLIB=openssl -DEXCLUDE_PROGRAMS=ON -DVCPKG_INSTALL_OPTIONS="--overlay-ports=./deps/vcpkg-overlays/json-c" -DZITI_TUNNEL_BUILD_TESTS=OFF -DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN}" -S ./deps/ziti-tunnel-sdk-c -B ./deps/ziti-tunnel-sdk-c/${{ matrix.spec.name }}
@@ -70,7 +85,7 @@ jobs:
7085

7186
- uses: maxim-lobanov/setup-xcode@v1
7287
with:
73-
xcode-version: '16.4'
88+
xcode-version: '26.2'
7489

7590
- name: Download Artifacts
7691
uses: actions/download-artifact@v4

CZiti.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,6 +1048,7 @@
10481048
ENABLE_STRICT_OBJC_MSGSEND = YES;
10491049
ENABLE_TESTABILITY = YES;
10501050
GCC_NO_COMMON_BLOCKS = YES;
1051+
"GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = TLSUV_HTTP;
10511052
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
10521053
GCC_WARN_ABOUT_RETURN_TYPE = YES;
10531054
GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -1106,6 +1107,7 @@
11061107
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
11071108
ENABLE_STRICT_OBJC_MSGSEND = YES;
11081109
GCC_NO_COMMON_BLOCKS = YES;
1110+
"GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = TLSUV_HTTP;
11091111
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
11101112
GCC_WARN_ABOUT_RETURN_TYPE = YES;
11111113
GCC_WARN_UNDECLARED_SELECTOR = YES;

lib/Ziti.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,13 +466,13 @@ import CZitiPrivate
466466
var zitiCfg = ziti_config(
467467
controller_url: ctrlPtr,
468468
controllers: ctrls,
469-
id: ziti_id_cfg(cert: certPEMPtr, key: privKeyPEMPtr, ca: caPEMPtr, oidc: nil),
469+
id: ziti_id_cfg(cert: certPEMPtr, key: privKeyPEMPtr, ca: caPEMPtr),
470470
cfg_source: nil)
471471

472472
log.debug("configuring ziti-sdk-c with:\n" +
473473
" id: \(id.id)\n" +
474474
" ztAPIs: \(id.ztAPIs ?? [])\n" +
475-
" cert: \(certPEM)\n" +
475+
" cert: \(certPEM ?? "")\n" +
476476
" ca: \(id.ca ?? "none")")
477477

478478
var zitiStatus = ziti_context_init(&self.ztx, &zitiCfg)

lib/ZitiEnroller.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ import CZitiPrivate
188188
cb(nil, nil, zErr)
189189
return
190190
}
191-
let (data, response, error) = URLSession.shared.syncRequest(with: ctrlUrl)
191+
let (_, _, error) = URLSession.shared.syncRequest(with: ctrlUrl)
192192
if let error = error {
193193
let zErr = ZitiError("connection to \(url) failed: \(error.localizedDescription)")
194194
log.error(String(describing: zErr), function:"enroll()")

lib/ZitiError.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ limitations under the License.
1616
import Foundation
1717

1818
/// Class used for passing information about error conditions encountered while using Ziti
19-
public class ZitiError : NSError {
19+
public class ZitiError : NSError, @unchecked Sendable {
2020
/// Initialize a ZitiError instance
2121
/// - Parameters:
2222
/// - desc: error description

0 commit comments

Comments
 (0)