Changes On Branch 90d6512a4d1c5829
Not logged in

Changes In Branch pkgdSelfUpdate Through [90d6512a4d] Excluding Merge-Ins

This is equivalent to a diff from 7e7cba65fa to 90d6512a4d

2016-08-19
20:13
Refactor and add code to permit the package repository and downloader clients to be self-updated. check-in: 090817ba13 user: mistachkin tags: trunk
19:59
Fix some comments. check-in: ff701ef80a user: mistachkin tags: pkgdSelfUpdate
19:56
Fix PGP signature checking. check-in: 90d6512a4d user: mistachkin tags: pkgdSelfUpdate
19:37
When downloading for a self-update, overwrite existing files. check-in: 09a7063c6e user: mistachkin tags: pkgdSelfUpdate
04:51
Refactoring work-in-progress on the package downloader client. check-in: 1b8b52e27d user: mistachkin tags: pkgdSelfUpdate
02:55
Move all package client files into a '1.0' sub-directory. check-in: 7e7cba65fa user: mistachkin tags: trunk
02:48
Remove the duplicated 'maybeReadSettingsFile' procedure as it is no longer necessary. check-in: 89022f2b30 user: mistachkin tags: trunk

Modified client/1.0/pkgd.eagle from [39534dc0c9] to [297a91d7bb].

21
22
23
24
25
26
27
28











29
30
31
32
33
34
35
21
22
23
24
25
26
27

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45







-
+
+
+
+
+
+
+
+
+
+
+







#
namespace eval ::PackageDownloader {
  #
  # NOTE: This procedure sets up the default values for all configuration
  #       parameters used by the package downloader client.  There are no
  #       arguments.
  #
  proc setupDownloadVars {} {
  proc setupDownloadVars { script } {
    #
    # NOTE: What is the fully qualified path to the directory containing the
    #       package downloader client?
    #
    variable clientDirectory

    if {![info exists clientDirectory]} then {
      set clientDirectory [file dirname $script]
    }

    #
    # NOTE: Prevent progress messages from being displayed while downloading
    #       from the repository, etc?  By default, this is enabled.
    #
    variable quiet; # DEFAULT: true

    if {![info exists quiet]} then {
54
55
56
57
58
59
60
61

62
63
64












65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
















































80
81
82
83
84
85
86
64
65
66
67
68
69
70

71
72


73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154







-
+

-
-
+
+
+
+
+
+
+
+
+
+
+
+















+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







    if {![info exists downloadUri]} then {
      set downloadUri {${baseUri}?download&ci=trunk&filename=${fileName}}
    }

    #
    # NOTE: The root directory where any persistent packages will be saved.
    #
    variable persistentDirectory; # DEFAULT: [getPersistentRootDirectory]
    variable persistentRootDirectory; # DEFAULT: [getPersistentRootDirectory]

    if {![info exists persistentDirectory]} then {
      set persistentDirectory [getPersistentRootDirectory]
    if {![info exists persistentRootDirectory]} then {
      set persistentRootDirectory [getPersistentRootDirectory]
    }

    #
    # NOTE: The root directory where any temporary packages will be written.
    #
    variable temporaryRootDirectory; # DEFAULT: [getFileTempDirectory PKGD_TEMP]

    if {![info exists temporaryRootDirectory]} then {
      set temporaryRootDirectory \
          [::PackageRepository::getFileTempDirectory PKGD_TEMP]
    }
  }

  #
  # NOTE: This procedure returns the root directory where any packages that
  #       are downloaded should be saved to permanent storage for subsequent
  #       use.  There are no arguments.
  #
  proc getPersistentRootDirectory {} {
    #
    # NOTE: Return a directory parallel to the one containing the library
    #       directory.
    #
    return [file join [file dirname [info library]] pkgd]
  }

  #
  # NOTE: This procedure returns non-zero if the specified file seems to be
  #       an OpenPGP signature file.  The fileName argument is the name of
  #       the file to check, which may or may not exist.  The nameOnly
  #       argument should be non-zero to ignore the contents of the file.
  #
  proc isPgpSignatureFileName { fileName nameOnly } {
    if {[string length $fileName] == 0} then {
      return false
    }

    set extension [file extension $fileName]

    if {$extension eq ".asc"} then {
      if {!$nameOnly && [file exists $fileName]} then {
        return [::PackageRepository::isPgpSignature [readFile $fileName]]
      } else {
        return true
      }
    } else {
      return false
    }
  }

  #
  # NOTE: This procedure returns non-zero if the specified file seems to be
  #       a Harpy script certificate file.  The fileName argument is the name
  #       of the file to check, which may or may not exist.  The nameOnly
  #       argument should be non-zero to ignore the contents of the file.
  #
  proc isHarpyCertificateFileName { fileName nameOnly } {
    if {[string length $fileName] == 0} then {
      return false
    }

    set extension [file extension $fileName]

    if {$extension eq ".harpy"} then {
      if {!$nameOnly && [file exists $fileName]} then {
        return [::PackageRepository::isHarpyCertificate [readFile $fileName]]
      } else {
        return true
      }
    } else {
      return false
    }
  }

  #
  # NOTE: This procedure adds a directory to the auto-path of the specified
  #       language (i.e. native Tcl or Eagle).  The directory will not be
  #       added if it is already present.  The language argument must be the
  #       literal string "eagle" or the literal string "tcl".  The directory
  #       argument is the fully qualified path for the directory to add to
123
124
125
126
127
128
129
130
























































131
132
133
134
135
136
137
138
139
140
141
142
143











144
145
146
147
148
149
150
151

152
153
154




155
156
157
158
159
160
161
162
163
164
165
166




167
168

169
170
171

172
173

174
175
176
177
178




179
180
181
182



183
184
185

186
187
188
189
190

191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207


208





209
210

211
212
213




214
215
216

217
218

219
220
221

222
223
224
225




226
227
228



229
230
231
232



233
234
235
236






237
238
239


240
241

242
243
244
245

246
247
248
249
250
251

252
253
254
255
256









257
258
259
260
261
262
263
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256











257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274

275



276
277
278
279
280
281
282
283
284
285
286
287
288



289
290
291
292
293

294

295

296


297

298



299
300
301
302




303
304
305



306


307
308

309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324


325
326
327
328
329
330
331
332
333

334
335


336
337
338
339
340
341
342
343
344

345



346
347



348
349
350
351



352
353
354
355



356
357
358
359



360
361
362
363
364
365
366


367
368
369

370




371

372
373



374





375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390








+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+


-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+







-
+
-
-
-
+
+
+
+









-
-
-
+
+
+
+

-
+
-

-
+
-
-
+
-

-
-
-
+
+
+
+
-
-
-
-
+
+
+
-
-
-
+
-
-


-
+















-
-
+
+

+
+
+
+
+

-
+

-
-
+
+
+
+



+

-
+
-
-
-
+

-
-
-
+
+
+
+
-
-
-
+
+
+

-
-
-
+
+
+

-
-
-
+
+
+
+
+
+

-
-
+
+

-
+
-
-
-
-
+
-


-
-
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+







        }
      }
    } else {
      error "unsupported language, no idea how to modify auto-path"
    }
  }

  #
  # NOTE: This procedure downloads a single file from the package file server,
  #       writing its contents to the specified local file name.  It can also
  #       verify the PGP signatures.  When a PGP signature file is
  #       downloaded, this procedure assumes the corresponding data file was
  #       already downloaded (i.e. since OpenPGP needs both to perform the
  #       signature checks).  The language argument must be one of the
  #       literal strings "eagle", "tcl", or "client".  The version argument
  #       must be one of the literal strings "8.4", "8.5", or "8.6" when the
  #       language is "tcl" -OR- the literal string "1.0" when the language
  #       is either "eagle" or "client".  The fileName argument is a file
  #       name relative to the language and version-specific directory on the
  #       package file server.  The localFileName argument is the file name
  #       where the downloaded file should be written.  The usePgp argument
  #       should be non-zero when an OpenPGP signature file needs to be
  #       downloaded and verified for the downloaded file.
  #
  proc downloadOneFile { language version fileName localFileName usePgp } {
    variable baseUri
    variable downloadUri
    variable quiet

    #
    # NOTE: First, build the full relative file name to download from
    #       the remote package repository.
    #
    set fileName [file join $language $version $fileName]
    set uri [subst $downloadUri]

    #
    # NOTE: Then, in one step, download the file from the package file
    #       server and write it to the specified local file.
    #
    if {[isEagle]} then {
      writeFile $localFileName [interp readorgetscriptfile -- "" $uri]
    } else {
      writeFile $localFileName \
          [::PackageRepository::getFileViaHttp $uri 10 stdout $quiet]
    }

    #
    # NOTE: Is use of OpenPGP for signature verification enabled?  Also,
    #       did we just download an OpenPGP signature file?
    #
    if {$usePgp && [isPgpSignatureFileName $localFileName true]} then {
      #
      # NOTE: Attempt to verify the OpenPGP signature.  If this fails,
      #       an error is raised.
      #
      if {![::PackageRepository::verifyPgpSignature $localFileName]} then {
        error [appendArgs \
            "bad PGP signature \"" $localFileName \"]
      }
    }
  }

  #
  # NOTE: This procedure attempts to download a list of files, optionally
  #       persistening them for subsequent uses by the target language.
  #       The language argument must be the literal string "eagle" or the
  #       literal string "tcl".  The version argument must be the literal
  #       string "8.4", "8.5", or "8.6" when the language is "tcl" -OR-
  #       the literal string "1.0" when the language is "eagle".  The
  #       fileNames argument must be a well-formed list of file names to
  #       download, each one relative to the language/version-specific
  #       directory on the package file server.  The persistent argument
  #       should be non-zero if the downloaded files should be saved to
  #       permanent storage for subsequent use.  The usePgp argument
  #       should be non-zero when an OpenPGP signature file needs to be
  #       downloaded and verified for each downloaded file.  The
  #       The language argument must be one of the literal strings "eagle",
  #       "tcl", or "client".  The version argument must be one of the
  #       literal strings "8.4", "8.5", or "8.6" when the language is "tcl"
  #       -OR- the literal string "1.0" when the language is either "eagle"
  #       or "client".  The fileNames argument must be a well-formed list
  #       of file names to download, each one relative to the language and
  #       version-specific directory on the package file server.  The
  #       persistent argument should be non-zero if the downloaded files
  #       should be saved to permanent storage for subsequent use.  The
  #       usePgp argument should be non-zero when an OpenPGP signature file
  #       needs to be downloaded and verified for each downloaded file.  The
  #       useAutoPath argument should be non-zero to modify the auto-path
  #       to include the temporary or persistent directories containing
  #       the downloaded files.
  #
  # <public>
  proc downloadFiles {
          language version fileNames persistent usePgp useAutoPath } {
    variable baseUri
    variable clientDirectory
    variable downloadUri
    variable persistentDirectory
    variable quiet
    variable persistentRootDirectory
    variable temporaryRootDirectory

    set client false

    if {[string length $language] == 0 || $language eq "eagle"} then {
      if {$version ne "1.0"} then {
        error "unsupported Eagle version"
      }
    } elseif {$language eq "tcl"} then {
      if {$version ne "8.4" && $version ne "8.5" && $version ne "8.6"} then {
        error "unsupported Tcl version"
      }
    } else {
      error "unsupported language"
    }
    } elseif {$language eq "client"} then {
      if {$version ne "1.0"} then {
        error "unsupported client version"
      }

    if {$persistent} then {
      set client true
      set downloadRootDirectory $persistentDirectory
    } else {
      set directoryNameOnly [appendArgs \
      error "unsupported language"
          pkgd_ [string trim [pid] -] _ [string trim [clock seconds] -]]

    }
      global env

      if {[info exists env(PKGD_TEMP)]} then {
        set downloadRootDirectory $env(PKGD_TEMP)
      } elseif {[info exists env(TEMP)]} then {
    set temporaryDirectory [file join $temporaryRootDirectory \
        [appendArgs pkgd_ [string trim [pid] -] _ [string trim \
        [clock seconds] -]]]

        set downloadRootDirectory $env(TEMP)
      } elseif {[info exists env(TMP)]} then {
        set downloadRootDirectory $env(TMP)
      } else {
    if {$client} then {
      set persistentDirectory $clientDirectory
    } else {
        error "please set PKGD_TEMP (via environment) to temporary directory"
      }

      set persistentDirectory $persistentRootDirectory
      set downloadRootDirectory [file join \
          $downloadRootDirectory $directoryNameOnly]
    }

    set downloadDirectories [list]
    set downloadedFileNames [list]

    foreach fileName $fileNames {
      if {[string length $fileName] == 0 || \
          [file pathtype $fileName] ne "relative"} then {
        error [appendArgs \
            "bad file name \"" $fileName "\", not relative"]
      }

      set directoryParts [file split [file dirname $fileName]]

      if {[llength $directoryParts] == 0} then {
        error [appendArgs \
            "bad file name \"" $fileName "\", no directory parts"]
      }

      set downloadDirectory [file normalize [eval file join \
          [list $downloadRootDirectory] $directoryParts]]
      set directory(temporary) [file normalize [eval \
          file join [list $temporaryDirectory] $directoryParts]]

      set directory(persistent) [file normalize [eval \
          file join [list $persistentDirectory] $directoryParts]]

      set fileNameOnly [file tail $fileName]

      set downloadFileName [file normalize [file join \
          $downloadDirectory [file tail $fileName]]]
          $directory(temporary) $fileNameOnly]]

      if {!$persistent} then {
        catch {file delete $downloadFileName}
      if {[file exists $downloadFileName]} then {
        error [appendArgs \
            "temporary file name \"" $downloadFileName \
            "\" already exists"]
      }

      file mkdir [file dirname $downloadFileName]
      downloadOneFile $language $version $fileName $downloadFileName $usePgp

      set savedFileName $fileName
      lappend downloadedFileNames [list \
      set fileName [file join $language $version $fileName]
      set uri [subst $downloadUri]
      set fileName $savedFileName
          $fileNameOnly $directory(temporary) $directory(persistent)]

      if {[isEagle]} then {
        writeFile $downloadFileName \
            [interp readorgetscriptfile -- "" $uri]
      if {$usePgp && ![isPgpSignatureFileName $downloadFileName true]} then {
        downloadOneFile $language $version [appendArgs $fileName .asc] \
            [appendArgs $downloadFileName .asc] $usePgp

      } else {
        writeFile $downloadFileName \
            [::PackageRepository::getFileViaHttp $uri 10 stdout $quiet]
        lappend downloadedFileNames [list \
            [appendArgs $fileNameOnly .asc] $directory(temporary) \
            $directory(persistent)]
      }

      if {$usePgp} then {
        set downloadSignatureFileName [appendArgs $downloadFileName .asc]
    }

    set downloadDirectories [list]

        set savedFileName $fileName
        set fileName [file join \
            $language $version [appendArgs $fileName .asc]]
    foreach downloadedFileName $downloadedFileNames {
      set directory(temporary) [lindex $downloadedFileName 1]

      if {$persistent} then {
        set fileNameOnly [lindex $downloadedFileName 0]
        set directory(persistent) [lindex $downloadedFileName 2]

        set uri [subst $downloadUri]
        set fileName $savedFileName
        file mkdir $directory(persistent)
        set command [list file copy]

        if {[isEagle]} then {
        if {$client} then {
          writeFile $downloadSignatureFileName \
              [interp readorgetscriptfile -- "" $uri]
        } else {
          writeFile $downloadSignatureFileName \
          lappend command -force
              [::PackageRepository::getFileViaHttp $uri 10 stdout $quiet]
        }

        if {![::PackageRepository::verifyPgpSignature \
            $downloadSignatureFileName]} then {
          error [appendArgs \
        lappend command --
              "bad PGP signature \"" $downloadSignatureFileName \"]
        }
      }

      lappend downloadDirectories $downloadDirectory
        lappend command [file join $directory(temporary) $fileNameOnly]
        lappend command [file join $directory(persistent) $fileNameOnly]

        eval $command

        lappend downloadDirectories $directory(persistent)
      } else {
        lappend downloadDirectories $directory(temporary)
      }
    }

    set downloadDirectories [lsort -unique $downloadDirectories]

    if {$useAutoPath} then {
      foreach downloadDirectory $downloadDirectories {
        addToAutoPath $language $downloadDirectory
277
278
279
280
281
282
283
284

285
286
287
288
289
290
291
404
405
406
407
408
409
410

411
412
413
414
415
416
417
418







-
+







  #       one or more of the variable setup in the next step.
  #
  ::PackageRepository::maybeReadSettingsFile [info script]

  #
  # NOTE: Setup the variables, within this namespace, used by this script.
  #
  setupDownloadVars
  setupDownloadVars [info script]

  #
  # NOTE: Provide the package to the interpreter.
  #
  package provide Eagle.Package.Downloader \
    [expr {[isEagle] ? [info engine PatchLevel] : "1.0"}]
}

Modified client/1.0/pkgd.eagle.harpy from [d275cf6011] to [4ccc75c948].

17
18
19
20
21
22
23
24

25
26
27

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48


















49
50
17
18
19
20
21
22
23

24
25
26

27
28
29
30


















31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50







-
+


-
+



-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+


    THE ASSOCIATED SOFTWARE MAY NOT WORK PROPERLY IF THIS FILE IS ALTERED.
-->
<Certificate xmlns="https://eagle.to/2011/harpy"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Protocol>None</Protocol>
  <Vendor>Mistachkin Systems</Vendor>
  <Id>53a7ee35-d269-407b-9849-062af5a64876</Id>
  <Id>773aaed9-81ab-4f37-a8b5-33385149bc2e</Id>
  <HashAlgorithm>SHA512</HashAlgorithm>
  <EntityType>Script</EntityType>
  <TimeStamp>2016-08-19T02:47:10.2744609Z</TimeStamp>
  <TimeStamp>2016-08-19T19:54:13.8457500Z</TimeStamp>
  <Duration>-1.00:00:00</Duration>
  <Key>0x2c322765603b5278</Key>
  <Signature>
    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
  </Signature>
</Certificate>

Modified client/1.0/pkgr.eagle from [9dc3f0e9e9] to [25667f2c0a].

95
96
97
98
99
100
101
102



103
104

105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120

121
122
123
124
125






















126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

144
145
146
147
148
149
150
151
152
153
154
95
96
97
98
99
100
101

102
103
104
105

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159








160




161
162
163
164
165
166
167







-
+
+
+

-
+















-
+





+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+










-
-
-
-
-
-
-
-
+
-
-
-
-







  #
  # NOTE: This procedure returns non-zero if the specified string value
  #       looks like a Harpy (script) certificate.  The value argument
  #       is the string to check.
  #
  # <public>
  proc isHarpyCertificate { value } {
    if {[string length $value] == 0 || [string first [string trim {
    if {[string length $value] == 0 || ([string first [string trim {
      <?xml version="1.0" encoding="utf-8"?>
    }] $value] == 0 && [string first [string trim {
      <Certificate xmlns="https://eagle.to/2011/harpy"
    }] $value] != -1} then {
    }] $value] != -1)} then {
      return true
    } else {
      return false
    }
  }

  #
  # NOTE: This procedure returns non-zero if the specified string value
  #       looks like a PGP signature.  The value argument is the string
  #       to check.
  #
  # <public>
  proc isPgpSignature { value } {
    if {[string length $value] == 0 || [string first [string trim {
      -----BEGIN PGP SIGNATURE-----
    }] $value] != -1} then {
    }] $value] == 0} then {
      return true
    } else {
      return false
    }
  }

  #
  # NOTE: This procedure returns the fully qualified name of the directory
  #       where temporary files should be written.  The envVarName argument
  #       is an optional extra environment variable to check (first).
  #
  proc getFileTempDirectory { {envVarName ""} } {
    global env

    if {[string length $envVarName] > 0 && \
        [info exists env($envVarName)]} then {
      return $env($envVarName)
    } elseif {[info exists env(TEMP)]} then {
      return $env(TEMP)
    } elseif {[info exists env(TMP)]} then {
      return $env(TMP)
    } else {
      error [appendArgs \
          "please set " $envVarName \
          " (via environment) to temporary directory"]
    }
  }

  #
  # NOTE: This procedure returns a unique temporary file name.  A script
  #       error is raised if this task cannot be accomplished.  There are
  #       no arguments.
  #
  proc getFileTempName {} {
    if {[isEagle]} then {
      return [file tempname]
    } else {
      global env

      if {[info exists env(PKGR_TEMP)]} then {
        set directory $env(PKGD_TEMP)
      } elseif {[info exists env(TEMP)]} then {
        set directory $env(TEMP)
      } elseif {[info exists env(TMP)]} then {
        set directory $env(TMP)
      set directory [getFileTempDirectory PKGR_TEMP]
      } else {
        error "please set PKGR_TEMP (via environment) to temporary directory"
      }

      set counter [expr {[pid] ^ int(rand() * 0xFFFF)}]

      while {1} {
        set fileNameOnly [format tcl%04X.tmp $counter]
        set fileName [file join $directory $fileNameOnly]

        if {![file exists $fileName]} then {

Modified client/1.0/pkgr.eagle.harpy from [8c0f96195a] to [a401a14e54].

17
18
19
20
21
22
23
24

25
26
27

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48


















49
50
17
18
19
20
21
22
23

24
25
26

27
28
29
30


















31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50







-
+


-
+



-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+


    THE ASSOCIATED SOFTWARE MAY NOT WORK PROPERLY IF THIS FILE IS ALTERED.
-->
<Certificate xmlns="https://eagle.to/2011/harpy"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Protocol>None</Protocol>
  <Vendor>Mistachkin Systems</Vendor>
  <Id>88d42a28-1e95-4dd7-aaf9-11bb262f10d0</Id>
  <Id>f958f841-28ec-493a-9f30-fc7c5ec9e126</Id>
  <HashAlgorithm>SHA512</HashAlgorithm>
  <EntityType>Script</EntityType>
  <TimeStamp>2016-08-19T02:47:51.4043437Z</TimeStamp>
  <TimeStamp>2016-08-19T19:55:14.6953594Z</TimeStamp>
  <Duration>-1.00:00:00</Duration>
  <Key>0x2c322765603b5278</Key>
  <Signature>
    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
  </Signature>
</Certificate>