The Inbox: CryptoCertsTests-rww.2.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: CryptoCertsTests-rww.2.mcz

commits-2
A new version of CryptoCertsTests was added to project The Inbox:
http://source.squeak.org/inbox/CryptoCertsTests-rww.2.mcz

==================== Summary ====================

Name: CryptoCertsTests-rww.2
Author: rww
Time: 23 September 2010, 4:31:02.605 am
UUID: 8b2b49f9-382a-ec42-97c1-4dd2df1fd0ae
Ancestors: CryptoCertsTests-rww.1

fixed RSA signing and moved ASN1 and PKCS11 into Core

=============== Diff against CryptoCertsTests-rww.1 ===============

Item was removed:
- Object subclass: #ASN1TestModel
- instanceVariableNames: 'testSlot1 testSlot2'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'CryptoCertsTests'!

Item was removed:
- ----- Method: ASN1TestModel>>testSlot1 (in category 'accessing') -----
- testSlot1
- "Answer the value of testSlot1"
-
- ^ testSlot1!

Item was removed:
- ----- Method: ASN1TestModel>>testSlot1: (in category 'accessing') -----
- testSlot1: anObject
- "Set the value of testSlot1"
-
- testSlot1 := anObject!

Item was removed:
- ----- Method: ASN1TestModel>>testSlot2 (in category 'accessing') -----
- testSlot2
- "Answer the value of testSlot2"
-
- ^ testSlot2!

Item was removed:
- ----- Method: ASN1TestModel>>testSlot2: (in category 'accessing') -----
- testSlot2: anObject
- "Set the value of testSlot2"
-
- testSlot2 := anObject!

Item was removed:
- TestCase subclass: #CryptoASN1Test
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'CryptoCertsTests'!

Item was removed:
- ----- Method: CryptoASN1Test>>testBMPString (in category 'tests - base') -----
- testBMPString
-
- | bytes obj newBytes testObj |
- bytes := #(30 11 104 101 108 108 111 32 119 111 114 108 100).
- testObj := 'hello world'.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- newBytes := ASN1Stream encode: obj.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testBaseExplicitType (in category 'tests - defined types') -----
- testBaseExplicitType
-
- | bytes obj newBytes type |
- (ASN1Module name: #test) explicit: #TestExplicit type: #ASN1IntegerType tag: 0.
-
- type := (ASN1Module name: #test) find: #TestExplicit.
- bytes := #(160 4 2 2 3 21).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj = 789).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testBaseImplicitConstructedType (in category 'tests - defined types') -----
- testBaseImplicitConstructedType
-
- | bytes obj newBytes type |
- (ASN1Module name: #test) implicit: #TestImplicit type: #ASN1SequenceType tag: 0.
-
- type := (ASN1Module name: #test) find: #TestImplicit.
- bytes := #(160 4 2 2 3 21).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj = (OrderedCollection with: 789)).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testBaseImplicitPrimitiveType (in category 'tests - defined types') -----
- testBaseImplicitPrimitiveType
-
- | bytes obj newBytes type |
- (ASN1Module name: #test) implicit: #TestImplicit type: #ASN1IntegerType tag: 0.
-
- type := (ASN1Module name: #test) find: #TestImplicit.
- bytes := #(128 2 3 21).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj = 789).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testBitString (in category 'tests - base') -----
- testBitString
-
- | bytes obj newBytes testObj |
- bytes := #(3 3 3 168 121).
- testObj := ASN1BitString new
- bytes: #(168 121);
- bitsPadding: 3;
- yourself.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- newBytes := ASN1Stream encode: obj.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testBoolean (in category 'tests - base') -----
- testBoolean
-
- | bytes obj newBytes testObj |
- bytes := #(1 1 255).
- testObj := true.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- newBytes := ASN1Stream encode: obj.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testByteArray (in category 'tests - base') -----
- testByteArray
-
- | bytes obj newBytes testObj |
- bytes := #(4 5 3 21 55 43 76).
- testObj := #(3 21 55 43 76) asByteArray.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- newBytes := ASN1Stream encode: obj.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testConstructedBMPString (in category 'tests - BER') -----
- testConstructedBMPString
-
- | bytes obj testObj |
- bytes := #(62 15 30 5 84 101 115 116 32 30 6 85 115 101 114 32 49).
- testObj := 'Test User 1'.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testConstructedBitString (in category 'tests - BER') -----
- testConstructedBitString
-
- | bytes obj testObj |
- bytes := #(35 9 3 3 0 110 93 3 2 6 192).
- testObj := ASN1BitString new
- bytes: #(110 93 192) asByteArray;
- bitsPadding: 6;
- yourself.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testConstructedByteArray (in category 'tests - BER') -----
- testConstructedByteArray
-
- | bytes obj testObj |
- bytes := #(36 12 4 4 1 35 69 103 4 4 137 171 205 239).
- testObj :=#(1 35 69 103 137 171 205 239) asByteArray.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testConstructedIA5String (in category 'tests - BER') -----
- testConstructedIA5String
-
- | bytes obj testObj |
- bytes := #(54 15 22 5 84 101 115 116 32 22 6 85 115 101 114 32 49).
- testObj := 'Test User 1'.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testConstructedPrintableString (in category 'tests - BER') -----
- testConstructedPrintableString
-
- | bytes obj testObj |
- bytes := #(51 15 19 5 84 101 115 116 32 19 6 85 115 101 114 32 49).
- testObj := 'Test User 1'.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testConstructedTeletexString (in category 'tests - BER') -----
- testConstructedTeletexString
-
- | bytes obj testObj |
- bytes := #(52 15 20 5 84 101 115 116 32 20 6 85 115 101 114 32 49).
- testObj := 'Test User 1'.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testConstructedUTF8String (in category 'tests - BER') -----
- testConstructedUTF8String
-
- | bytes obj testObj |
- bytes := #(44 15 12 5 84 101 115 116 32 12 6 85 115 101 114 32 49).
- testObj := 'Test User 1'.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testConstructedUniversalString (in category 'tests - BER') -----
- testConstructedUniversalString
-
- | bytes obj testObj |
- bytes := #(60 15 28 5 84 101 115 116 32 28 6 85 115 101 114 32 49).
- testObj := 'Test User 1'.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedAnyDefinedByType (in category 'tests - defined types') -----
- testDefinedAnyDefinedByType
-
- | bytes obj newBytes type |
- ((ASN1Module name: #test) sequence: #TestSequence mapping: ASN1TestModel)
- add: #testSlot1 type: #ASN1ObjectIdentifierType;
- add: #testSlot2 type: #TestAnyDefinedBy;
- yourself.
- ((ASN1Module name: #test) any: #TestAnyDefinedBy definedBy: #testSlot1)
- at: (ASN1ObjectId fromString: '1.1') put: #ASN1BooleanType;
- at: (ASN1ObjectId fromString: '1.2') put: #ASN1IntegerType;
- yourself.
-
- type := (ASN1Module name: #test) find: #TestSequence.
-
- bytes := #(48 6 6 1 41 1 1 255).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = (ASN1ObjectId fromString: '1.1')).
- self assert: (obj testSlot2 = true).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
-
- bytes := #(48 7 6 1 42 2 2 3 21).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = (ASN1ObjectId fromString: '1.2')).
- self assert: (obj testSlot2 = 789).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedAnyType (in category 'tests - defined types') -----
- testDefinedAnyType
-
- | bytes obj newBytes type |
- ((ASN1Module name: #test) sequence: #TestSequence mapping: ASN1TestModel)
- add: #testSlot1 type: #ASN1AnyType;
- yourself.
-
- type := (ASN1Module name: #test) find: #TestSequence.
-
- bytes := #(48 3 1 1 255).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = true).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
-
- bytes := #(48 4 2 2 3 21).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = 789).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedChoiceType (in category 'tests - defined types') -----
- testDefinedChoiceType
-
- | bytes obj newBytes type |
- ((ASN1Module name: #test) sequence: #TestSequence mapping: ASN1TestModel)
- add: #testSlot1 type: #TestChoice;
- yourself.
- ((ASN1Module name: #test) choice: #TestChoice)
- add: #boolean type: #ASN1BooleanType;
- add: #integer type: #ASN1IntegerType;
- yourself.
-
- type := (ASN1Module name: #test) find: #TestSequence.
-
- bytes := #(48 3 1 1 255).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = true).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
-
- bytes := #(48 4 2 2 3 21).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = 789).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedExplicitType (in category 'tests - defined types') -----
- testDefinedExplicitType
-
- | bytes obj newBytes type |
- ((ASN1Module name: #test) sequence: #TestSequence mapping: ASN1TestModel)
- add: #testSlot1 type: #ASN1IntegerType explicitTag: 0;
- yourself.
-
- type := (ASN1Module name: #test) find: #TestSequence.
- bytes := #(48 6 160 4 2 2 3 21).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = 789).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedImplicitConstructedType (in category 'tests - defined types') -----
- testDefinedImplicitConstructedType
-
- | bytes obj newBytes type |
- ((ASN1Module name: #test) sequence: #TestSequence mapping: ASN1TestModel)
- add: #testSlot1 type: #ASN1SequenceType implicitTag: 0;
- yourself.
-
- type := (ASN1Module name: #test) find: #TestSequence.
- bytes := #(48 6 160 4 2 2 3 21).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = (OrderedCollection with: 789)).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedImplicitPrimitiveType (in category 'tests - defined types') -----
- testDefinedImplicitPrimitiveType
-
- | bytes obj newBytes type |
- ((ASN1Module name: #test) sequence: #TestSequence mapping: ASN1TestModel)
- add: #testSlot1 type: #ASN1IntegerType implicitTag: 0;
- yourself.
-
- type := (ASN1Module name: #test) find: #TestSequence.
- bytes := #(48 4 128 2 3 21).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = 789).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedMappedBMPStringType (in category 'tests - mapped') -----
- testDefinedMappedBMPStringType
-
- | bytes obj newBytes type |
- ((ASN1Module name: #test) mapped: #TestMapped)
- mapping: ASN1TestModel mappingSymbol: #testSlot1 type: #ASN1BMPStringType.
- type := (ASN1Module name: #test) find: #TestMapped.
-
- bytes := #(30 11 104 101 108 108 111 32 119 111 114 108 100).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = 'hello world').
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedMappedBooleanType (in category 'tests - mapped') -----
- testDefinedMappedBooleanType
-
- | bytes obj newBytes type |
- ((ASN1Module name: #test) mapped: #TestMapped)
- mapping: ASN1TestModel mappingSymbol: #testSlot1 type: #ASN1BooleanType.
- type := (ASN1Module name: #test) find: #TestMapped.
-
- bytes := #(1 1 255).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = true).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedMappedIntegerType (in category 'tests - mapped') -----
- testDefinedMappedIntegerType
-
- | bytes obj newBytes type |
- ((ASN1Module name: #test) mapped: #TestMapped)
- mapping: ASN1TestModel mappingSymbol: #testSlot1 type: #ASN1IntegerType.
- type := (ASN1Module name: #test) find: #TestMapped.
-
- bytes := #(2 2 3 21).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = 789).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedMappedSequenceType (in category 'tests - mapped') -----
- testDefinedMappedSequenceType
-
- | bytes obj newBytes type |
- ((ASN1Module name: #test) mapped: #TestMapped)
- mapping: ASN1TestModel mappingSymbol: #testSlot1 type: #TestSequence.
- ((ASN1Module name: #test) sequence: #TestSequence mapping: ASN1TestModel)
- add: #testSlot1 type: #ASN1BooleanType.
- type := (ASN1Module name: #test) find: #TestMapped.
-
- bytes := #(48 3 1 1 255).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 testSlot1 = true).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedMappedUTF8StringType (in category 'tests - mapped') -----
- testDefinedMappedUTF8StringType
-
- | bytes obj newBytes type |
- ((ASN1Module name: #test) mapped: #TestMapped)
- mapping: ASN1TestModel mappingSymbol: #testSlot1 type: #ASN1StringType.
- type := (ASN1Module name: #test) find: #TestMapped.
-
- bytes := #(12 11 104 101 108 108 111 32 119 111 114 108 100).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = 'hello world').
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedSequenceOfType (in category 'tests - defined types') -----
- testDefinedSequenceOfType
-
- | bytes obj newBytes type |
- (ASN1Module name: #test) sequence: #TestSequence of: #ASN1BooleanType.
-
- type := (ASN1Module name: #test) find: #TestSequence.
- bytes := #(48 3 1 1 255).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: OrderedCollection).
- self assert: (obj first = true).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedSequenceType (in category 'tests - defined types') -----
- testDefinedSequenceType
-
- | bytes obj newBytes type |
- ((ASN1Module name: #test) sequence: #TestSequence mapping: ASN1TestModel)
- add: #testSlot1 type: #ASN1BooleanType;
- yourself.
-
- type := (ASN1Module name: #test) find: #TestSequence.
- bytes := #(48 3 1 1 255).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = true).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedSequenceTypeDefault (in category 'tests - defined types') -----
- testDefinedSequenceTypeDefault
-
- | bytes obj newBytes type |
- ((ASN1Module name: #test) sequence: #TestSequence mapping: ASN1TestModel)
- add: #testSlot1 type: #ASN1BooleanType default: false;
- yourself.
-
- type := (ASN1Module name: #test) find: #TestSequence.
- bytes := #(48 0).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = false).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedSequenceTypeOptional (in category 'tests - defined types') -----
- testDefinedSequenceTypeOptional
-
- | bytes obj newBytes type |
- ((ASN1Module name: #test) sequence: #TestSequence mapping: ASN1TestModel)
- addOptional: #testSlot1 type: #ASN1BooleanType;
- yourself.
-
- type := (ASN1Module name: #test) find: #TestSequence.
- bytes := #(48 0).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedSequenceTypeOptionalDefault (in category 'tests - defined types') -----
- testDefinedSequenceTypeOptionalDefault
-
- | bytes obj newBytes type |
- ((ASN1Module name: #test) sequence: #TestSequence mapping: ASN1TestModel)
- addOptional: #testSlot1 type: #ASN1BooleanType default: false;
- yourself.
-
- type := (ASN1Module name: #test) find: #TestSequence.
- bytes := #(48 0).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = false).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedSetType (in category 'tests - defined types') -----
- testDefinedSetType
-
- | bytes obj newBytes type |
- ((ASN1Module name: #test) set: #TestSet mapping: ASN1TestModel)
- add: #testSlot1 type: #ASN1BooleanType;
- yourself.
-
- type := (ASN1Module name: #test) find: #TestSet.
- bytes := #(49 3 1 1 255).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: ASN1TestModel).
- self assert: (obj testSlot1 = true).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedUnmappedSequenceType (in category 'tests - defined types') -----
- testDefinedUnmappedSequenceType
-
- | bytes obj newBytes type |
- (ASN1Module name: #test) sequence: #TestSequence.
-
- type := (ASN1Module name: #test) find: #TestSequence.
- bytes := #(48 3 1 1 255).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: OrderedCollection).
- self assert: (obj first = true).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testDefinedUnmappedSetType (in category 'tests - defined types') -----
- testDefinedUnmappedSetType
-
- | bytes obj newBytes type |
- (ASN1Module name: #test) set: #TestSet.
-
- type := (ASN1Module name: #test) find: #TestSet.
- bytes := #(49 3 1 1 255).
- obj := ASN1Stream decodeBytes: bytes withType: type.
- self assert: (obj isKindOf: OrderedSet).
- self assert: (obj includes: true).
- newBytes := ASN1Stream encode: obj withType: type.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testEqualsChecksType (in category 'tests - base') -----
- testEqualsChecksType
-
- self deny: (ASN1ObjectId fromString: '1.3.6.1.5.5.7.8.5') = Object new
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testIA5String (in category 'tests - base') -----
- testIA5String
-
- | bytes obj newBytes testObj |
- bytes := #(22 11 104 101 108 108 111 32 119 111 114 108 100).
- testObj := 'hello world'.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- newBytes := ASN1Stream encode: obj.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testIndefiniteLengthSequence (in category 'tests - BER') -----
- testIndefiniteLengthSequence
-
- | bytes obj testObj |
- bytes := #(48 128 1 1 255 2 2 3 21 4 2 108 100 0 0).
- testObj := OrderedCollection new
- add: true;
- add: 789;
- add: #(108 100) asByteArray;
- yourself.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testInteger (in category 'tests - base') -----
- testInteger
-
- | bytes obj newBytes testObj |
- bytes := #(2 2 3 21).
- testObj := 789.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- newBytes := ASN1Stream encode: obj.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testNull (in category 'tests - base') -----
- testNull
-
- | bytes obj newBytes |
- bytes := #(5 0).
- obj := ASN1Stream decodeBytes: bytes.
- self assert: obj isNil.
- newBytes := ASN1Stream encode: obj.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testObjectIdentifier (in category 'tests - base') -----
- testObjectIdentifier
-
- | bytes obj newBytes testObj |
- bytes := #(6 8 43 6 1 5 5 7 8 5).
- testObj := ASN1ObjectId new
- oid: '1.3.6.1.5.5.7.8.5';
- yourself.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- newBytes := ASN1Stream encode: obj.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testPrintableString (in category 'tests - base') -----
- testPrintableString
-
- | bytes obj newBytes testObj |
- bytes := #(19 11 104 101 108 108 111 32 119 111 114 108 100).
- testObj := 'hello world'.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- newBytes := ASN1Stream encode: obj.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testSequence (in category 'tests - base') -----
- testSequence
-
- | bytes obj newBytes testObj |
- bytes := #(48 11 1 1 255 2 2 3 21 4 2 108 100).
- testObj := OrderedCollection new
- add: true;
- add: 789;
- add: #(108 100) asByteArray;
- yourself.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- newBytes := ASN1Stream encode: obj.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testSet (in category 'tests - base') -----
- testSet
-
- | bytes obj newBytes testObj |
- bytes := #(49 11 1 1 255 4 2 108 100 2 2 3 21 ).
- testObj := OrderedSet new
- add: true;
- add: #(108 100) asByteArray;
- add: 789;
- yourself.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- newBytes := ASN1Stream encode: obj.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testString (in category 'tests - base') -----
- testString
-
- | bytes obj newBytes testObj |
- bytes := #(12 11 104 101 108 108 111 32 119 111 114 108 100).
- testObj := 'hello world'.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- newBytes := ASN1Stream encode: obj.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testTeletexString (in category 'tests - base') -----
- testTeletexString
-
- | bytes obj newBytes testObj |
- bytes := #(20 11 104 101 108 108 111 32 119 111 114 108 100).
- testObj := 'hello world'.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- newBytes := ASN1Stream encode: obj.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testUTCTime (in category 'tests - base') -----
- testUTCTime
-
- | bytes obj newBytes testObj |
- bytes := #(23 13 48 55 48 51 50 50 49 53 53 56 49 55 90).
- testObj := DateAndTime fromString: '2007-03-22T15:58:17+00:00'.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- newBytes := ASN1Stream encode: obj.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- ----- Method: CryptoASN1Test>>testUniversalString (in category 'tests - base') -----
- testUniversalString
-
- | bytes obj newBytes testObj |
- bytes := #(28 11 104 101 108 108 111 32 119 111 114 108 100).
- testObj := 'hello world'.
- obj := ASN1Stream decodeBytes: bytes.
- self assert: (obj = testObj).
- newBytes := ASN1Stream encode: obj.
- self assert: (bytes asByteArray = newBytes).
- !

Item was removed:
- TestCase subclass: #CryptoPKCS12Test
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'CryptoCertsTests'!

Item was removed:
- ----- Method: CryptoPKCS12Test>>test1 (in category 'testing') -----
- test1
-
- | key |
- key := (Pkcs12KeyDerivationFunction new
- derivedKeyWithId: 2
- fromPassword: 'smeg'
- salt: #(10 88 207 100 83 13 130 63)
- iterations: 1
- size: 8) hex.
- self assert: key = '79993DFE048D3B76'
- !

Item was removed:
- ----- Method: CryptoPKCS12Test>>test10 (in category 'testing') -----
- test10
-
- | key |
- key := (Pkcs12KeyDerivationFunction new
- derivedKeyWithId: 1
- fromPassword: 'queeg'
- salt: #(22 130 192 252 91 63 126 197)
- iterations: 1000
- size: 24) hex.
- self assert: key = '483DD6E919D7DE2E8E648BA8F862F3FBFBDC2BCB2C02957F'
- !

Item was removed:
- ----- Method: CryptoPKCS12Test>>test2 (in category 'testing') -----
- test2
-
- | key |
- key := (Pkcs12KeyDerivationFunction new
- derivedKeyWithId: 2
- fromPassword: 'smeg'
- salt: #(100 43 153 171 68 251 75 31)
- iterations: 1
- size: 8) hex.
- self assert: key = 'C0A38D64A79BEA1D'
- !

Item was removed:
- ----- Method: CryptoPKCS12Test>>test3 (in category 'testing') -----
- test3
-
- | key |
- key := (Pkcs12KeyDerivationFunction new
- derivedKeyWithId: 2
- fromPassword: 'queeg'
- salt: #(5 222 201 89 172 255 114 247)
- iterations: 1000
- size: 8) hex.
- self assert: key = '11DEDAD7758D4860'
- !

Item was removed:
- ----- Method: CryptoPKCS12Test>>test4 (in category 'testing') -----
- test4
-
- | key |
- key := (Pkcs12KeyDerivationFunction new
- derivedKeyWithId: 2
- fromPassword: 'queeg'
- salt: #(22 130 192 252 91 63 126 197)
- iterations: 1000
- size: 8) hex.
- self assert: key = '9D461D1B00355C50'
- !

Item was removed:
- ----- Method: CryptoPKCS12Test>>test5 (in category 'testing') -----
- test5
-
- | key |
- key := (Pkcs12KeyDerivationFunction new
- derivedKeyWithId: 3
- fromPassword: 'smeg'
- salt: #(61 131 192 228 84 106 193 64)
- iterations: 1
- size: 20) hex.
- self assert: key = '8D967D88F6CAA9D714800AB3D48051D63F73A312'
- !

Item was removed:
- ----- Method: CryptoPKCS12Test>>test6 (in category 'testing') -----
- test6
-
- | key |
- key := (Pkcs12KeyDerivationFunction new
- derivedKeyWithId: 3
- fromPassword: 'queeg'
- salt: #(38 50 22 252 194 250 179 28)
- iterations: 1000
- size: 20) hex.
- self assert: key = '5EC4C7A80DF652294C3925B6489A7AB857C83476'
- !

Item was removed:
- ----- Method: CryptoPKCS12Test>>test7 (in category 'testing') -----
- test7
-
- | key |
- key := (Pkcs12KeyDerivationFunction new
- derivedKeyWithId: 1
- fromPassword: 'smeg'
- salt: #(10 88 207 100 83 13 130 63)
- iterations: 1
- size: 24) hex.
- self assert: key = '8AAAE6297B6CB04642AB5B077851284EB7128F1A2A7FBCA3'
- !

Item was removed:
- ----- Method: CryptoPKCS12Test>>test8 (in category 'testing') -----
- test8
-
- | key |
- key := (Pkcs12KeyDerivationFunction new
- derivedKeyWithId: 1
- fromPassword: 'smeg'
- salt: #(100 43 153 171 68 251 75 31)
- iterations: 1
- size: 24) hex.
- self assert: key = 'F3A95FEC48D7711E985CFE67908C5AB79FA3D7C5CAA5D966'
- !

Item was removed:
- ----- Method: CryptoPKCS12Test>>test9 (in category 'testing') -----
- test9
-
- | key |
- key := (Pkcs12KeyDerivationFunction new
- derivedKeyWithId: 1
- fromPassword: 'queeg'
- salt: #(5 222 201 89 172 255 114 247)
- iterations: 1000
- size: 24) hex.
- self assert: key = 'ED2034E36328830FF09DF1E1A07DD357185DAC0D4F9EB3D4'
- !

Item was changed:
  ----- Method: CryptoX509Test>>testSignatureValidation (in category 'as yet unclassified') -----
  testSignatureValidation
 
  self assert: (self certificate1 verifyFromParentCertificate: self certificate1).
  !