From bcea93753bf2ecf9bbacb73c82d7b2d20ee1f104 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Tue, 14 Apr 2026 01:16:37 +0000 Subject: [PATCH] fix(opsserver): align certificate status handling with the updated smartproxy response format --- changelog.md | 7 +++++++ package.json | 4 ++-- pnpm-lock.yaml | 10 +++++----- ts/00_commitinfo_data.ts | 2 +- ts/opsserver/handlers/certificate.handler.ts | 9 ++++----- ts_web/00_commitinfo_data.ts | 2 +- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/changelog.md b/changelog.md index fb0e96c..4221b30 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,12 @@ # Changelog +## 2026-04-14 - 13.17.8 - fix(opsserver) +align certificate status handling with the updated smartproxy response format + +- update opsserver certificate lookup to read expiresAt, source, and isValid from smartproxy responses +- bump @push.rocks/smartproxy to ^27.7.3 +- enable verbose output for the test script + ## 2026-04-14 - 13.17.7 - fix(repo) no changes to commit diff --git a/package.json b/package.json index 07d8e3f..7dd28f1 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "author": "Task Venture Capital GmbH", "license": "MIT", "scripts": { - "test": "(tstest test/ --logfile --timeout 60)", + "test": "(tstest test/ --verbose --logfile --timeout 60)", "start": "(node ./cli.js)", "startTs": "(node cli.ts.js)", "build": "(tsbuild tsfolders --allowimplicitany && npm run bundle)", @@ -54,7 +54,7 @@ "@push.rocks/smartnetwork": "^4.6.0", "@push.rocks/smartpath": "^6.0.0", "@push.rocks/smartpromise": "^4.2.3", - "@push.rocks/smartproxy": "^27.7.0", + "@push.rocks/smartproxy": "^27.7.3", "@push.rocks/smartradius": "^1.1.1", "@push.rocks/smartrequest": "^5.0.1", "@push.rocks/smartrx": "^3.0.10", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2add49d..ce93ec7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -81,8 +81,8 @@ importers: specifier: ^4.2.3 version: 4.2.3 '@push.rocks/smartproxy': - specifier: ^27.7.0 - version: 27.7.0 + specifier: ^27.7.3 + version: 27.7.3 '@push.rocks/smartradius': specifier: ^1.1.1 version: 1.1.1 @@ -1284,8 +1284,8 @@ packages: '@push.rocks/smartpromise@4.2.3': resolution: {integrity: sha512-Ycg/TJR+tMt+S3wSFurOpEoW6nXv12QBtKXgBcjMZ4RsdO28geN46U09osPn9N9WuwQy1PkmTV5J/V4F9U8qEw==} - '@push.rocks/smartproxy@27.7.0': - resolution: {integrity: sha512-0u8HF5ocQ2xmfCN1FWyulGTddZ4ZkWaip1j0alT8Bc/LdIYerjKtNJCU4N2wMk/Zz0Wl5UQOmBm4qIWmgRiEcg==} + '@push.rocks/smartproxy@27.7.3': + resolution: {integrity: sha512-1NER+2nM2GWzrMB1xoCzkV9in8a1gWNwOimgE/f2kPYnhy5DsA2XX/KiLGJ0ge3cpCVgoK1nNe3byXQHWvmPbA==} '@push.rocks/smartpuppeteer@2.0.5': resolution: {integrity: sha512-yK/qSeWVHIGWRp3c8S5tfdGP6WCKllZC4DR8d8CQlEjszOSBmHtlTdyyqOMBZ/BA4kd+eU5f3A1r4K2tGYty1g==} @@ -6506,7 +6506,7 @@ snapshots: '@push.rocks/smartpromise@4.2.3': {} - '@push.rocks/smartproxy@27.7.0': + '@push.rocks/smartproxy@27.7.3': dependencies: '@push.rocks/smartcrypto': 2.0.4 '@push.rocks/smartlog': 3.2.2 diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 4a4d12a..e77a717 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/dcrouter', - version: '13.17.7', + version: '13.17.8', description: 'A multifaceted routing service handling mail and SMS delivery functions.' } diff --git a/ts/opsserver/handlers/certificate.handler.ts b/ts/opsserver/handlers/certificate.handler.ts index 04e8d01..5232bda 100644 --- a/ts/opsserver/handlers/certificate.handler.ts +++ b/ts/opsserver/handlers/certificate.handler.ts @@ -198,12 +198,11 @@ export class CertificateHandler { try { const rustStatus = await smartProxy.getCertificateStatus(info.routeNames[0]); if (rustStatus) { - if (rustStatus.expiryDate) expiryDate = rustStatus.expiryDate; - if (rustStatus.issuer) issuer = rustStatus.issuer; - if (rustStatus.issuedAt) issuedAt = rustStatus.issuedAt; - if (rustStatus.status === 'valid' || rustStatus.status === 'expired') { - status = rustStatus.status; + if (rustStatus.expiresAt > 0) { + expiryDate = new Date(rustStatus.expiresAt).toISOString(); } + if (rustStatus.source) issuer = rustStatus.source; + status = rustStatus.isValid ? 'valid' : 'expired'; } } catch { // Rust bridge may not support this command yet — ignore diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index 4a4d12a..e77a717 100644 --- a/ts_web/00_commitinfo_data.ts +++ b/ts_web/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/dcrouter', - version: '13.17.7', + version: '13.17.8', description: 'A multifaceted routing service handling mail and SMS delivery functions.' }