## Summary - 新增 RSA 和 ECDSA 私钥认证支持,扩展 SSH 密钥兼容性 - 前端新增密钥文件上传功能,提升用户体验 - 建立完整的单元测试套件,提高代码质量保障 - 发布 v1.0.4 正式版本 ## Changes ### Added - **RSA 私钥认证**:支持 `rsa-sha2-256` 签名算法,兼容 2048/4096 位密钥 - **ECDSA 私钥认证**:支持 P-256、P-384、P-521 三种曲线 - **密钥文件上传**:支持 `.pem`、`.key`、`.txt`、`.pub` 格式文件直接上传 - **单元测试套件**:基于 Vitest 框架,包含 36 个测试用例 ### Fixed - 修复 RSA PKCS#8 结构中 CRT 参数使用占位符的问题 - 修复 ECDSA PKCS#8 结构符合 RFC 5915/5208 标准 ### Changed - 移除 `--passWithNoTests` 测试配置选项 - 更新版本号到 1.0.4 ## Technical Details - RSA 使用 Web Crypto API 的 `RSASSA-PKCS1-v1_5` 算法 - ECDSA 签名自动转换 DER 格式为 SSH 格式 - 实现大整数运算(减法、取模)用于 CRT 参数计算 - 前端使用 `FileReader API` 读取密钥文件 --------- Co-authored-by: TanXin <tanxin@example.com>
18 lines
410 B
TypeScript
18 lines
410 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: 'node',
|
|
include: ['tests/**/*.test.ts'],
|
|
exclude: ['node_modules', 'dist', 'frontend'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html'],
|
|
include: ['src/**/*.ts'],
|
|
exclude: ['src/worker/html.ts'],
|
|
},
|
|
testTimeout: 10000,
|
|
},
|
|
});
|