You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Incorporated [!29](/../../pull/29) to support addition of multiple dictionary files to a single `Dictionary` instance via new `add_file` function (Fixes [#27](/../../issues/27))
11
+
12
+
## What's removed or deprecated
13
+
* Removed `1.63.0 & 1.64.0` Rust versions from Action pipeline as they were failing to install `cargo-make` (those versions are still supported by library)
14
+
15
+
## What's changed
16
+
* Changed `initialise_packet_from_bytes` function of `radius_packet` to: (Fixes [#28](/../../issues/28))
17
+
* Handle packets of the length less than 20 or more than 4096 octets - returns `RadiusError` (to comply with [RFC2865](https://datatracker.ietf.org/doc/html/rfc2865))
18
+
* Derive packet length from `RadiusPacket` (Length field) instead of relying on `bytes.len()`
19
+
* If derived packet length is greater than `bytes.len()` - returns `RadiusError` (to comply with [RFC2865](https://datatracker.ietf.org/doc/html/rfc2865))
20
+
* Fixed incorrect tests in `protocol/host.rs` (flagged by the changed above)
21
+
22
+
1
23
=============
2
24
# v0.4.2 (05 Aug 2023)
3
25
@@ -16,14 +38,15 @@ This release fixes some outstanding items and, hopefully, makes it's easier to u
16
38
* Remove validation in `verify_original_value` for `ByteString` & `Concat` because it is not really possible to validate those values once received
17
39
18
40
## What's changed
19
-
* Closes #17
41
+
* Closes [#17](/../../issues/17)
20
42
* Fix for `timestamp_to_bytes` function - it was incorrectly expecting `u64` while RADIUS expects timestamps to be `u32`
21
43
*`verify_original_value` function now handles verify for `Integer64` & `InterfaceId` data types
22
44
*`original_string_value` function now handles retrieval of string value for `IPv4Prefix` & `InterfaceId` data types
23
45
* Functions to encode to/decode from `IPv4` bytes now also handle values with prefix/subnet
24
46
* Functions to encode to/decode from `IPv6` bytes now also handle values with prefix/subnet
25
47
* Not related to RADIUS implementation - Github Action CI/CD add support for newer Rust versions and drop support for older versions (because unfortunately Action fails on those)
26
48
49
+
27
50
=============
28
51
# v0.4.1 (10 Aug 2022)
29
52
@@ -45,7 +68,7 @@ This is small release/patch fixing a few bits here & there
45
68
*`rand`, `0.7.3` --> `0.8.5`
46
69
*`thiserror`, `1.0.23` --> `1.0.32`
47
70
*`log` library is moved into `dev-dependencies` and bumped to `0.4.17`
48
-
* Added code from PR #24 - ensure dictionary parser not failing when file has tabs as well as whitespaces
71
+
* Added code from PR [!24](/../../pull/24) - ensure dictionary parser not failing when file has tabs as well as whitespaces
49
72
50
73
51
74
=============
@@ -61,7 +84,7 @@ Got a couple of PRs & issues raised with some of them introducing breaking chang
61
84
62
85
## What's changed
63
86
* Breaking change - Changed **encrypt_data()** function signature, so **data** parameter is now of type **&[u8]** instead of **&str**. Was reported in [#4](/../../issues/4) by Istvan91
64
-
* Breaking change - RADIUS packet creation now doesn't require **Vec<RadiusAttribute>**. To set attributes for packet, call **set_attributes()** function. For examples have a look at **examples/*_client.rs** (Fixes #11)
87
+
* Breaking change - RADIUS packet creation now doesn't require **Vec<RadiusAttribute>**. To set attributes for packet, call **set_attributes()** function. For examples have a look at **examples/*_client.rs** (Fixes [#11](/../../issues/11))
65
88
* Rewrote **encrypt_data()** a bit to remove unneeded allocations (thanks to Istvan91 [!2](/../../pull/2))
66
89
* Rewrote **decrypt_data()** a bit to remove unneeded allocations (thanks to Istvan91 [!2](/../../pull/2))
Copy file name to clipboardExpand all lines: src/protocol/host.rs
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -194,7 +194,7 @@ mod tests {
194
194
let dictionary = Dictionary::from_file("./dict_examples/integration_dict").unwrap();
195
195
let host = Host::initialise_host(1812,1813,3799, dictionary);
196
196
197
-
let packet_bytes = [4,43,0,83,215,189,213,172,57,94,141,70,134,121,101,57,187,220,227,73,4,6,192,168,1,10,5,6,0,0,0,0,32,10,116,114,105,108,108,105,97,110,30,19,48,48,45,48,52,45,53,70,45,48,48,45,48,70,45,68,49,31,19,48,48,45,48,49,45,50,52,45,56,48,45,66,51,45,57,67,8,6,10,0,0,100];
197
+
let packet_bytes = [4,43,0,86,215,189,213,172,57,94,141,70,134,121,101,57,187,220,227,73,4,6,192,168,1,10,5,6,0,0,0,0,32,10,116,114,105,108,108,105,97,110,30,19,48,48,45,48,52,45,53,70,45,48,48,45,48,70,45,68,49,31,19,48,48,45,48,49,45,50,52,45,56,48,45,66,51,45,57,67,8,6,10,0,0,100];
198
198
199
199
match host.verify_packet_attributes(&packet_bytes){
200
200
Err(_err) => {
@@ -209,7 +209,7 @@ mod tests {
209
209
let dictionary = Dictionary::from_file("./dict_examples/integration_dict").unwrap();
210
210
let host = Host::initialise_host(1812,1813,3799, dictionary);
211
211
212
-
let packet_bytes = [4,43,0,82,215,189,213,172,57,94,141,70,134,121,101,57,187,220,227,73,4,5,192,168,10,5,6,0,0,0,0,32,10,116,114,105,108,108,105,97,110,30,19,48,48,45,48,52,45,53,70,45,48,48,45,48,70,45,68,49,31,19,48,48,45,48,49,45,50,52,45,56,48,45,66,51,45,57,67,8,6,10,0,0,100];
212
+
let packet_bytes = [4,43,0,85,215,189,213,172,57,94,141,70,134,121,101,57,187,220,227,73,4,5,192,168,10,5,6,0,0,0,0,32,10,116,114,105,108,108,105,97,110,30,19,48,48,45,48,52,45,53,70,45,48,48,45,48,70,45,68,49,31,19,48,48,45,48,49,45,50,52,45,56,48,45,66,51,45,57,67,8,6,10,0,0,100];
213
213
214
214
match host.verify_packet_attributes(&packet_bytes){
215
215
Err(err) => {
@@ -241,7 +241,7 @@ mod tests {
241
241
let host = Host::initialise_host(1812,1813,3799, dictionary);
242
242
let secret = "secret";
243
243
244
-
let packet_bytes = [4,43,0,83,215,189,213,172,57,94,141,70,134,121,101,57,187,220,227,73,4,6,192,168,1,10,5,6,0,0,0,0,32,10,116,114,105,108,108,105,97,110,30,19,48,48,45,48,52,45,53,70,45,48,48,45,48,70,45,68,49,31,19,48,48,45,48,49,45,50,52,45,56,48,45,66,51,45,57,67,8,6,10,0,0,100];
244
+
let packet_bytes = [4,43,0,86,215,189,213,172,57,94,141,70,134,121,101,57,187,220,227,73,4,6,192,168,1,10,5,6,0,0,0,0,32,10,116,114,105,108,108,105,97,110,30,19,48,48,45,48,52,45,53,70,45,48,48,45,48,70,45,68,49,31,19,48,48,45,48,49,45,50,52,45,56,48,45,66,51,45,57,67,8,6,10,0,0,100];
245
245
246
246
match host.verify_message_authenticator(&secret,&packet_bytes){
0 commit comments