aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/data
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-05-07 07:36:43 -0400
committerJack Lloyd <[email protected]>2019-05-08 18:18:47 -0400
commit959f14f63b4a995071065002d6d9be1b2085d29b (patch)
tree19e0bb7ae6ade7d4434b86be9229014ce41cc5d6 /src/tests/data
parent300afa13058ff7b063f4b92dcf1ddc45cf0e881e (diff)
Fix X509_DN comparison
An issue in #1936 indicated that X509_DN operator< was not behaving correctly. Indeed, DNs could compare in such a way that DN1 < DN2 && DN2 < DN1. STL containers do not like this.
Diffstat (limited to 'src/tests/data')
-rw-r--r--src/tests/data/x509_dn.vec24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/tests/data/x509_dn.vec b/src/tests/data/x509_dn.vec
index ab9e2dec3..e71510dbb 100644
--- a/src/tests/data/x509_dn.vec
+++ b/src/tests/data/x509_dn.vec
@@ -1,8 +1,29 @@
[Equal]
+# Empty
+DN1 = 3000
+DN2 = 3000
+
+# Equal binary
DN1 = 301C310B3009060355040613025654310D300B0603550403130454455354
DN2 = 301C310B3009060355040613025654310D300B0603550403130454455354
+# Different string types, same contents
+DN1 = 302E3111300F06035504061C0800000056000000543119301706035504031C1000000054000000450000005300000054
+DN2 = 301C310B3009060355040613025654310D300B0603550403130454455354
+
+# Same contents, different casing (X.500 demands case-insensitive), different order
+DN1 = 301C310B3009060355040613025654310D300B0603550403130454455354
+DN2 = 301C310D300B0603550403130474457354310B3009060355040613027674
+
+# Empty, different encodings
+DN1 = 3000
+DN2 = 3080
+
+# Empty, one using EOC encoding
+DN1 = 0000308100
+DN2 = 3000
+
[Unequal]
DN1 = 301C310B3009060355040613025654310D300B0603550403130454450054
DN2 = 301C310B3009060355040613025600310D300B0603550403130454455354
@@ -12,3 +33,6 @@ DN2 = 3019311730150603550403130E4141202020202020202020202020
DN1 = 3018311630140603550403130D41412041414141414141414141
DN2 = 3019311730150603550403130E4141202020202020202020202020
+
+DN1 = 3080318030800604307A7AFD1E808080300080208080800F0029000B800000000001000000D60680FF7FFFFF00040404040404040404040404230404040404040404040404040404040404040404040404040404040404040404040404040404040404040404040404000000
+DN2 = 000000000000000000000000000000000000000030803180308006047A7A30FD1E808080300080208080810F0000000B800000000001000000D60680FF7FFF040404040404040404040404040404040404040404040404000000000000000404040404040404040404890880