confium 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/Cargo.lock +239 -101
- data/ext/confium_native/Cargo.toml +2 -1
- data/ext/confium_native/src/lib.rs +2 -0
- data/ext/confium_native/src/pki.rs +7 -5
- data/ext/confium_native/src/store.rs +108 -0
- data/lib/confium/errors.rb +11 -2
- data/lib/confium/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 922db9bc620ddee90ba36a32d0c01d7a50dc13d685af98651288d7c913333af6
|
|
4
|
+
data.tar.gz: a46a79237e9b643fd31ee0e1f9fcfdf0df3a1d3f846f7f66bf22273394029944
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 84d6d5f4c7822d46d7f96fbc0d25800de7fd6d9548542c4deb8f219ec291750d932d079211b9a2e6671aa998cb340b77a26bf1678aa6a7b94e33ecebf4f32fc0
|
|
7
|
+
data.tar.gz: 1f95d17bf74f58728e280ca052519a2538afd1ec530538fc1aa7ebb6bdce2e60dcf7bd4b9c170db572634a23622b5b228d810548e4c89bde2c624a02fc6beb6c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.6.2] — 2026-08-26
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- `Confium::Store::Keystore` — Ruby surface for the store layer and
|
|
8
|
+
the sign-with-handle contract: `.new(backend, options)`,
|
|
9
|
+
`#sign(key_id, algorithm, message)` returning binary signature
|
|
10
|
+
bytes, plus `Confium::Store.backends`. Local backends raise a
|
|
11
|
+
typed `Confium::Error` for `#sign`; remote-holding backends (cloud
|
|
12
|
+
KMS) come via source builds that opt into their cargo features
|
|
13
|
+
(confium-store 0.5.8). `Confium::Error` now also accepts the
|
|
14
|
+
positional details-Hash form every typed subclass already accepts,
|
|
15
|
+
so native-constructed base errors carry `details` too.
|
|
16
|
+
|
|
17
|
+
## [0.6.1] — 2026-08-25
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- `Confium::PKI::Certificate.from_der` / `Csr.from_der` now report
|
|
22
|
+
the exact byte offset where truncated DER decoding failed
|
|
23
|
+
(`Confium::ParseError#offset` was always nil for certificate DER —
|
|
24
|
+
the number now crosses from the `der` decoder through
|
|
25
|
+
confium-pki). Requires and bumps confium-pki to 0.5.
|
|
26
|
+
|
|
3
27
|
## [0.6.0] — 2026-08-25
|
|
4
28
|
|
|
5
29
|
### Removed
|
data/Cargo.lock
CHANGED
|
@@ -14,7 +14,7 @@ version = "0.5.2"
|
|
|
14
14
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
15
|
checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
|
|
16
16
|
dependencies = [
|
|
17
|
-
"crypto-common",
|
|
17
|
+
"crypto-common 0.1.7",
|
|
18
18
|
"generic-array",
|
|
19
19
|
]
|
|
20
20
|
|
|
@@ -26,7 +26,7 @@ checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
|
|
|
26
26
|
dependencies = [
|
|
27
27
|
"cfg-if",
|
|
28
28
|
"cipher",
|
|
29
|
-
"cpufeatures",
|
|
29
|
+
"cpufeatures 0.2.17",
|
|
30
30
|
]
|
|
31
31
|
|
|
32
32
|
[[package]]
|
|
@@ -138,6 +138,15 @@ dependencies = [
|
|
|
138
138
|
"generic-array",
|
|
139
139
|
]
|
|
140
140
|
|
|
141
|
+
[[package]]
|
|
142
|
+
name = "block-buffer"
|
|
143
|
+
version = "0.12.1"
|
|
144
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
145
|
+
checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa"
|
|
146
|
+
dependencies = [
|
|
147
|
+
"hybrid-array",
|
|
148
|
+
]
|
|
149
|
+
|
|
141
150
|
[[package]]
|
|
142
151
|
name = "botan-src"
|
|
143
152
|
version = "0.31200.0"
|
|
@@ -145,7 +154,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
145
154
|
checksum = "dce062ff9328d757ea205177cab939e6ce2aeb7a64bb559263fbe9251c5b1f5b"
|
|
146
155
|
dependencies = [
|
|
147
156
|
"lzma-rs",
|
|
148
|
-
"sha2",
|
|
157
|
+
"sha2 0.10.9",
|
|
149
158
|
"tar",
|
|
150
159
|
]
|
|
151
160
|
|
|
@@ -212,7 +221,7 @@ version = "0.4.4"
|
|
|
212
221
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
213
222
|
checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
|
|
214
223
|
dependencies = [
|
|
215
|
-
"crypto-common",
|
|
224
|
+
"crypto-common 0.1.7",
|
|
216
225
|
"inout",
|
|
217
226
|
]
|
|
218
227
|
|
|
@@ -254,7 +263,7 @@ checksum = "7edc7e251d9a65d428e223ff795986e9983eff5430cc1029ddacc4451f26299a"
|
|
|
254
263
|
dependencies = [
|
|
255
264
|
"serde",
|
|
256
265
|
"serde_json",
|
|
257
|
-
"thiserror",
|
|
266
|
+
"thiserror 1.0.69",
|
|
258
267
|
]
|
|
259
268
|
|
|
260
269
|
[[package]]
|
|
@@ -265,11 +274,11 @@ checksum = "317ed25adf9a1aad00722a215c3397dea694fcdf90730542e82acdea559644aa"
|
|
|
265
274
|
dependencies = [
|
|
266
275
|
"ed25519-dalek",
|
|
267
276
|
"p256",
|
|
268
|
-
"rand_core",
|
|
277
|
+
"rand_core 0.6.4",
|
|
269
278
|
"serde",
|
|
270
279
|
"serde_json",
|
|
271
|
-
"sha2",
|
|
272
|
-
"thiserror",
|
|
280
|
+
"sha2 0.10.9",
|
|
281
|
+
"thiserror 1.0.69",
|
|
273
282
|
]
|
|
274
283
|
|
|
275
284
|
[[package]]
|
|
@@ -281,7 +290,7 @@ dependencies = [
|
|
|
281
290
|
"chrono",
|
|
282
291
|
"confium-api",
|
|
283
292
|
"confium-net",
|
|
284
|
-
"confium-store",
|
|
293
|
+
"confium-store 0.3.0",
|
|
285
294
|
"confium-tc-core",
|
|
286
295
|
"data-encoding",
|
|
287
296
|
"hex",
|
|
@@ -290,12 +299,12 @@ dependencies = [
|
|
|
290
299
|
"num-bigint",
|
|
291
300
|
"num-traits",
|
|
292
301
|
"p256",
|
|
293
|
-
"rand_core",
|
|
302
|
+
"rand_core 0.6.4",
|
|
294
303
|
"serde",
|
|
295
304
|
"serde_json",
|
|
296
|
-
"sha2",
|
|
305
|
+
"sha2 0.10.9",
|
|
297
306
|
"snafu 0.8.9",
|
|
298
|
-
"thiserror",
|
|
307
|
+
"thiserror 1.0.69",
|
|
299
308
|
"tracing",
|
|
300
309
|
"zeroize",
|
|
301
310
|
]
|
|
@@ -327,12 +336,12 @@ dependencies = [
|
|
|
327
336
|
"num-traits",
|
|
328
337
|
"p256",
|
|
329
338
|
"rand",
|
|
330
|
-
"rand_core",
|
|
339
|
+
"rand_core 0.6.4",
|
|
331
340
|
"serde",
|
|
332
341
|
"serde_json",
|
|
333
|
-
"sha2",
|
|
342
|
+
"sha2 0.10.9",
|
|
334
343
|
"subtle",
|
|
335
|
-
"thiserror",
|
|
344
|
+
"thiserror 1.0.69",
|
|
336
345
|
]
|
|
337
346
|
|
|
338
347
|
[[package]]
|
|
@@ -346,11 +355,11 @@ dependencies = [
|
|
|
346
355
|
"num-bigint",
|
|
347
356
|
"num-traits",
|
|
348
357
|
"p256",
|
|
349
|
-
"rand_core",
|
|
358
|
+
"rand_core 0.6.4",
|
|
350
359
|
"serde",
|
|
351
360
|
"serde_json",
|
|
352
|
-
"sha2",
|
|
353
|
-
"thiserror",
|
|
361
|
+
"sha2 0.10.9",
|
|
362
|
+
"thiserror 1.0.69",
|
|
354
363
|
]
|
|
355
364
|
|
|
356
365
|
[[package]]
|
|
@@ -364,7 +373,7 @@ dependencies = [
|
|
|
364
373
|
"serde",
|
|
365
374
|
"serde_json",
|
|
366
375
|
"snafu 0.8.9",
|
|
367
|
-
"thiserror",
|
|
376
|
+
"thiserror 1.0.69",
|
|
368
377
|
"toml",
|
|
369
378
|
"url",
|
|
370
379
|
]
|
|
@@ -401,27 +410,25 @@ dependencies = [
|
|
|
401
410
|
"chrono",
|
|
402
411
|
"hex",
|
|
403
412
|
"hmac",
|
|
404
|
-
"rand_core",
|
|
413
|
+
"rand_core 0.6.4",
|
|
405
414
|
"serde",
|
|
406
415
|
"serde_json",
|
|
407
|
-
"sha2",
|
|
416
|
+
"sha2 0.10.9",
|
|
408
417
|
]
|
|
409
418
|
|
|
410
419
|
[[package]]
|
|
411
420
|
name = "confium-pki"
|
|
412
|
-
version = "0.
|
|
421
|
+
version = "0.5.6"
|
|
413
422
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
414
|
-
checksum = "
|
|
423
|
+
checksum = "22882ad7e4b3d84eed93c6dee7f8fdc24abf81fb0305fb0737c85875b83c6376"
|
|
415
424
|
dependencies = [
|
|
416
425
|
"chrono",
|
|
417
426
|
"data-encoding",
|
|
418
|
-
"der",
|
|
427
|
+
"der 0.8.1",
|
|
419
428
|
"serde",
|
|
420
429
|
"serde_json",
|
|
421
|
-
"sha2",
|
|
422
|
-
"
|
|
423
|
-
"spki",
|
|
424
|
-
"thiserror",
|
|
430
|
+
"sha2 0.11.0",
|
|
431
|
+
"thiserror 2.0.20",
|
|
425
432
|
"x509-cert",
|
|
426
433
|
]
|
|
427
434
|
|
|
@@ -438,11 +445,11 @@ dependencies = [
|
|
|
438
445
|
"num-traits",
|
|
439
446
|
"p256",
|
|
440
447
|
"rand",
|
|
441
|
-
"rand_core",
|
|
448
|
+
"rand_core 0.6.4",
|
|
442
449
|
"serde",
|
|
443
450
|
"serde_json",
|
|
444
|
-
"sha2",
|
|
445
|
-
"thiserror",
|
|
451
|
+
"sha2 0.10.9",
|
|
452
|
+
"thiserror 1.0.69",
|
|
446
453
|
]
|
|
447
454
|
|
|
448
455
|
[[package]]
|
|
@@ -456,6 +463,16 @@ dependencies = [
|
|
|
456
463
|
"snafu 0.8.9",
|
|
457
464
|
]
|
|
458
465
|
|
|
466
|
+
[[package]]
|
|
467
|
+
name = "confium-store"
|
|
468
|
+
version = "0.5.8"
|
|
469
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
470
|
+
checksum = "5559e7f26bcf9f6dd3a76cf7eb0cf0684966c504cf662efef14f69ade8103e26"
|
|
471
|
+
dependencies = [
|
|
472
|
+
"inventory",
|
|
473
|
+
"snafu 0.9.2",
|
|
474
|
+
]
|
|
475
|
+
|
|
459
476
|
[[package]]
|
|
460
477
|
name = "confium-tc"
|
|
461
478
|
version = "0.3.1"
|
|
@@ -466,7 +483,7 @@ dependencies = [
|
|
|
466
483
|
"confium-api",
|
|
467
484
|
"confium-coordinator",
|
|
468
485
|
"confium-net",
|
|
469
|
-
"confium-store",
|
|
486
|
+
"confium-store 0.3.0",
|
|
470
487
|
"confium-tc-keys",
|
|
471
488
|
"data-encoding",
|
|
472
489
|
"hex",
|
|
@@ -478,13 +495,13 @@ dependencies = [
|
|
|
478
495
|
"num-traits",
|
|
479
496
|
"p256",
|
|
480
497
|
"rand",
|
|
481
|
-
"rand_core",
|
|
498
|
+
"rand_core 0.6.4",
|
|
482
499
|
"serde",
|
|
483
500
|
"serde_json",
|
|
484
|
-
"sha2",
|
|
501
|
+
"sha2 0.10.9",
|
|
485
502
|
"snafu 0.8.9",
|
|
486
503
|
"subtle",
|
|
487
|
-
"thiserror",
|
|
504
|
+
"thiserror 1.0.69",
|
|
488
505
|
"tracing",
|
|
489
506
|
"zeroize",
|
|
490
507
|
]
|
|
@@ -506,7 +523,7 @@ dependencies = [
|
|
|
506
523
|
"num-traits",
|
|
507
524
|
"p256",
|
|
508
525
|
"rand",
|
|
509
|
-
"sha2",
|
|
526
|
+
"sha2 0.10.9",
|
|
510
527
|
"snafu 0.8.9",
|
|
511
528
|
"zeroize",
|
|
512
529
|
]
|
|
@@ -520,19 +537,19 @@ dependencies = [
|
|
|
520
537
|
"chrono",
|
|
521
538
|
"confium-api",
|
|
522
539
|
"confium-net",
|
|
523
|
-
"confium-store",
|
|
540
|
+
"confium-store 0.3.0",
|
|
524
541
|
"data-encoding",
|
|
525
542
|
"hex",
|
|
526
543
|
"hmac",
|
|
527
544
|
"inventory",
|
|
528
545
|
"p256",
|
|
529
|
-
"rand_core",
|
|
546
|
+
"rand_core 0.6.4",
|
|
530
547
|
"serde",
|
|
531
548
|
"serde_json",
|
|
532
|
-
"sha2",
|
|
549
|
+
"sha2 0.10.9",
|
|
533
550
|
"snafu 0.8.9",
|
|
534
551
|
"subtle",
|
|
535
|
-
"thiserror",
|
|
552
|
+
"thiserror 1.0.69",
|
|
536
553
|
"tracing",
|
|
537
554
|
"zeroize",
|
|
538
555
|
]
|
|
@@ -546,8 +563,8 @@ dependencies = [
|
|
|
546
563
|
"elliptic-curve",
|
|
547
564
|
"p256",
|
|
548
565
|
"serde",
|
|
549
|
-
"sha2",
|
|
550
|
-
"thiserror",
|
|
566
|
+
"sha2 0.10.9",
|
|
567
|
+
"thiserror 1.0.69",
|
|
551
568
|
]
|
|
552
569
|
|
|
553
570
|
[[package]]
|
|
@@ -559,10 +576,10 @@ dependencies = [
|
|
|
559
576
|
"elliptic-curve",
|
|
560
577
|
"hex",
|
|
561
578
|
"p256",
|
|
562
|
-
"rand_core",
|
|
579
|
+
"rand_core 0.6.4",
|
|
563
580
|
"serde",
|
|
564
|
-
"sha2",
|
|
565
|
-
"thiserror",
|
|
581
|
+
"sha2 0.10.9",
|
|
582
|
+
"thiserror 1.0.69",
|
|
566
583
|
]
|
|
567
584
|
|
|
568
585
|
[[package]]
|
|
@@ -578,7 +595,7 @@ dependencies = [
|
|
|
578
595
|
"hex",
|
|
579
596
|
"inventory",
|
|
580
597
|
"p256",
|
|
581
|
-
"sha2",
|
|
598
|
+
"sha2 0.10.9",
|
|
582
599
|
"snafu 0.8.9",
|
|
583
600
|
"zeroize",
|
|
584
601
|
]
|
|
@@ -594,12 +611,12 @@ dependencies = [
|
|
|
594
611
|
"hex",
|
|
595
612
|
"hmac",
|
|
596
613
|
"p256",
|
|
597
|
-
"rand_core",
|
|
614
|
+
"rand_core 0.6.4",
|
|
598
615
|
"serde",
|
|
599
616
|
"serde_json",
|
|
600
|
-
"sha2",
|
|
617
|
+
"sha2 0.10.9",
|
|
601
618
|
"subtle",
|
|
602
|
-
"thiserror",
|
|
619
|
+
"thiserror 1.0.69",
|
|
603
620
|
]
|
|
604
621
|
|
|
605
622
|
[[package]]
|
|
@@ -612,9 +629,9 @@ dependencies = [
|
|
|
612
629
|
"data-encoding",
|
|
613
630
|
"serde",
|
|
614
631
|
"serde_json",
|
|
615
|
-
"sha2",
|
|
632
|
+
"sha2 0.10.9",
|
|
616
633
|
"snafu 0.8.9",
|
|
617
|
-
"thiserror",
|
|
634
|
+
"thiserror 1.0.69",
|
|
618
635
|
]
|
|
619
636
|
|
|
620
637
|
[[package]]
|
|
@@ -631,6 +648,7 @@ dependencies = [
|
|
|
631
648
|
"confium-observability",
|
|
632
649
|
"confium-pki",
|
|
633
650
|
"confium-privacy",
|
|
651
|
+
"confium-store 0.5.8",
|
|
634
652
|
"confium-tc",
|
|
635
653
|
"confium-tc-cmp20",
|
|
636
654
|
"confium-tc-core",
|
|
@@ -642,11 +660,11 @@ dependencies = [
|
|
|
642
660
|
"hex",
|
|
643
661
|
"magnus",
|
|
644
662
|
"p256",
|
|
645
|
-
"rand_core",
|
|
663
|
+
"rand_core 0.6.4",
|
|
646
664
|
"rb-sys",
|
|
647
665
|
"rnp-rs",
|
|
648
666
|
"serde_json",
|
|
649
|
-
"sha2",
|
|
667
|
+
"sha2 0.10.9",
|
|
650
668
|
"subtle",
|
|
651
669
|
]
|
|
652
670
|
|
|
@@ -656,6 +674,12 @@ version = "0.9.6"
|
|
|
656
674
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
657
675
|
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
|
|
658
676
|
|
|
677
|
+
[[package]]
|
|
678
|
+
name = "const-oid"
|
|
679
|
+
version = "0.10.2"
|
|
680
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
681
|
+
checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c"
|
|
682
|
+
|
|
659
683
|
[[package]]
|
|
660
684
|
name = "core-foundation-sys"
|
|
661
685
|
version = "0.8.7"
|
|
@@ -671,6 +695,15 @@ dependencies = [
|
|
|
671
695
|
"libc",
|
|
672
696
|
]
|
|
673
697
|
|
|
698
|
+
[[package]]
|
|
699
|
+
name = "cpufeatures"
|
|
700
|
+
version = "0.3.0"
|
|
701
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
702
|
+
checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"
|
|
703
|
+
dependencies = [
|
|
704
|
+
"libc",
|
|
705
|
+
]
|
|
706
|
+
|
|
674
707
|
[[package]]
|
|
675
708
|
name = "crc"
|
|
676
709
|
version = "3.4.0"
|
|
@@ -702,7 +735,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
702
735
|
checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
|
|
703
736
|
dependencies = [
|
|
704
737
|
"generic-array",
|
|
705
|
-
"rand_core",
|
|
738
|
+
"rand_core 0.6.4",
|
|
706
739
|
"subtle",
|
|
707
740
|
"zeroize",
|
|
708
741
|
]
|
|
@@ -714,10 +747,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
714
747
|
checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
|
|
715
748
|
dependencies = [
|
|
716
749
|
"generic-array",
|
|
717
|
-
"rand_core",
|
|
750
|
+
"rand_core 0.6.4",
|
|
718
751
|
"typenum",
|
|
719
752
|
]
|
|
720
753
|
|
|
754
|
+
[[package]]
|
|
755
|
+
name = "crypto-common"
|
|
756
|
+
version = "0.2.2"
|
|
757
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
758
|
+
checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453"
|
|
759
|
+
dependencies = [
|
|
760
|
+
"hybrid-array",
|
|
761
|
+
]
|
|
762
|
+
|
|
721
763
|
[[package]]
|
|
722
764
|
name = "ctr"
|
|
723
765
|
version = "0.9.2"
|
|
@@ -734,9 +776,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
734
776
|
checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
|
|
735
777
|
dependencies = [
|
|
736
778
|
"cfg-if",
|
|
737
|
-
"cpufeatures",
|
|
779
|
+
"cpufeatures 0.2.17",
|
|
738
780
|
"curve25519-dalek-derive",
|
|
739
|
-
"digest",
|
|
781
|
+
"digest 0.10.7",
|
|
740
782
|
"fiat-crypto",
|
|
741
783
|
"rustc_version",
|
|
742
784
|
"subtle",
|
|
@@ -766,18 +808,29 @@ version = "0.7.10"
|
|
|
766
808
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
767
809
|
checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb"
|
|
768
810
|
dependencies = [
|
|
769
|
-
"const-oid",
|
|
811
|
+
"const-oid 0.9.6",
|
|
812
|
+
"pem-rfc7468 0.7.0",
|
|
813
|
+
"zeroize",
|
|
814
|
+
]
|
|
815
|
+
|
|
816
|
+
[[package]]
|
|
817
|
+
name = "der"
|
|
818
|
+
version = "0.8.1"
|
|
819
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
820
|
+
checksum = "a69dedd701da44b0536442edf09c81a64b0ab97a7a4a5e3d1971f00027cbc63d"
|
|
821
|
+
dependencies = [
|
|
822
|
+
"const-oid 0.10.2",
|
|
770
823
|
"der_derive",
|
|
771
824
|
"flagset",
|
|
772
|
-
"pem-rfc7468",
|
|
825
|
+
"pem-rfc7468 1.0.0",
|
|
773
826
|
"zeroize",
|
|
774
827
|
]
|
|
775
828
|
|
|
776
829
|
[[package]]
|
|
777
830
|
name = "der_derive"
|
|
778
|
-
version = "0.
|
|
831
|
+
version = "0.8.0"
|
|
779
832
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
780
|
-
checksum = "
|
|
833
|
+
checksum = "59600e2c2d636fde9b65e99cc6445ac770c63d3628195ff39932b8d6d7409903"
|
|
781
834
|
dependencies = [
|
|
782
835
|
"proc-macro2",
|
|
783
836
|
"quote",
|
|
@@ -790,12 +843,23 @@ version = "0.10.7"
|
|
|
790
843
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
791
844
|
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
|
792
845
|
dependencies = [
|
|
793
|
-
"block-buffer",
|
|
794
|
-
"const-oid",
|
|
795
|
-
"crypto-common",
|
|
846
|
+
"block-buffer 0.10.4",
|
|
847
|
+
"const-oid 0.9.6",
|
|
848
|
+
"crypto-common 0.1.7",
|
|
796
849
|
"subtle",
|
|
797
850
|
]
|
|
798
851
|
|
|
852
|
+
[[package]]
|
|
853
|
+
name = "digest"
|
|
854
|
+
version = "0.11.3"
|
|
855
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
856
|
+
checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2"
|
|
857
|
+
dependencies = [
|
|
858
|
+
"block-buffer 0.12.1",
|
|
859
|
+
"const-oid 0.10.2",
|
|
860
|
+
"crypto-common 0.2.2",
|
|
861
|
+
]
|
|
862
|
+
|
|
799
863
|
[[package]]
|
|
800
864
|
name = "displaydoc"
|
|
801
865
|
version = "0.2.6"
|
|
@@ -813,13 +877,13 @@ version = "0.16.9"
|
|
|
813
877
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
814
878
|
checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca"
|
|
815
879
|
dependencies = [
|
|
816
|
-
"der",
|
|
817
|
-
"digest",
|
|
880
|
+
"der 0.7.10",
|
|
881
|
+
"digest 0.10.7",
|
|
818
882
|
"elliptic-curve",
|
|
819
883
|
"rfc6979",
|
|
820
884
|
"serdect",
|
|
821
|
-
"signature",
|
|
822
|
-
"spki",
|
|
885
|
+
"signature 2.2.0",
|
|
886
|
+
"spki 0.7.3",
|
|
823
887
|
]
|
|
824
888
|
|
|
825
889
|
[[package]]
|
|
@@ -829,7 +893,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
829
893
|
checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53"
|
|
830
894
|
dependencies = [
|
|
831
895
|
"pkcs8",
|
|
832
|
-
"signature",
|
|
896
|
+
"signature 2.2.0",
|
|
833
897
|
]
|
|
834
898
|
|
|
835
899
|
[[package]]
|
|
@@ -840,9 +904,9 @@ checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9"
|
|
|
840
904
|
dependencies = [
|
|
841
905
|
"curve25519-dalek",
|
|
842
906
|
"ed25519",
|
|
843
|
-
"rand_core",
|
|
907
|
+
"rand_core 0.6.4",
|
|
844
908
|
"serde",
|
|
845
|
-
"sha2",
|
|
909
|
+
"sha2 0.10.9",
|
|
846
910
|
"subtle",
|
|
847
911
|
"zeroize",
|
|
848
912
|
]
|
|
@@ -861,13 +925,13 @@ checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47"
|
|
|
861
925
|
dependencies = [
|
|
862
926
|
"base16ct",
|
|
863
927
|
"crypto-bigint",
|
|
864
|
-
"digest",
|
|
928
|
+
"digest 0.10.7",
|
|
865
929
|
"ff",
|
|
866
930
|
"generic-array",
|
|
867
931
|
"group",
|
|
868
|
-
"pem-rfc7468",
|
|
932
|
+
"pem-rfc7468 0.7.0",
|
|
869
933
|
"pkcs8",
|
|
870
|
-
"rand_core",
|
|
934
|
+
"rand_core 0.6.4",
|
|
871
935
|
"sec1",
|
|
872
936
|
"serdect",
|
|
873
937
|
"subtle",
|
|
@@ -896,7 +960,7 @@ version = "0.13.1"
|
|
|
896
960
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
897
961
|
checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393"
|
|
898
962
|
dependencies = [
|
|
899
|
-
"rand_core",
|
|
963
|
+
"rand_core 0.6.4",
|
|
900
964
|
"subtle",
|
|
901
965
|
]
|
|
902
966
|
|
|
@@ -1028,7 +1092,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
1028
1092
|
checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63"
|
|
1029
1093
|
dependencies = [
|
|
1030
1094
|
"ff",
|
|
1031
|
-
"rand_core",
|
|
1095
|
+
"rand_core 0.6.4",
|
|
1032
1096
|
"subtle",
|
|
1033
1097
|
]
|
|
1034
1098
|
|
|
@@ -1067,7 +1131,7 @@ version = "0.12.1"
|
|
|
1067
1131
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1068
1132
|
checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
|
|
1069
1133
|
dependencies = [
|
|
1070
|
-
"digest",
|
|
1134
|
+
"digest 0.10.7",
|
|
1071
1135
|
]
|
|
1072
1136
|
|
|
1073
1137
|
[[package]]
|
|
@@ -1086,6 +1150,15 @@ version = "1.10.1"
|
|
|
1086
1150
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1087
1151
|
checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
|
|
1088
1152
|
|
|
1153
|
+
[[package]]
|
|
1154
|
+
name = "hybrid-array"
|
|
1155
|
+
version = "0.4.14"
|
|
1156
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1157
|
+
checksum = "707114b52a152fa7bdb290cd7cd5912d9467273b6d74e21b8d81aca1f8533f6b"
|
|
1158
|
+
dependencies = [
|
|
1159
|
+
"typenum",
|
|
1160
|
+
]
|
|
1161
|
+
|
|
1089
1162
|
[[package]]
|
|
1090
1163
|
name = "iana-time-zone"
|
|
1091
1164
|
version = "0.1.65"
|
|
@@ -1460,7 +1533,7 @@ dependencies = [
|
|
|
1460
1533
|
"elliptic-curve",
|
|
1461
1534
|
"primeorder",
|
|
1462
1535
|
"serdect",
|
|
1463
|
-
"sha2",
|
|
1536
|
+
"sha2 0.10.9",
|
|
1464
1537
|
]
|
|
1465
1538
|
|
|
1466
1539
|
[[package]]
|
|
@@ -1472,6 +1545,15 @@ dependencies = [
|
|
|
1472
1545
|
"base64ct",
|
|
1473
1546
|
]
|
|
1474
1547
|
|
|
1548
|
+
[[package]]
|
|
1549
|
+
name = "pem-rfc7468"
|
|
1550
|
+
version = "1.0.0"
|
|
1551
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1552
|
+
checksum = "a6305423e0e7738146434843d1694d621cce767262b2a86910beab705e4493d9"
|
|
1553
|
+
dependencies = [
|
|
1554
|
+
"base64ct",
|
|
1555
|
+
]
|
|
1556
|
+
|
|
1475
1557
|
[[package]]
|
|
1476
1558
|
name = "percent-encoding"
|
|
1477
1559
|
version = "2.3.2"
|
|
@@ -1490,8 +1572,8 @@ version = "0.10.2"
|
|
|
1490
1572
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1491
1573
|
checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
|
|
1492
1574
|
dependencies = [
|
|
1493
|
-
"der",
|
|
1494
|
-
"spki",
|
|
1575
|
+
"der 0.7.10",
|
|
1576
|
+
"spki 0.7.3",
|
|
1495
1577
|
]
|
|
1496
1578
|
|
|
1497
1579
|
[[package]]
|
|
@@ -1507,7 +1589,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
1507
1589
|
checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25"
|
|
1508
1590
|
dependencies = [
|
|
1509
1591
|
"cfg-if",
|
|
1510
|
-
"cpufeatures",
|
|
1592
|
+
"cpufeatures 0.2.17",
|
|
1511
1593
|
"opaque-debug",
|
|
1512
1594
|
"universal-hash",
|
|
1513
1595
|
]
|
|
@@ -1582,7 +1664,7 @@ checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a"
|
|
|
1582
1664
|
dependencies = [
|
|
1583
1665
|
"libc",
|
|
1584
1666
|
"rand_chacha",
|
|
1585
|
-
"rand_core",
|
|
1667
|
+
"rand_core 0.6.4",
|
|
1586
1668
|
]
|
|
1587
1669
|
|
|
1588
1670
|
[[package]]
|
|
@@ -1592,7 +1674,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
1592
1674
|
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
|
1593
1675
|
dependencies = [
|
|
1594
1676
|
"ppv-lite86",
|
|
1595
|
-
"rand_core",
|
|
1677
|
+
"rand_core 0.6.4",
|
|
1596
1678
|
]
|
|
1597
1679
|
|
|
1598
1680
|
[[package]]
|
|
@@ -1604,6 +1686,12 @@ dependencies = [
|
|
|
1604
1686
|
"getrandom",
|
|
1605
1687
|
]
|
|
1606
1688
|
|
|
1689
|
+
[[package]]
|
|
1690
|
+
name = "rand_core"
|
|
1691
|
+
version = "0.10.1"
|
|
1692
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1693
|
+
checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
|
|
1694
|
+
|
|
1607
1695
|
[[package]]
|
|
1608
1696
|
name = "rb-sys"
|
|
1609
1697
|
version = "0.9.128"
|
|
@@ -1788,7 +1876,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
1788
1876
|
checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc"
|
|
1789
1877
|
dependencies = [
|
|
1790
1878
|
"base16ct",
|
|
1791
|
-
"der",
|
|
1879
|
+
"der 0.7.10",
|
|
1792
1880
|
"generic-array",
|
|
1793
1881
|
"pkcs8",
|
|
1794
1882
|
"serdect",
|
|
@@ -1872,13 +1960,13 @@ dependencies = [
|
|
|
1872
1960
|
|
|
1873
1961
|
[[package]]
|
|
1874
1962
|
name = "sha1"
|
|
1875
|
-
version = "0.
|
|
1963
|
+
version = "0.11.0"
|
|
1876
1964
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1877
|
-
checksum = "
|
|
1965
|
+
checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214"
|
|
1878
1966
|
dependencies = [
|
|
1879
1967
|
"cfg-if",
|
|
1880
|
-
"cpufeatures",
|
|
1881
|
-
"digest",
|
|
1968
|
+
"cpufeatures 0.3.0",
|
|
1969
|
+
"digest 0.11.3",
|
|
1882
1970
|
]
|
|
1883
1971
|
|
|
1884
1972
|
[[package]]
|
|
@@ -1888,8 +1976,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
1888
1976
|
checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
|
|
1889
1977
|
dependencies = [
|
|
1890
1978
|
"cfg-if",
|
|
1891
|
-
"cpufeatures",
|
|
1892
|
-
"digest",
|
|
1979
|
+
"cpufeatures 0.2.17",
|
|
1980
|
+
"digest 0.10.7",
|
|
1981
|
+
]
|
|
1982
|
+
|
|
1983
|
+
[[package]]
|
|
1984
|
+
name = "sha2"
|
|
1985
|
+
version = "0.11.0"
|
|
1986
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1987
|
+
checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4"
|
|
1988
|
+
dependencies = [
|
|
1989
|
+
"cfg-if",
|
|
1990
|
+
"cpufeatures 0.3.0",
|
|
1991
|
+
"digest 0.11.3",
|
|
1893
1992
|
]
|
|
1894
1993
|
|
|
1895
1994
|
[[package]]
|
|
@@ -1916,8 +2015,17 @@ version = "2.2.0"
|
|
|
1916
2015
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1917
2016
|
checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
|
|
1918
2017
|
dependencies = [
|
|
1919
|
-
"digest",
|
|
1920
|
-
"rand_core",
|
|
2018
|
+
"digest 0.10.7",
|
|
2019
|
+
"rand_core 0.6.4",
|
|
2020
|
+
]
|
|
2021
|
+
|
|
2022
|
+
[[package]]
|
|
2023
|
+
name = "signature"
|
|
2024
|
+
version = "3.0.0"
|
|
2025
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2026
|
+
checksum = "28d567dcbaf0049cb8ac2608a76cd95ff9e4412e1899d389ee400918ca7537f5"
|
|
2027
|
+
dependencies = [
|
|
2028
|
+
"rand_core 0.10.1",
|
|
1921
2029
|
]
|
|
1922
2030
|
|
|
1923
2031
|
[[package]]
|
|
@@ -1987,7 +2095,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
1987
2095
|
checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d"
|
|
1988
2096
|
dependencies = [
|
|
1989
2097
|
"base64ct",
|
|
1990
|
-
"der",
|
|
2098
|
+
"der 0.7.10",
|
|
2099
|
+
]
|
|
2100
|
+
|
|
2101
|
+
[[package]]
|
|
2102
|
+
name = "spki"
|
|
2103
|
+
version = "0.8.0"
|
|
2104
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2105
|
+
checksum = "1d9efca8738c78ee9484207732f728b1ef517bbb1833d6fc0879ca898a522f6f"
|
|
2106
|
+
dependencies = [
|
|
2107
|
+
"base64ct",
|
|
2108
|
+
"der 0.8.1",
|
|
1991
2109
|
]
|
|
1992
2110
|
|
|
1993
2111
|
[[package]]
|
|
@@ -2058,7 +2176,16 @@ version = "1.0.69"
|
|
|
2058
2176
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2059
2177
|
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
|
|
2060
2178
|
dependencies = [
|
|
2061
|
-
"thiserror-impl",
|
|
2179
|
+
"thiserror-impl 1.0.69",
|
|
2180
|
+
]
|
|
2181
|
+
|
|
2182
|
+
[[package]]
|
|
2183
|
+
name = "thiserror"
|
|
2184
|
+
version = "2.0.20"
|
|
2185
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2186
|
+
checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f"
|
|
2187
|
+
dependencies = [
|
|
2188
|
+
"thiserror-impl 2.0.20",
|
|
2062
2189
|
]
|
|
2063
2190
|
|
|
2064
2191
|
[[package]]
|
|
@@ -2072,6 +2199,17 @@ dependencies = [
|
|
|
2072
2199
|
"syn 2.0.119",
|
|
2073
2200
|
]
|
|
2074
2201
|
|
|
2202
|
+
[[package]]
|
|
2203
|
+
name = "thiserror-impl"
|
|
2204
|
+
version = "2.0.20"
|
|
2205
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2206
|
+
checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"
|
|
2207
|
+
dependencies = [
|
|
2208
|
+
"proc-macro2",
|
|
2209
|
+
"quote",
|
|
2210
|
+
"syn 3.0.3",
|
|
2211
|
+
]
|
|
2212
|
+
|
|
2075
2213
|
[[package]]
|
|
2076
2214
|
name = "tinystr"
|
|
2077
2215
|
version = "0.8.3"
|
|
@@ -2193,7 +2331,7 @@ version = "0.5.1"
|
|
|
2193
2331
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2194
2332
|
checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"
|
|
2195
2333
|
dependencies = [
|
|
2196
|
-
"crypto-common",
|
|
2334
|
+
"crypto-common 0.1.7",
|
|
2197
2335
|
"subtle",
|
|
2198
2336
|
]
|
|
2199
2337
|
|
|
@@ -2489,15 +2627,15 @@ dependencies = [
|
|
|
2489
2627
|
|
|
2490
2628
|
[[package]]
|
|
2491
2629
|
name = "x509-cert"
|
|
2492
|
-
version = "0.
|
|
2630
|
+
version = "0.3.0"
|
|
2493
2631
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2494
|
-
checksum = "
|
|
2632
|
+
checksum = "105ef4642d9cb137ef83d623d0e4bf08b8adf69e9918ca904a174adb6d3d038b"
|
|
2495
2633
|
dependencies = [
|
|
2496
|
-
"const-oid",
|
|
2497
|
-
"der",
|
|
2634
|
+
"const-oid 0.10.2",
|
|
2635
|
+
"der 0.8.1",
|
|
2498
2636
|
"sha1",
|
|
2499
|
-
"signature",
|
|
2500
|
-
"spki",
|
|
2637
|
+
"signature 3.0.0",
|
|
2638
|
+
"spki 0.8.0",
|
|
2501
2639
|
"tls_codec",
|
|
2502
2640
|
]
|
|
2503
2641
|
|
|
@@ -36,7 +36,8 @@ confium-core = "0.2"
|
|
|
36
36
|
confium-transparency = "0.4"
|
|
37
37
|
confium-composite = "0.3.1"
|
|
38
38
|
confium-attributes = "0.3.1"
|
|
39
|
-
confium-pki = "0.
|
|
39
|
+
confium-pki = "0.5.6"
|
|
40
|
+
confium-store = "0.5.8"
|
|
40
41
|
confium-deployment = "0.3"
|
|
41
42
|
confium-tc = "0.3.1"
|
|
42
43
|
confium-tc-frost-p256 = "0.3"
|
|
@@ -12,6 +12,7 @@ mod ers;
|
|
|
12
12
|
mod openpgp_verify;
|
|
13
13
|
mod path;
|
|
14
14
|
mod pki;
|
|
15
|
+
mod store;
|
|
15
16
|
mod tc;
|
|
16
17
|
mod transparency;
|
|
17
18
|
mod util;
|
|
@@ -49,6 +50,7 @@ fn init(ruby: &Ruby) -> Result<(), Error> {
|
|
|
49
50
|
composite::init(ruby, confium)?;
|
|
50
51
|
attributes::init(ruby, confium)?;
|
|
51
52
|
pki::init(ruby, confium)?;
|
|
53
|
+
store::init(ruby, confium)?;
|
|
52
54
|
path::init(ruby, confium)?;
|
|
53
55
|
deployment::init(ruby, confium)?;
|
|
54
56
|
tc::init(ruby, confium)?;
|
|
@@ -33,8 +33,9 @@ pub struct Certificate {
|
|
|
33
33
|
impl Certificate {
|
|
34
34
|
fn from_der(bytes: Value) -> Result<Obj<Self>, Error> {
|
|
35
35
|
let der = bytes_from_value(bytes)?;
|
|
36
|
-
let cert = RustCert::from_der(&der)
|
|
37
|
-
|
|
36
|
+
let cert = RustCert::from_der(&der).map_err(|e| {
|
|
37
|
+
parse_error(e.to_string(), "Certificate.from_der", Some("der"), e.der_offset())
|
|
38
|
+
})?;
|
|
38
39
|
let ruby = Ruby::get().map_err(|e| crate::util::runtime(e.to_string()))?;
|
|
39
40
|
Ok(ruby.obj_wrap(Self { inner: cert }))
|
|
40
41
|
}
|
|
@@ -101,8 +102,9 @@ pub struct Csr {
|
|
|
101
102
|
impl Csr {
|
|
102
103
|
fn from_der(bytes: Value) -> Result<Obj<Self>, Error> {
|
|
103
104
|
let der = bytes_from_value(bytes)?;
|
|
104
|
-
let csr = RustCsr::from_der(&der)
|
|
105
|
-
|
|
105
|
+
let csr = RustCsr::from_der(&der).map_err(|e| {
|
|
106
|
+
parse_error(e.to_string(), "Csr.from_der", Some("der"), e.der_offset())
|
|
107
|
+
})?;
|
|
106
108
|
let ruby = Ruby::get().map_err(|e| crate::util::runtime(e.to_string()))?;
|
|
107
109
|
Ok(ruby.obj_wrap(Self { inner: csr }))
|
|
108
110
|
}
|
|
@@ -299,7 +301,7 @@ impl SignedData {
|
|
|
299
301
|
#[derive(TypedData, DataTypeFunctions)]
|
|
300
302
|
#[magnus(class = "Confium::PKI::CMS::VerificationResult", size)]
|
|
301
303
|
pub struct CmsVerificationResult {
|
|
302
|
-
pub inner: confium_pki::cms::
|
|
304
|
+
pub inner: confium_pki::cms::CmsVerificationResult,
|
|
303
305
|
}
|
|
304
306
|
|
|
305
307
|
impl CmsVerificationResult {
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
//! Confium::Store — Ruby surface for `confium_store`.
|
|
2
|
+
//!
|
|
3
|
+
//! `Confium::Store::Keystore` opens a keystore by backend wire name
|
|
4
|
+
//! (`"memory"`, plus the remote-holding backends when the extension is
|
|
5
|
+
//! built with their features) and exposes the remote-sign path added
|
|
6
|
+
//! by the sign-with-handle contract:
|
|
7
|
+
//!
|
|
8
|
+
//! ks = Confium::Store::Keystore.new("memory")
|
|
9
|
+
//! ks.sign(key_id, algorithm, message) # => binary String
|
|
10
|
+
//!
|
|
11
|
+
//! Local backends raise for `#sign` — remote signing is implemented by
|
|
12
|
+
//! the cloud KMS backends (`aws-kms`, `gcp-kms`, `azure-keyvault`),
|
|
13
|
+
//! which source builds opt into via cargo features.
|
|
14
|
+
|
|
15
|
+
use confium_store::Keystore as RustKeystore;
|
|
16
|
+
use magnus::{
|
|
17
|
+
function, method, prelude::*, DataTypeFunctions, Error, Module, RHash, Ruby, TryConvert,
|
|
18
|
+
TypedData, Value,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
use crate::util::{bytes_from_value, bytes_to_rstring, confium_error, new_details};
|
|
22
|
+
|
|
23
|
+
#[derive(TypedData, DataTypeFunctions)]
|
|
24
|
+
#[magnus(class = "Confium::Store::Keystore", size)]
|
|
25
|
+
pub struct Keystore {
|
|
26
|
+
inner: std::cell::RefCell<RustKeystore>,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
fn store_error(e: confium_store::error::Error, operation: &str) -> Error {
|
|
30
|
+
let ruby = match Ruby::get() {
|
|
31
|
+
Ok(r) => r,
|
|
32
|
+
Err(_) => return Error::new(magnus::exception::runtime_error(), e.to_string()),
|
|
33
|
+
};
|
|
34
|
+
let details = new_details(&ruby);
|
|
35
|
+
let _ = details.aset("operation", operation);
|
|
36
|
+
match &e {
|
|
37
|
+
confium_store::error::Error::NotImplemented { what } => {
|
|
38
|
+
let _ = details.aset("what", *what);
|
|
39
|
+
}
|
|
40
|
+
confium_store::error::Error::UnknownBackend { name } => {
|
|
41
|
+
let _ = details.aset("backend", name.as_str());
|
|
42
|
+
}
|
|
43
|
+
_ => {}
|
|
44
|
+
}
|
|
45
|
+
confium_error(e.to_string(), "Error", details)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
impl Keystore {
|
|
49
|
+
fn initialize(ruby: &Ruby, args: &[Value]) -> Result<Self, Error> {
|
|
50
|
+
let scanned = magnus::scan_args::scan_args::<(String,), (Option<RHash>,), (), (), (), ()>(args)
|
|
51
|
+
.map_err(|e| crate::util::arg_error(e.to_string()))?;
|
|
52
|
+
let backend = scanned.required.0;
|
|
53
|
+
let mut options = confium_store::backend::Options::new();
|
|
54
|
+
if let Some(hash) = scanned.optional.0 {
|
|
55
|
+
hash.foreach(|k: Value, v: Value| {
|
|
56
|
+
let key: String = <String as TryConvert>::try_convert(k)?;
|
|
57
|
+
let value: String = <String as TryConvert>::try_convert(v)?;
|
|
58
|
+
options.insert(key, value);
|
|
59
|
+
Ok(magnus::r_hash::ForEach::Continue)
|
|
60
|
+
})?;
|
|
61
|
+
}
|
|
62
|
+
let inner =
|
|
63
|
+
RustKeystore::new(&backend, &options).map_err(|e| store_error(e, "Keystore.new"))?;
|
|
64
|
+
let _ = ruby;
|
|
65
|
+
Ok(Self {
|
|
66
|
+
inner: std::cell::RefCell::new(inner),
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/// Sign `message` with the remotely-held key `key_id` under the
|
|
71
|
+
/// provider algorithm name. Returns binary String signature bytes.
|
|
72
|
+
fn sign(&self, args: &[Value]) -> Result<magnus::RString, Error> {
|
|
73
|
+
let scanned = magnus::scan_args::scan_args::<(String, String), (Option<Value>,), (), (), (), ()>(args)
|
|
74
|
+
.map_err(|e| crate::util::arg_error(e.to_string()))?;
|
|
75
|
+
let (key_id, algorithm) = scanned.required;
|
|
76
|
+
let message = scanned
|
|
77
|
+
.optional
|
|
78
|
+
.0
|
|
79
|
+
.ok_or_else(|| crate::util::arg_error("Keystore#sign: message is required"))?;
|
|
80
|
+
let bytes = bytes_from_value(message)?;
|
|
81
|
+
let signature = self
|
|
82
|
+
.inner
|
|
83
|
+
.borrow()
|
|
84
|
+
.sign("confium", "ruby", &key_id, &algorithm, &bytes)
|
|
85
|
+
.map_err(|e| store_error(e, "Keystore#sign"))?;
|
|
86
|
+
Ok(bytes_to_rstring(
|
|
87
|
+
&Ruby::get().map_err(|e| crate::util::runtime(e.to_string()))?,
|
|
88
|
+
&signature,
|
|
89
|
+
))
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/// The backend wire names registered at link time
|
|
94
|
+
/// (`Confium::Store.backends`).
|
|
95
|
+
fn backends() -> Result<Vec<String>, Error> {
|
|
96
|
+
Ok(confium_store::backend::iter()
|
|
97
|
+
.map(|b| b.name().to_string())
|
|
98
|
+
.collect())
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
pub fn init(ruby: &Ruby, parent: magnus::RModule) -> Result<(), Error> {
|
|
102
|
+
let store = parent.define_module("Store")?;
|
|
103
|
+
let class = store.define_class("Keystore", ruby.class_object())?;
|
|
104
|
+
class.define_singleton_method("new", function!(Keystore::initialize, -1))?;
|
|
105
|
+
class.define_method("sign", method!(Keystore::sign, -1))?;
|
|
106
|
+
store.define_module_function("backends", function!(backends, 0))?;
|
|
107
|
+
Ok(())
|
|
108
|
+
}
|
data/lib/confium/errors.rb
CHANGED
|
@@ -12,8 +12,17 @@ module Confium
|
|
|
12
12
|
class Error < StandardError
|
|
13
13
|
attr_reader :details
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
# The native extension constructs errors positionally
|
|
16
|
+
# (message, details_hash) — the same shape every typed subclass
|
|
17
|
+
# accepts via Errors::Coerce. Accepting it here keeps the whole
|
|
18
|
+
# family uniform; the keyword form still works.
|
|
19
|
+
def initialize(message = nil, details_hash = nil, details: {})
|
|
20
|
+
base = if details_hash.is_a?(Hash) && !details_hash.empty?
|
|
21
|
+
details_hash
|
|
22
|
+
else
|
|
23
|
+
details
|
|
24
|
+
end
|
|
25
|
+
@details = base.transform_keys(&:to_sym)
|
|
17
26
|
super(message)
|
|
18
27
|
end
|
|
19
28
|
|
data/lib/confium/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: confium
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Open
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-08-
|
|
11
|
+
date: 2026-08-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rb_sys
|
|
@@ -124,6 +124,7 @@ files:
|
|
|
124
124
|
- ext/confium_native/src/openpgp_verify.rs
|
|
125
125
|
- ext/confium_native/src/path.rs
|
|
126
126
|
- ext/confium_native/src/pki.rs
|
|
127
|
+
- ext/confium_native/src/store.rs
|
|
127
128
|
- ext/confium_native/src/tc.rs
|
|
128
129
|
- ext/confium_native/src/transparency.rs
|
|
129
130
|
- ext/confium_native/src/util.rs
|