733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
|
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
|
-
-
-
-
-
-
+
-
-
-
-
+
-
-
-
-
+
-
-
-
-
+
-
-
-
-
-
-
|
if {[certificate warning -type Script $certificateFile] \
ne "WarningOk"} then {
emitError [appendArgs \
"failed to add warning for " $fileType " \"" $fileName \"]
}
#
# HACK: Read the certificate file data into memory, fix the
# formatting how we want it, and then re-write the modified
# data back out to the same certificate file.
#
set data [readCertificateFile $certificateFile]
# HACK: Reformat some of the spacing in the certificate file to make
set xmlNs xmlns=\"https://eagle.to/2011/harpy\"
set xmlNsXsi xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
set xmlNsXsd xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
# it easier to read.
set data [string map [list \
[appendArgs $xmlNsXsd " " $xmlNsXsi " " $xmlNs] \
[appendArgs $xmlNs " " $xmlNsXsi " " $xmlNsXsd]] $data]
#
set data [string map [list \
[appendArgs $xmlNsXsi " " $xmlNsXsd " " $xmlNs] \
[appendArgs $xmlNs " " $xmlNsXsi " " $xmlNsXsd]] $data]
package require Harpy.Test; reformatCertificateSpacing $certificateFile
set spaces " "
set data [string map [list \
"\" xmlns" [appendArgs \" [info newline] $spaces xmlns]] $data]
writeCertificateFile $certificateFile $data
#
# NOTE: Show that we signed it.
#
if {$importFirst} then {
puts stdout [appendArgs \
"re-signed " $fileType " \"" $fileName "\" (as \"" $entityType \
|