Overview
Comment: | Pickup upstream updates to the Harpy script signing tool. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | trunk |
Files: | files | file ages | folders |
SHA1: |
61c3716d78443482b89ca74bc68b5704 |
User & Date: | mistachkin on 2025-04-16 13:27:57 |
Other Links: | manifest | tags |
Context
2025-04-16
| ||
13:27 | Pickup upstream updates to the Harpy script signing tool. Leaf check-in: 61c3716d78 user: mistachkin tags: trunk | |
04:46 | Fix typo in the 'haveValidLoginCookie' procedure. check-in: d1f3dcdd08 user: mistachkin tags: trunk | |
Changes
Modified externals/Harpy/Tools/sign.eagle from [e2b78aa09a] to [835320f8bb].
︙ | ︙ | |||
17 18 19 20 21 22 23 | 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\]\ | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 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\] \[quantity\] \[id\]\ \[timeStamp\]" # # NOTE: Indicate to the caller, if any, that we have failed. # exit 1 } proc maybeInvokeHook { type phase } { set name [appendArgs $type _hook] if {[llength [info commands $name]] > 0} then { if {[catch {$name $phase} result] == 0} then { if {[string length $result] == 0} then {set result <none>} emitNotice [appendArgs $name " hook ok: " $result] } else { if {[string length $result] == 0} then {set result <none>} emitWarning [appendArgs $name " hook error: " $result] } } } proc emitNotice { message } { set message [string trim $message] catch {host result Ok [appendArgs $message \n]} } proc emitWarning { message } { emitNotice $message set message [string trim $message] catch {tclLog $message} } proc emitError { message } { emitWarning $message set message [string trim $message] error $message } proc maybeForceHashAlgorithm { certificate keyPair } { # # HACK: Some key pair types, e.g. DSA v1, require hard-coded # hash algorithms, e.g. SHA1. Do that now, if needed. # if {[isNonNullObjectHandle $keyPair] && \ |
︙ | ︙ | |||
177 178 179 180 181 182 183 | puts stdout [appendArgs \ "removed embedded certificate from file \"" $fileName \"] } } } | | | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | puts stdout [appendArgs \ "removed embedded certificate from file \"" $fileName \"] } } } if {[llength $argv] >= 1 && [llength $argv] <= 12} then { # # NOTE: This tool requires Eagle. # package require Eagle # # NOTE: Needed for the [getTemporaryPath] script procedure. |
︙ | ︙ | |||
362 363 364 365 366 367 368 369 370 371 372 373 374 375 | # 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} # | > > > > > > > > > > > > > > > > > > > > > > > > | 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 | # if {[llength $argv] >= 10} then { set quantity [lindex $argv 9] } else { set quantity -1; # NOTE: Unlimited. } # # NOTE: Do we want to manually override the unique Id? # if {[llength $argv] >= 11} then { set id [lindex $argv 10] } else { set id ""; # NOTE: Guid.NewGuid (?) } # # NOTE: Do we want to manually override the timestamp? # if {[llength $argv] >= 12} then { set timeStamp [object invoke \ -create -alias DateTime ParseExact \ [lindex $argv 11] yyyy-MM-ddTHH:mm:ss.fffffffK \ null {AdjustToUniversal AssumeUniversal}] set timeStamp [object invoke \ -create DateTime SpecifyKind $timeStamp Utc] } else { set timeStamp ""; # NOTE: DateTime.UtcNow (?) } # # NOTE: If the configuration file exists, load it now. # set configFileName [file join $path sign.settings.eagle] if {[file exists $configFileName]} then {source $configFileName} # |
︙ | ︙ | |||
410 411 412 413 414 415 416 | } else { set shouldEmbed false } # # HOOK: After all arguments have been parsed and processed. # | | | 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | } else { set shouldEmbed false } # # HOOK: After all arguments have been parsed and processed. # maybeInvokeHook certificate phase0 # # NOTE: The existing embedded certificate, if any, must be # removed prior to signing the (script?) file. # if {$shouldEmbed && \ ![info exists no(removeEmbeddedCertificate)]} then { |
︙ | ︙ | |||
455 456 457 458 459 460 461 | # set certificate [certificate import $fileName] maybeForceHashAlgorithm $certificate $privateKey # # HOOK: Post-certificate object creation (import). # | | | > | | | 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | # set certificate [certificate import $fileName] maybeForceHashAlgorithm $certificate $privateKey # # HOOK: Post-certificate object creation (import). # maybeInvokeHook certificate phase1 # # NOTE: Attempt to re-sign the license certificate file. Skip # setting the Id as it should already be set correctly. # if {[certificate sign -encoding $encoding \ -settimestamp -maybesettimestamp $timeStamp \ -setkey $certificate $privateKey] ne "SignedOk"} then { emitError [appendArgs \ "failed to create updated signature for " $fileType \ " \"" $fileName \"] } # # NOTE: Attempt to re-verify the license certificate file. # if {[certificate verify -encoding $encoding $certificate \ $privateKey] ne "VerifiedOk"} then { emitError [appendArgs \ "failed to verify signature for " $fileType " \"" $fileName \"] } } else { # # NOTE: Set the file type for error messages. # if {[isKeyRingFile $fileName]} then { |
︙ | ︙ | |||
510 511 512 513 514 515 516 | } maybeForceHashAlgorithm $certificate $privateKey # # HOOK: Post-certificate object creation (create). # | | | 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 | } maybeForceHashAlgorithm $certificate $privateKey # # HOOK: Post-certificate object creation (create). # maybeInvokeHook certificate phase1 # # NOTE: If the certificate vendor is available, set it. # if {[string length $vendor] > 0} then { $certificate Vendor $vendor } |
︙ | ︙ | |||
558 559 560 561 562 563 564 | # some point, be seen by the script policy callback. # $certificate EntityValue [readEntityValue $fileName] # # HOOK: Post-certificate property setup (embedded). # | | | | > > | | | | | | > > | | | | 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 | # some point, be seen by the script policy callback. # $certificate EntityValue [readEntityValue $fileName] # # HOOK: Post-certificate property setup (embedded). # maybeInvokeHook certificate phase2 # # NOTE: Attempt to sign the embedded file certificate and place # the Id, timestamp, public key token, and signature bytes # into the certificate we created above. # if {$importFirst} then { if {[certificate sign -encoding $encoding \ -setkey -hashflags {+Basic Embedded} $certificate \ $privateKey] ne "SignedOk"} then { emitError [appendArgs \ "failed to create updated embedded signature for " \ $fileType " \"" $fileName \"] } } else { if {[certificate sign -encoding $encoding \ -setid -maybesetid $id -settimestamp \ -maybesettimestamp $timeStamp -setkey \ -hashflags {+Basic Embedded} $certificate \ $privateKey] ne "SignedOk"} then { emitError [appendArgs \ "failed to create embedded signature for " $fileType \ " \"" $fileName \"] } } # # NOTE: Sanity check that the embedded file certificate we just # created validates properly. # if {[certificate verify -encoding $encoding \ -hashflags {+Basic Embedded} $certificate \ $publicKey] ne "VerifiedOk"} then { emitError [appendArgs \ "failed to verify embedded signature for " $fileType \ " \"" $fileName \"] } } else { # # HOOK: Post-certificate property setup (non-embedded). # maybeInvokeHook certificate phase2 # # NOTE: Attempt to sign the data file and place the Id, timestamp, # public key token, and signature bytes into the blank # certificate we created above. # if {$importFirst} then { if {[certificate signfile -encoding $encoding \ -setkey $certificate $privateKey \ $fileName] ne "SignedOk"} then { emitError [appendArgs \ "failed to create updated signature for " $fileType \ " \"" $fileName \"] } } else { if {[certificate signfile -encoding $encoding \ -setid -maybesetid $id -settimestamp \ -maybesettimestamp $timeStamp -setkey \ $certificate $privateKey \ $fileName] ne "SignedOk"} then { emitError [appendArgs \ "failed to create signature for " $fileType \ " \"" $fileName \"] } } # # NOTE: Sanity check that the data file certificate we just # created validates properly. # if {[certificate verifyfile -encoding $encoding \ $certificate $publicKey $fileName] ne "VerifiedOk"} then { emitError [appendArgs \ "failed to verify signature for " $fileType \ " \"" $fileName \"] } } } # |
︙ | ︙ | |||
658 659 660 661 662 663 664 | catch {file delete -force $certificateFile} # # NOTE: Export the data file certificate to disk. # if {[certificate export $certificate $certificateFile] \ ne "ExportedOk"} then { | | | | 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 | catch {file delete -force $certificateFile} # # NOTE: Export the data file certificate to disk. # if {[certificate export $certificate $certificateFile] \ ne "ExportedOk"} then { emitError [appendArgs \ "failed to export signature for " $fileType " \"" $fileName \"] } # # NOTE: Add the standard XML comment to the file. # 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. |
︙ | ︙ | |||
759 760 761 762 763 764 765 | puts stdout [appendArgs \ "added embedded certificate to " $fileType " \"" $fileName \"] } # # HOOK: Script completion. # | | | 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 | puts stdout [appendArgs \ "added embedded certificate to " $fileType " \"" $fileName \"] } # # HOOK: Script completion. # maybeInvokeHook certificate phase3 # # NOTE: Cleanup the external embedded certificate file, if any. # if {$shouldEmbed} then { catch {file delete -force $certificateFile} } |
︙ | ︙ |
Modified externals/Harpy/Tools/sign.eagle.asc from [0c12f86a5e] to [7062713373].
1 2 3 | -----BEGIN PGP SIGNATURE----- Comment: Eagle Package Repository | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | -----BEGIN PGP SIGNATURE----- Comment: Eagle Package Repository iQIzBAABCAAdFiEEw8dROIPu3TrtH+QlUCyWr0ldwtkFAmf/sC8ACgkQUCyWr0ld wtlc5BAAvEmJ2tHq24JdMAhXo8rG6z7LYRI5l/9Zk3Es3pfmz/hX43jN87SPkzw0 CLPLd3u9UC/+4sLZTfKVJ85rTFGWhOPgjSM2DRudzcY4slx9j9V9+W1fKX4a7MRl mCIwQyiFJIaO63vPZCsMlXSI2x7OpnVajfcXMwIeuI13HuTMnkmij/if8bdA/qqV GENtUQI0i4Yo0CAsyYYWU4WewuOS0YYqQUY5UqkZ60SVvavA8EO5OZ8T4BqJZ9yE 1QbtAQ8S2kjT/Or6kIWRoDkGf2jPreyo06foz3233pu4kbgUhdg7kc89F7CXUYcP c/54P5LMYZP1GmzBtuM+6t4UEBb8WDEI10vhVH3l2jNHCkOx9q24ZosNO8T+SbiK C/lU53Rm2nQkM6Hh+mnYiJ+HQXQVrl0tuXUyO/fvqJpDAVmvPHirpk2xH0lT0r7T L9varp2LCHORhoj2gpNJZFODkWPK/kCm91tkjK5zrtqsudteK9j6A7urTKjVEhy3 EJwqj6XwU87xHhu83MmkhGPTolrckpbHP86AMHkh9jREyA8tYt7Zn137CBAbxnzG asw4WZUvYCjcfUS0fYZB4uR29lwYtGmaIvDkuk7kmdL63jJlSdhECSVokylskT3W ueNtrRZYg47ECAm4eac4Z4Z6yQniTCL5drJ56ZWbW0oiYZM0l8Q= =v5/Q -----END PGP SIGNATURE----- |
Modified externals/Harpy/Tools/sign.eagle.harpy from [9b279cae82] to [b013b71a9b].
︙ | ︙ | |||
17 18 19 20 21 22 23 | 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> | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | 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>00a1aba9-8964-4af9-be97-f38e3bf4f8d3</Id> <HashAlgorithm>SHA512</HashAlgorithm> <EntityType>Script</EntityType> <TimeStamp>2025-04-16T13:26:06.7888453Z</TimeStamp> <Duration>-1.00:00:00</Duration> <Key>0x9559f6017247e3e2</Key> <Signature> j6UB5ECO9+iq7VgYWm1wTYbmFoZOfMkhNgtF31DSeE6RBl8JwsrvDhNpXCOacMTL4j4YY/obXJ5k 1LxS6/1F+NTVANFyGh0mrioXItjmfiXGhRmIujYrKqXzUv7tNGUynA8BkbnXKbq2332cmqGJ9y0K shB2Dkx+DDufrQib+wHYrCcGkaQ7rAkTeRIiS3Yd7vJUiRdlG6FD1Q2a/SFU5O7sAgmNjl/An9AH eT94UfUjHLVzXOAurz5uNzheVMS3i8YjnTHIpSq7XoJrDE0eyVv11vybrtphTGPmIfbNcwNXswaY iEsnKh4KbbU4rJHaU/ZhlM8WgGSwFOWlIFj986S/kYx8pWOrqWVkvfQtTcgQjWbbe8rCX+AlB8qm xMJQJsL0DzWHyCgUDQLPQfRpCE5y6JYy7bKfnRdYlJzCV7XE0+aLLJ87ZTjpYOJmO7MVwrzJ6mFr 0/daSYTGYVcxVHR4f5N6J6XIljoytx9h3qIMJRKC3lJEMHwqztZZb0ZLSAAdr0HPS3Cb5Ps7d30Y W/yxs4H2FtFKNNHSTJKP5UPXhVYCnSWcPJEHybAACZMXwmKY/fAZ4k+RMma03epnxL2FeJriFfol kyVHqE92MSdqoTVzXIL5aGxmet8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e31aac5ff1] to [2820582464].
1 2 3 | -----BEGIN PGP SIGNATURE----- Comment: Eagle Package Repository | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | -----BEGIN PGP SIGNATURE----- Comment: Eagle Package Repository iQIzBAABCAAdFiEEw8dROIPu3TrtH+QlUCyWr0ldwtkFAmf/sDIACgkQUCyWr0ld wtklog//XkO0gPo1I+tI8Nr+N3hJv6rwE7+c2qn9tF2hv5aSUT0uqm1Sv048VcXu ITAIR1uwmuF24OxKN9u6/JiWycLY4BAid2JDtY2d1sKLozeE/mg18K/m7Z2jt051 b76tafbbrvuEbWrNhYt8duxM+g+3q6gssw7KiTe1ZGNEf+7pFPFNewcxeBsaYDAB 3VAS/5uz3z0FgHhfOKy8blF8zZfdjw9qxwoWfNGgkePEBA3H69S5gwqauMnjPush UHoMbbhwkMq4rMgTm1iOLENv8r5yicm0NiSYzGefRaIsgUJPYk3hwq0mIWDHK2KE EnHHJNf9Da6ngB97gK16jCYdEsPq+2lqacDnRRiQN4B8SadGYcGejOfKQvHyF1hP FQi0+24zCmU3s8kf1CusCKMgZyp/vG5iGV4ruxuKjAGAzdb7e1X1MnEMgAx+D7mC nccjQ0W8haWM2/Slt0/QncgDqbhip1UpvrTrcXWy9+Qto4+A4BzPkQxS11H0tHQ4 /DKGugrIo3kbSztMbiNCriIsbPrHdPmoDxH2owc2Vxle4r73IEs2d8TWmm0jtfgm y4n1zZuV1yQXCm98sD0GZ3vVXWFWwDGdxgk7OaCKKZUHCKghBLnrqfRrx6P8mP7W 1FRr0aYhcJvBBU01PLMxFNKJrw5MOvLUQZg4X/aProFUnl1irrM= =EahN -----END PGP SIGNATURE----- |