File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -730,3 +730,23 @@ def test_basic_wrap_unwrap(self):
730
730
unwrapped_message .should_be_a (bytes )
731
731
unwrapped_message .shouldnt_be_empty ()
732
732
unwrapped_message .should_be (b'test message' )
733
+
734
+
735
+ TEST_OIDS = {'SPNEGO' : {'bytes' : '\053 \006 \001 \005 \005 \002 ' ,
736
+ 'string' : '<OID 1.3.6.1.5.5.2>' },
737
+ 'KRB5' : {'bytes' : '\052 \206 \110 \206 \367 \022 \001 \002 \002 ' ,
738
+ 'string' : '<OID 1.2.840.113554.1.2.2>' },
739
+ 'KRB5_OLD' : {'bytes' : '\053 \005 \001 \005 \002 ' ,
740
+ 'string' : '<OID 1.3.5.1.5.2>' },
741
+ 'KRB5_WRONG' : {'bytes' : '\052 \206 \110 \202 \367 \022 \001 \002 \002 ' ,
742
+ 'string' : '<OID 1.2.840.48018.1.2.2>' },
743
+ 'IAKERB' : {'bytes' : '\053 \006 \001 \005 \002 \005 ' ,
744
+ 'string' : '<OID 1.3.6.1.5.2.5>' }}
745
+
746
+
747
+ class TestOIDTransforms (unittest .TestCase ):
748
+ def test_decode_from_bytes (self ):
749
+ for oid in TEST_OIDS .values ():
750
+ o = gb .OID (elements = oid ['bytes' ])
751
+ text = repr (o )
752
+ text .should_be (oid ['string' ])
You can’t perform that action at this time.
0 commit comments