os/security/cryptoservices/certificateandkeymgmt/tpkcs7/scripts/tpkcs7_v2.ini
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
;
sl@0
     2
; tpkcs7.ini
sl@0
     3
;
sl@0
     4
sl@0
     5
sl@0
     6
sl@0
     7
[CORRUPT1]
sl@0
     8
; An empty file
sl@0
     9
File = C:\tpkcs7\data\corrupt1
sl@0
    10
RootCertificate = C:\tpkcs7\data\rootcertificate
sl@0
    11
Reason = -6 ; KErrArgument
sl@0
    12
sl@0
    13
[CORRUPT2]
sl@0
    14
; Clearly not a PKCS7 entity
sl@0
    15
File = C:\tpkcs7\data\corrupt2
sl@0
    16
RootCertificate = C:\tpkcs7\data\rootcertificate
sl@0
    17
Reason = -6 ; KErrArgument
sl@0
    18
sl@0
    19
[CORRUPT3]
sl@0
    20
; A PKCS7 entity that is slightly truncated
sl@0
    21
File = C:\tpkcs7\data\corrupt3
sl@0
    22
RootCertificate = C:\tpkcs7\data\rootcertificate
sl@0
    23
Reason = -6 ; KErrArgument
sl@0
    24
sl@0
    25
[CORRUPT4]
sl@0
    26
; A PKCS7 entity with an internal length field corrupted
sl@0
    27
File = C:\tpkcs7\data\corrupt4
sl@0
    28
RootCertificate = C:\tpkcs7\data\rootcertificate
sl@0
    29
Reason = -6 ; KErrArgument
sl@0
    30
sl@0
    31
[INVALID1]
sl@0
    32
; This contains the signed data "The quick brown fox jumps over the lazy dog" but has expired
sl@0
    33
File = C:\tpkcs7\data\expired1
sl@0
    34
RootCertificate = C:\tpkcs7\data\rootcertificate
sl@0
    35
IsValid = false
sl@0
    36
ContentType = 1
sl@0
    37
ContentLength = 44
sl@0
    38
ContentString = 54686520717569636b2062726f776e20666f78206a756d7073206f76657220746865206c617a7920646f670a
sl@0
    39
CertificateCount = 2
sl@0
    40
SignerCount = 1
sl@0
    41
sl@0
    42
[INVALID2]
sl@0
    43
; This contains the signed data "Hello world\n\n" but the
sl@0
    44
; certificate chain root is not on the device
sl@0
    45
File = C:\tpkcs7\data\noroot1
sl@0
    46
RootCertificate = C:\tpkcs7\data\rootcertificate
sl@0
    47
IsValid = false
sl@0
    48
ContentType = 1
sl@0
    49
ContentLength = 13
sl@0
    50
ContentString = 48656c6c6f20776f726c640a0a
sl@0
    51
CertificateCount = 2
sl@0
    52
SignerCount = 1
sl@0
    53
sl@0
    54
[GOODFILE1]
sl@0
    55
; This contains the signed data "Hello world\n\n"
sl@0
    56
File = C:\tpkcs7\data\valid1
sl@0
    57
RootCertificate = C:\tpkcs7\data\rootcertificate
sl@0
    58
IsValid = true
sl@0
    59
ContentType = 1
sl@0
    60
ContentLength = 13
sl@0
    61
ContentString = 48656c6c6f20776f726c640a0a
sl@0
    62
CertificateCount = 2
sl@0
    63
SignerCount = 1
sl@0
    64
sl@0
    65
[GOODFILE2]
sl@0
    66
; This contains signed data of non-trivial length
sl@0
    67
File = C:\tpkcs7\data\valid2
sl@0
    68
RootCertificate = C:\tpkcs7\data\rootcertificate
sl@0
    69
IsValid = true
sl@0
    70
ContentType = 1
sl@0
    71
ContentLength = 126053
sl@0
    72
CertificateCount = 2
sl@0
    73
SignerCount = 1
sl@0
    74
sl@0
    75
[GOODFILE3]
sl@0
    76
; This contains signed data of zero length
sl@0
    77
File = C:\tpkcs7\data\valid3
sl@0
    78
RootCertificate = C:\tpkcs7\data\rootcertificate
sl@0
    79
IsValid = true
sl@0
    80
ContentType = 1
sl@0
    81
ContentLength = 0
sl@0
    82
CertificateCount = 2
sl@0
    83
SignerCount = 1
sl@0
    84
sl@0
    85
[GOOD1_ENCRYPTEDDATA]
sl@0
    86
; This contains ContentInfo which has Encrypted Data in it
sl@0
    87
; Here Data is encrypted using one of the unsupported Algorithms
sl@0
    88
; PBES1, pbeWithSHA1AndDES-CBC is used. 
sl@0
    89
; The test data generation is not automated in this case. 
sl@0
    90
; The test data is generated using the openssl.
sl@0
    91
File = C:\tpkcs7\data\sha1anddes-cbc
sl@0
    92
IsValid = false
sl@0
    93
Reason = -5
sl@0
    94
ContentType = 1.2.840.113549.1.7.1
sl@0
    95
ContentData = C:\tpkcs7\data\empty
sl@0
    96
Salt = C:\tpkcs7\data\empty 
sl@0
    97
Iteration = 2048
sl@0
    98
Algorithm = pbeWithSHA1AndDES-CBC
sl@0
    99
HashAlgorithmId = ESHA1
sl@0
   100
Password =
sl@0
   101
sl@0
   102
sl@0
   103
[GOOD2_ENCRYPTEDDATA]
sl@0
   104
; This contains ContentInfo which has Encrypted Data in it
sl@0
   105
; pbe12 Algorithm, pbeWithSHA1And128BitRC4 is used.
sl@0
   106
File = C:\tpkcs7\data\sha1and128bitrc4.der
sl@0
   107
IsValid = true
sl@0
   108
Reason = 0
sl@0
   109
ContentType = 1.2.840.113549.1.7.1
sl@0
   110
ContentData = C:\tpkcs7\data\sha1and128bitrc4_encryptedcontent.der
sl@0
   111
Salt = C:\tpkcs7\data\sha1and128bitrc4_salt.der
sl@0
   112
Iteration = 2048
sl@0
   113
Algorithm = pbeWithSHA1And128BitRC4
sl@0
   114
HashAlgorithmId = ESHA1
sl@0
   115
Password = symbian
sl@0
   116
sl@0
   117
[GOOD3_ENCRYPTEDDATA]
sl@0
   118
; This contains ContentInfo which has Encrypted Data in it
sl@0
   119
; pbe12 Algorithm, pbeWithSHA1And40BitRC4 is used.
sl@0
   120
File = C:\tpkcs7\data\sha1and40bitrc4.der
sl@0
   121
IsValid = true
sl@0
   122
Reason = 0
sl@0
   123
ContentType = 1.2.840.113549.1.7.1
sl@0
   124
ContentData = C:\tpkcs7\data\sha1and40bitrc4_encryptedcontent.der
sl@0
   125
Salt = C:\tpkcs7\data\sha1and40bitrc4_salt.der
sl@0
   126
Iteration = 2048
sl@0
   127
Algorithm = pbeWithSHA1And40BitRC4
sl@0
   128
HashAlgorithmId = ESHA1
sl@0
   129
Password = symbian
sl@0
   130
sl@0
   131
[GOOD4_ENCRYPTEDDATA]
sl@0
   132
; This contains ContentInfo which has Encrypted Data in it
sl@0
   133
; pbewithSHAAnd128BitRC2CBC alg used
sl@0
   134
File = C:\tpkcs7\data\sha1and128bitrc2.der
sl@0
   135
IsValid = true
sl@0
   136
Reason = 0
sl@0
   137
ContentType = 1.2.840.113549.1.7.1
sl@0
   138
ContentData = C:\tpkcs7\data\sha1and128bitrc2_encryptedcontent.der
sl@0
   139
Salt = C:\tpkcs7\data\sha1and128bitrc2_salt.der
sl@0
   140
Iteration = 2048
sl@0
   141
Algorithm = pbewithSHAAnd128BitRC2CBC
sl@0
   142
HashAlgorithmId = ESHA1
sl@0
   143
Password = symbian
sl@0
   144
sl@0
   145
[GOOD5_ENCRYPTEDDATA]
sl@0
   146
; This contains ContentInfo which has Encrypted Data in it
sl@0
   147
; pbeWithSHAAnd3_KeyTripleDES_CBC is used
sl@0
   148
File = C:\tpkcs7\data\sha1and3_keytripledes_cbc.der
sl@0
   149
IsValid = true
sl@0
   150
Reason = 0
sl@0
   151
ContentType = 1.2.840.113549.1.7.1
sl@0
   152
ContentData = C:\tpkcs7\data\sha1and3_keytripledes_cbc_encryptedcontent.der
sl@0
   153
Salt = C:\tpkcs7\data\sha1and3_keytripledes_cbc_salt.der
sl@0
   154
Iteration = 2048
sl@0
   155
Algorithm = pbeWithSHAAnd3_KeyTripleDES_CBC
sl@0
   156
HashAlgorithmId = ESHA1
sl@0
   157
Password = symbian
sl@0
   158
sl@0
   159
[GOOD6_ENCRYPTEDDATA]
sl@0
   160
; This contains ContentInfo which has Encrypted Data in it
sl@0
   161
; pbeWithSHA1And40BitRC2_CBC is used
sl@0
   162
File = C:\tpkcs7\data\sha1and40bitrc2_cbc.der
sl@0
   163
IsValid = true
sl@0
   164
Reason = 0
sl@0
   165
ContentType = 1.2.840.113549.1.7.1
sl@0
   166
ContentData = C:\tpkcs7\data\sha1and40bitrc2_cbc_encryptedcontent.der
sl@0
   167
Salt = C:\tpkcs7\data\sha1and40bitrc2_cbc_salt.der
sl@0
   168
Iteration = 2048
sl@0
   169
Algorithm = pbeWithSHA1And40BitRC2_CBC
sl@0
   170
HashAlgorithmId = ESHA1
sl@0
   171
Password = symbian
sl@0
   172
sl@0
   173
[GOOD8_ENCRYPTEDDATA]
sl@0
   174
; This contains encrypted content data
sl@0
   175
; pbeWithSHAAnd2-KeyTripleDES-CBC is used
sl@0
   176
File = C:\tpkcs7\data\sha1and2_keytripledes.der
sl@0
   177
IsValid = true
sl@0
   178
Reason = 0
sl@0
   179
ContentType = 1.2.840.113549.1.7.1
sl@0
   180
ContentData = C:\tpkcs7\data\sha1and2_keytripledes_encryptedcontent.der
sl@0
   181
Salt = C:\tpkcs7\data\sha1and2_keytripledes_salt.der 
sl@0
   182
Iteration = 2048
sl@0
   183
Algorithm = pbeWithSHAAnd2-KeyTripleDES-CBC
sl@0
   184
HashAlgorithmId = ESHA1
sl@0
   185
Password = symbian
sl@0
   186
sl@0
   187
[GOOD7_ENCRYPTEDDATA]
sl@0
   188
; This contains ContentInfo which is not EncryptedData
sl@0
   189
File = C:\tpkcs7\data\notencrypteddata.der
sl@0
   190
Reason = -6 ; KErrNotSupported
sl@0
   191
IsValid = false
sl@0
   192
ContentType = 1.2.840.113549.1.7.1
sl@0
   193
ContentData = C:\tpkcs7\data\empty
sl@0
   194
Salt = C:\tpkcs7\data\empty 
sl@0
   195
Iteration = 2048
sl@0
   196
Algorithm = pbeWithSHA1AndDES-CBC
sl@0
   197
HashAlgorithmId = ESHA1
sl@0
   198
sl@0
   199
sl@0
   200
[GOOD9_ENCRYPTEDDATA]
sl@0
   201
; This contains encrypted content data
sl@0
   202
; It has no algorithm parameters
sl@0
   203
; The Algorithm id is pkcs-12Pbe
sl@0
   204
File = C:\tpkcs7\data\encrypteddata_withoutsalt.der
sl@0
   205
Reason = -6
sl@0
   206
IsValid = false
sl@0
   207
ContentType = 1.2.840.113549.1.7.1
sl@0
   208
ContentData = C:\tpkcs7\data\encrypteddata_withoutsalt_content.der
sl@0
   209
Salt = C:\tpkcs7\data\empty 
sl@0
   210
Iteration = 1
sl@0
   211
Algorithm = pbeWithSHA1And40BitRC4
sl@0
   212
HashAlgorithmId = ESHA1
sl@0
   213
Password = symbian
sl@0
   214
sl@0
   215
[GOOD10_ENCRYPTEDDATA]
sl@0
   216
; This contains encrypted content data, here the version is not equal to 0
sl@0
   217
File = C:\tpkcs7\data\pkcs7_encryptedneg_version.der
sl@0
   218
Reason = -6 ; KErrNotSupported
sl@0
   219
IsValid = false
sl@0
   220
ContentType = 1.2.840.113549.1.7.1
sl@0
   221
ContentData = C:\tpkcs7\data\empty
sl@0
   222
Salt = C:\tpkcs7\data\empty
sl@0
   223
Iteration = 2048
sl@0
   224
Algorithm = pbeWithSHA1And40BitRC2_CBC
sl@0
   225
HashAlgorithmId = ESHA1
sl@0
   226
Password = symbian
sl@0
   227
sl@0
   228
[GOOD11_ENCRYPTEDDATA]
sl@0
   229
; This contains encrypted content data, here the content type within EncryptedContentInfo is not DATA
sl@0
   230
File = C:\tpkcs7\data\pkcs7_encryptedneg_contentType.der
sl@0
   231
Reason = -5 ; KErrNotSupported
sl@0
   232
IsValid = false
sl@0
   233
ContentType = 1.2.840.113549.1.7.1
sl@0
   234
ContentData = C:\tpkcs7\data\empty
sl@0
   235
Salt = C:\tpkcs7\data\empty
sl@0
   236
Iteration = 2048
sl@0
   237
Algorithm = pbeWithSHA1And40BitRC2_CBC
sl@0
   238
HashAlgorithmId = ESHA1
sl@0
   239
Password = symbian
sl@0
   240
sl@0
   241
[GOOD12_ENCRYPTEDDATA]
sl@0
   242
; This contains ContentInfo which does not have EncryptedData
sl@0
   243
File = C:\tpkcs7\data\notencrypteddata.der
sl@0
   244
Reason = -6 ; 
sl@0
   245
IsValid = false
sl@0
   246
ContentType = 1.2.840.113549.1.7.1
sl@0
   247
ContentData = C:\tpkcs7\data\empty
sl@0
   248
Salt = C:\tpkcs7\data\empty
sl@0
   249
Iteration = 2048
sl@0
   250
Algorithm = pbeWithSHA1And40BitRC2_CBC
sl@0
   251
HashAlgorithmId = ESHA1
sl@0
   252
Password = symbian
sl@0
   253
sl@0
   254
[GOOD13_ENCRYPTEDDATA]
sl@0
   255
; This contains encrypted content data, here the Encryptedcontent is not present
sl@0
   256
File = C:\tpkcs7\data\pkcs7_encryptedneg_noencryptedcon.der
sl@0
   257
Reason = 0 ; KErrNotSupported
sl@0
   258
IsValid = true
sl@0
   259
ContentType = 1.2.840.113549.1.7.1
sl@0
   260
ContentData = C:\tpkcs7\data\empty
sl@0
   261
Salt = C:\tpkcs7\data\pkcs7_encryptedneg_nocontsalt.der
sl@0
   262
Iteration = 2048
sl@0
   263
Algorithm = pbeWithSHA1And40BitRC2_CBC
sl@0
   264
HashAlgorithmId = ESHA1
sl@0
   265
Password = symbian
sl@0
   266
sl@0
   267
[GOOD14_ENCRYPTEDDATA]
sl@0
   268
; This contains encrypted content data, here the Version Tag is not an INTEGER
sl@0
   269
File = C:\tpkcs7\data\encrypteddata_versiontag.der
sl@0
   270
Reason = -6 ;
sl@0
   271
IsValid = false
sl@0
   272
ContentType = 1.2.840.113549.1.7.1
sl@0
   273
ContentData = C:\tpkcs7\data\empty
sl@0
   274
Salt = C:\tpkcs7\data\empty
sl@0
   275
Iteration = 2048
sl@0
   276
Algorithm = pbeWithSHA1And40BitRC2_CBC
sl@0
   277
HashAlgorithmId = ESHA1
sl@0
   278
Password = symbian
sl@0
   279
sl@0
   280
sl@0
   281
[GOODFILE_ENCRYPTEDDATA_Corrupt2]
sl@0
   282
; This contains ContentInfo which is corrupted by deleting some part of the sequence
sl@0
   283
File = C:\tpkcs7\data\pkcs7_encrypteddata_corrupt2
sl@0
   284
Reason = -6 ; KErrArgument
sl@0
   285
ContentType = 1.2.840.113549.1.7.1
sl@0
   286
ContentData = C:\tpkcs7\data\empty
sl@0
   287
Salt = C:\tpkcs7\data\empty
sl@0
   288
Iteration = 2048
sl@0
   289
Algorithm = pbeWithSHA1AndDES-CBC
sl@0
   290
HashAlgorithmId = ESHA1
sl@0
   291
sl@0
   292
[GOODFILE_DIGESTINFO]
sl@0
   293
; This contains Digest Info where the Digest Algorithm Id is SHA1
sl@0
   294
File = C:\tpkcs7\data\digestinfo_sha1.der
sl@0
   295
DigestValue = C:\tpkcs7\data\digest_sha1.der
sl@0
   296
AlgorithmId = SHA1
sl@0
   297
EncodedParams = C:\tpkcs7\data\empty
sl@0
   298
Reason = 0
sl@0
   299
sl@0
   300
sl@0
   301
[GOODFILE_DIGESTINFO1]
sl@0
   302
; This contains Digest Info where the Digest Algorithm Id is unsupported
sl@0
   303
File = C:\tpkcs7\data\digestinfo_unsupportedalg.der
sl@0
   304
Reason = -5
sl@0
   305
sl@0
   306
sl@0
   307
[GOODFILE_DIGESTINFO2]
sl@0
   308
; This contains Digest Info where the Digest Algorithm Id is MD5
sl@0
   309
File = C:\tpkcs7\data\digestinfo_md5alg.der
sl@0
   310
DigestValue = C:\tpkcs7\data\pkcs7_digest_md5alg.der
sl@0
   311
AlgorithmId = MD5
sl@0
   312
EncodedParams = C:\tpkcs7\data\empty
sl@0
   313
Reason = 0
sl@0
   314
sl@0
   315
sl@0
   316
[GOODFILE_DIGESTINFO3]
sl@0
   317
; This contains Digest Info where the Tags dont match
sl@0
   318
File = C:\tpkcs7\data\digestinfo_negalgtag.der
sl@0
   319
DigestValue = C:\tpkcs7\data\empty
sl@0
   320
AlgorithmId = SHA1
sl@0
   321
EncodedParams = C:\tpkcs7\data\empty
sl@0
   322
Reason = -6
sl@0
   323
sl@0
   324
[GOODFILE_DIGESTINFO4]
sl@0
   325
; This contains Digest Info where the Tags dont match
sl@0
   326
File = C:\tpkcs7\data\digestinfo_digest_notoctetstring.der
sl@0
   327
AlgorithmId = SHA1
sl@0
   328
EncodedParams = C:\tpkcs7\data\empty
sl@0
   329
Reason = -6
sl@0
   330
sl@0
   331
sl@0
   332
[GOODFILE_DIGESTINFO_CORRUPT]
sl@0
   333
; This contains Digest Info which does not have digest in it.
sl@0
   334
File = C:\tpkcs7\data\digestinfo_nodigest.der
sl@0
   335
AlgorithmId = ESHA1
sl@0
   336
EncodedParams = C:\tpkcs7\data\empty
sl@0
   337
Reason = -6 ; KErrArgument
sl@0
   338
sl@0
   339
sl@0
   340
;CONTENTINFO
sl@0
   341
[OOMTEST1]
sl@0
   342
File 	 = C:\tpkcs7\data\sha1and40bitrc2_cbc.der
sl@0
   343
Reason 	 = -6 ; KErrArgument
sl@0
   344
OOMTestNo = 1
sl@0
   345
sl@0
   346
;DIGESTINFO
sl@0
   347
[OOMTEST2]
sl@0
   348
File 	 = C:\tpkcs7\data\digestinfo_sha1.der
sl@0
   349
Reason 	 = -6 ; KErrArgument
sl@0
   350
OOMTestNo = 2
sl@0
   351
sl@0
   352
; ENCRYPTED DATA
sl@0
   353
[OOMTEST3]
sl@0
   354
File 	 = C:\tpkcs7\data\sha1and40bitrc2_cbc.der
sl@0
   355
Reason 	 = -6 ; KErrArgument
sl@0
   356
OOMTestNo = 3
sl@0
   357
sl@0
   358
sl@0
   359
sl@0
   360
sl@0
   361
sl@0
   362