Skip to content

Commit 00a08aa

Browse files
committed
gss-api: reunite with the workspace
1 parent d1fb104 commit 00a08aa

File tree

7 files changed

+34
-147
lines changed

7 files changed

+34
-147
lines changed

.github/workflows/gss-api.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
strategy:
2828
matrix:
2929
rust:
30-
- 1.81.0 # MSRV
30+
- 1.85.0 # MSRV
3131
- stable
3232
target:
3333
- thumbv7em-none-eabi
@@ -52,7 +52,7 @@ jobs:
5252
strategy:
5353
matrix:
5454
rust:
55-
- 1.81.0 # MSRV
55+
- 1.85.0 # MSRV
5656
- stable
5757
steps:
5858
- uses: actions/checkout@v4

Cargo.lock

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ members = [
1010
"crmf",
1111
"der",
1212
"der_derive",
13-
#"gss-api",
13+
"gss-api",
1414
"pem-rfc7468",
1515
"pkcs1",
1616
"pkcs5",
@@ -29,7 +29,6 @@ members = [
2929
]
3030
exclude = [
3131
"base64ct",
32-
"gss-api",
3332
"pkcs12",
3433
"x509-tsp",
3534
"x509-ocsp"

gss-api/Cargo.lock

-132
This file was deleted.

gss-api/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ repository = "https://github.com/RustCrypto/formats"
1212
categories = ["cryptography", "authentication", "encoding", "no-std", "parser-implementations"]
1313
keywords = ["crypto", "gssapi", "kerberos", "krb5"]
1414
readme = "README.md"
15-
edition = "2021"
16-
rust-version = "1.81"
15+
edition = "2024"
16+
rust-version = "1.85"
1717

1818
[dependencies]
1919
der = { version = "0.8.0-rc.0", features = ["oid", "alloc"] }

gss-api/src/lib.rs

+9-5
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub struct InitialContextToken<'a> {
5757
impl FixedTag for InitialContextToken<'_> {
5858
const TAG: Tag = Tag::Application {
5959
constructed: true,
60-
number: TagNumber::new(0),
60+
number: TagNumber(0),
6161
};
6262
}
6363

@@ -130,8 +130,12 @@ mod tests {
130130

131131
#[test]
132132
fn initial_context_token() {
133-
let gss_bytes = hex!("604806062b0601050502a03e303ca00e300c060a2b06010401823702020aa22a04284e544c4d535350000100000005028862000000000000000000000000000000000601b01d0000000f");
134-
let inner_bytes = hex!("303ca00e300c060a2b06010401823702020aa22a04284e544c4d535350000100000005028862000000000000000000000000000000000601b01d0000000f");
133+
let gss_bytes = hex!(
134+
"604806062b0601050502a03e303ca00e300c060a2b06010401823702020aa22a04284e544c4d535350000100000005028862000000000000000000000000000000000601b01d0000000f"
135+
);
136+
let inner_bytes = hex!(
137+
"303ca00e300c060a2b06010401823702020aa22a04284e544c4d535350000100000005028862000000000000000000000000000000000601b01d0000000f"
138+
);
135139

136140
let gss = InitialContextToken::from_der(&gss_bytes).unwrap();
137141

@@ -140,7 +144,7 @@ mod tests {
140144
AnyRef::new(
141145
Tag::ContextSpecific {
142146
constructed: true,
143-
number: TagNumber::new(0)
147+
number: TagNumber(0)
144148
},
145149
&inner_bytes
146150
)
@@ -153,7 +157,7 @@ mod tests {
153157
inner_context_token: AnyRef::new(
154158
Tag::ContextSpecific {
155159
constructed: true,
156-
number: TagNumber::new(0),
160+
number: TagNumber(0),
157161
},
158162
&inner_bytes,
159163
)

gss-api/src/negotiation.rs

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Negotiation-related types
22
use der::{
3-
asn1::{BitString, OctetStringRef},
43
AnyRef, Choice, Enumerated, Sequence,
4+
asn1::{BitString, OctetStringRef},
55
};
66

77
use crate::MechType;
@@ -378,7 +378,9 @@ mod tests {
378378

379379
#[test]
380380
fn token_init() {
381-
let neg_token_init_bytes = hex!("303ca00e300c060a2b06010401823702020aa32a3028a0261b246e6f745f646566696e65645f696e5f5246433431373840706c656173655f69676e6f7265");
381+
let neg_token_init_bytes = hex!(
382+
"303ca00e300c060a2b06010401823702020aa32a3028a0261b246e6f745f646566696e65645f696e5f5246433431373840706c656173655f69676e6f7265"
383+
);
382384
let neg_token = NegTokenInit2::from_der(&neg_token_init_bytes).unwrap();
383385
assert_eq!(
384386
1,
@@ -393,7 +395,9 @@ mod tests {
393395

394396
#[test]
395397
fn token_response() {
396-
let neg_token_resp_bytes = hex!("308199a0030a0101a10c060a2b06010401823702020aa281830481804e544c4d53535000020000000a000a003800000005028a6234805409a0e0e1f900000000000000003e003e0042000000060100000000000f530041004d004200410002000a00530041004d004200410001000a00530041004d00420041000400000003000a00730061006d00620061000700080036739dbd327fd90100000000");
398+
let neg_token_resp_bytes = hex!(
399+
"308199a0030a0101a10c060a2b06010401823702020aa281830481804e544c4d53535000020000000a000a003800000005028a6234805409a0e0e1f900000000000000003e003e0042000000060100000000000f530041004d004200410002000a00530041004d004200410001000a00530041004d00420041000400000003000a00730061006d00620061000700080036739dbd327fd90100000000"
400+
);
397401
let neg_token_resp = NegTokenResp::from_der(&neg_token_resp_bytes).unwrap();
398402
assert_eq!(
399403
ObjectIdentifier::new_unwrap("1.3.6.1.4.1.311.2.2.10"),
@@ -404,7 +408,9 @@ mod tests {
404408
#[cfg(feature = "rfc2478")]
405409
#[test]
406410
fn decode_rfc2478() {
407-
let neg_token_targ_bytes = hex!("308199a0030a0101a10c060a2b06010401823702020aa281830481804e544c4d53535000020000000a000a003800000005028a6234805409a0e0e1f900000000000000003e003e0042000000060100000000000f530041004d004200410002000a00530041004d004200410001000a00530041004d00420041000400000003000a00730061006d00620061000700080036739dbd327fd90100000000");
411+
let neg_token_targ_bytes = hex!(
412+
"308199a0030a0101a10c060a2b06010401823702020aa281830481804e544c4d53535000020000000a000a003800000005028a6234805409a0e0e1f900000000000000003e003e0042000000060100000000000f530041004d004200410002000a00530041004d004200410001000a00530041004d00420041000400000003000a00730061006d00620061000700080036739dbd327fd90100000000"
413+
);
408414
let neg_token_targ = NegTokenTarg::from_der(&neg_token_targ_bytes).unwrap();
409415
assert_eq!(
410416
NegResult::AcceptIncomplete,

0 commit comments

Comments
 (0)