Diff
Not logged in

Differences From Artifact [c0ca5b56ed]:

To Artifact [50e2543b9a]:


157
158
159
160
161
162
163
164

165
166
167
168
169
170
171
157
158
159
160
161
162
163

164
165
166
167
168
169
170
171







-
+







  set prefixWithSpacing [appendArgs $::embedSpacing $::embedPrefix]

  set data [readFile $fileName]
  set beginIndex [string first $prefixWithSpacing $data]

  if {$beginIndex == -1} then {
    set prefixWithSpacing $::embedPrefix
    set beginIndex [string first $prefixWithSpacing $data]
    set beginIndex [string last $prefixWithSpacing $data]
  }

  if {$beginIndex != -1} then {
    set endIndex [string first $::embedSuffix $data \
        [expr {$beginIndex + [string length $prefixWithSpacing]}]]

    if {$endIndex != -1} then {
413
414
415
416
417
418
419
420


421
422
423
424
425
426
427
413
414
415
416
417
418
419

420
421
422
423
424
425
426
427
428







-
+
+







  #
  catch {certificate_hook phase0}

  #
  # NOTE: The existing embedded certificate, if any, must be
  #       removed prior to signing the (script?) file.
  #
  if {$shouldEmbed} then {
  if {$shouldEmbed && \
      ![info exists no(removeEmbeddedCertificate)]} then {
    removeEmbeddedCertificate $fileName
  }

  #
  # NOTE: If the file is an XML file, assume it is a license
  #       certificate that we need to manually re-sign.
  #
747
748
749
750
751
752
753







754
755
756
757
758
759
760
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768







+
+
+
+
+
+
+







        "added embedded certificate to " $fileType " \"" $fileName \"]
  }

  #
  # HOOK: Script completion.
  #
  catch {certificate_hook phase3}

  #
  # NOTE: Cleanup the external embedded certificate file, if any.
  #
  if {$shouldEmbed} then {
    catch {file delete -force $certificateFile}
  }

  #
  # NOTE: Play nice and cleanup all the variables we created during the
  #       whole the signing process.
  #
  unset -nocomplain fileName vendor embed duration entityType encoding \
      privateKeyFile publicKeyFile importFirst configFileName embedSpacing \