Skip to content

Commit f740f00

Browse files
authored
fix: decode PKU2U AuthPack as Diffie-Hellman (#786)
Use the Diffie-Hellman AuthPack alias introduced by picky-krb 0.13.1 so fresh dependency resolutions compile. Raise the minimum version to keep the decoder type available.
1 parent e7ec8e4 commit f740f00

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎Cargo.lock‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ winscard = { workspace = true, optional = true }
130130
rsa = { version = "=0.10.0-rc.18", default-features = false }
131131
tracing = { version = "0.1", default-features = true }
132132
serde = "1"
133-
picky-krb = "0.13"
133+
picky-krb = "0.13.1"
134134
picky-asn1 = { version = "0.10", features = ["time_conversion"] }
135135
byteorder = "1.5"
136136
crypto-bigint = { version = "0.7", default-features = false, features = ["alloc"] }

‎src/pku2u/server.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use picky_krb::messages::{ApReq, AsRep, AsReq, EncAsRepPart, EncKdcRepPart, KdcR
4141
use picky_krb::negoex::NegoexMessage;
4242
use picky_krb::negoex::data_types::MessageType;
4343
use picky_krb::negoex::messages::{Exchange, Nego, Verify};
44-
use picky_krb::pkinit::{AuthPack, DhRepInfo, KdcDhKeyInfo, KrbFinished, PaPkAsRep, PaPkAsReq, Pku2uNegoReq};
44+
use picky_krb::pkinit::{DhAuthPack, DhRepInfo, KdcDhKeyInfo, KrbFinished, PaPkAsRep, PaPkAsReq, Pku2uNegoReq};
4545
use rand::rngs::{StdRng, SysRng};
4646
use rand_core::SeedableRng as _;
4747
use sha1::{Digest, Sha1};
@@ -496,7 +496,7 @@ fn build_as_rep(server: &mut Pku2u, as_req: &AsReq) -> Result<AsRep> {
496496
));
497497
}
498498
};
499-
let auth_pack: AuthPack = picky_asn1_der::from_bytes(auth_pack_bytes)?;
499+
let auth_pack: DhAuthPack = picky_asn1_der::from_bytes(auth_pack_bytes)?;
500500

501501
// Content binding (RFC 4556 §3.2.1): `paChecksum` must be the SHA1 digest of `KDC-REQ-BODY`, which
502502
// binds this specific signed request to this specific AS-REQ and prevents it from being replayed

0 commit comments

Comments
 (0)