Skip to content

Commit 2e9c80c

Browse files
committed
fix der_length_object_identifier()
... there are only three root nodes As of X6.90 Ch. 8.19.4: "NOTE – This packing of the first two object identifier components recognizes that only three values are allocated from the root node..."
1 parent 6584569 commit 2e9c80c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pk/asn1/der/object_identifier/der_length_object_identifier.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ int der_length_object_identifier(const unsigned long *words, unsigned long nword
4848
return CRYPT_INVALID_ARG;
4949
}
5050

51-
/* word1 = 0,1,2,3 and word2 0..39 */
52-
if (words[0] > 3 || (words[0] < 2 && words[1] > 39)) {
51+
/* word1 = 0,1,2 and word2 0..39 */
52+
if (words[0] > 2 || (words[0] < 2 && words[1] > 39)) {
5353
return CRYPT_INVALID_ARG;
5454
}
5555

0 commit comments

Comments
 (0)