Skip to content

Commit

Permalink
Update AddNOC/UpdateNOC to follow final error handling spec text (#18861
Browse files Browse the repository at this point in the history
)

* updated noc to follow final error handling spec

* Removes white spacing

* Regenerated ZAP files

* Updated validation for update and add in op-cred

* Verify ICAC.size

* Regenerated ZAP files with proper formatting

* Added proper error handling for invalid commands

* Moved fabric index check to be the last check

* Restyled by whitespace

* Restyled by clang-format

* Pr changes: moved constraint checks & updated logs

* Added CHIP_ERROR_INVALID_ADMIN_SUBJECT and PR fix

* Updated comments to reflect reality

* Regnerated zap files

* Fixed more review comments

* Removed dublicate error case

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Aug 3, 2022
1 parent ce6c9ca commit 1472725
Show file tree
Hide file tree
Showing 38 changed files with 211 additions and 116 deletions.
1 change: 1 addition & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,7 @@ nongnu
nordicsemi
NotAvailable
notValue
npm
nRF
nrfconnect
nrfdks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2498,6 +2498,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -2544,7 +2545,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
3 changes: 2 additions & 1 deletion examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -772,7 +773,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -1206,7 +1207,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
3 changes: 2 additions & 1 deletion examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1250,6 +1250,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -1296,7 +1297,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
3 changes: 2 additions & 1 deletion examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1387,6 +1387,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -1433,7 +1434,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -353,7 +354,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -507,7 +508,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -546,7 +547,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
6 changes: 4 additions & 2 deletions examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1540,6 +1540,7 @@ client cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -1579,7 +1580,7 @@ client cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down Expand Up @@ -1623,6 +1624,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -1662,7 +1664,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
6 changes: 4 additions & 2 deletions examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1540,6 +1540,7 @@ client cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -1579,7 +1580,7 @@ client cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down Expand Up @@ -1623,6 +1624,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -1662,7 +1664,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
3 changes: 2 additions & 1 deletion examples/pump-app/pump-common/pump-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -1016,7 +1017,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -902,7 +903,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -570,7 +571,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
3 changes: 2 additions & 1 deletion examples/thermostat/thermostat-common/thermostat.matter
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -807,7 +808,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
6 changes: 4 additions & 2 deletions examples/tv-app/tv-common/tv-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,7 @@ client cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -1545,7 +1546,7 @@ client cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down Expand Up @@ -1598,6 +1599,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -1644,7 +1646,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1554,6 +1554,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -1600,7 +1601,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
3 changes: 2 additions & 1 deletion examples/window-app/common/window-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,7 @@ server cluster OperationalCredentials = 62 {
kInvalidNOC = 3;
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
Expand Down Expand Up @@ -871,7 +872,7 @@ server cluster OperationalCredentials = 62 {
OCTET_STRING NOCValue = 0;
optional OCTET_STRING ICACValue = 1;
OCTET_STRING IPKValue = 2;
NODE_ID caseAdminNode = 3;
Int64u caseAdminSubject = 3;
VENDOR_ID adminVendorId = 4;
}

Expand Down
Loading

0 comments on commit 1472725

Please sign in to comment.