︙ | | |
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
-
+
|
proc usage { error } {
if {[string length $error] > 0} then {puts stdout $error}
puts stdout "usage:\
[file tail [getShellExecutableName]]\
[file tail [info script]] <fileName> \[vendor\] \[embed\]\
\[duration\] \[entityType\] \[encoding\] \[publicKeyFile\]\
\[privateKeyFile\] \[importFirst\]"
\[privateKeyFile\] \[importFirst\] \[quantity\]"
#
# NOTE: Indicate to the caller, if any, that we have failed.
#
exit 1
}
|
︙ | | |
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
-
+
|
puts stdout [appendArgs \
"removed embedded certificate from file \"" $fileName \"]
}
}
}
if {[llength $argv] >= 1 && [llength $argv] <= 9} then {
if {[llength $argv] >= 1 && [llength $argv] <= 10} then {
#
# NOTE: This tool requires Eagle.
#
package require Eagle
#
# NOTE: Needed for the [getTemporaryPath] script procedure.
|
︙ | | |
350
351
352
353
354
355
356
357
358
359
360
361
362
363
|
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
|
+
+
+
+
+
+
+
+
+
|
#
if {[llength $argv] >= 9} then {
set importFirst [lindex $argv 8]
} else {
set importFirst false; # TODO: Good default?
}
#
# NOTE: Do we want to limit the number of uses (quantity)?
#
if {[llength $argv] >= 10} then {
set quantity [lindex $argv 9]
} else {
set quantity -1; # NOTE: Unlimited.
}
#
# NOTE: If the configuration file exists, load it now.
#
set configFileName [file join $path sign.settings.eagle]
if {[file exists $configFileName]} then {source $configFileName}
#
|
︙ | | |
511
512
513
514
515
516
517
518
519
520
521
522
523
524
|
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
|
+
+
+
+
+
+
+
+
+
+
|
#
# NOTE: Always set the entity type for new certificates since
# the policy code now checks for this. By default,
# non-license certificates are set to the "Script" entity
# type.
#
$certificate EntityType $entityType
#
# NOTE: Maybe set the quantity for new certificates since the
# policy code now checks for this. By default, non-license
# certificates have unlimited uses.
#
if {$quantity > 0} then {
$certificate Quantity $quantity
$certificate Restrictions L; # LimitedQuantity
}
#
# NOTE: When embedding, special handling is required when signing
# the certificate.
#
if {$shouldEmbed} then {
#
|
︙ | | |