Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cmsc818fall2023projects
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Keleher
cmsc818fall2023projects
Commits
c9b61148
Commit
c9b61148
authored
1 year ago
by
Peter J. Keleher
Browse files
Options
Downloads
Patches
Plain Diff
auto
parent
1830d664
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
p3.md
+35
-5
35 additions, 5 deletions
p3.md
with
35 additions
and
5 deletions
p3.md
+
35
−
5
View file @
c9b61148
...
...
@@ -284,8 +284,7 @@ our store. Your code binding creation code, therefore, should also:
### New command: `dump`
Recall we can not view the binding we inserted using
`desc`
, as it
will automatically
resolve to the binding's value.
will automatically resolve to the binding's value.
Create a new function
`dump`
.
`dump`
is identical to
`desc`
except that it
retrieves blobs in a
*raw*
mode: returning the raw binding text rather than resolving
...
...
@@ -305,12 +304,43 @@ If `raw` is `true`, the binding itself should be returned.
io:~/818/projects/p3/solution> go run blob.go dump status
{
"Name": "status",
"Value": "sha256_32_7WT7PVM6OMK5LMKZRTBRO3L4ECCFGSZI5OL7VV6ZYTG3QUDMDIYA====",
"PublicKeyHash": "sha256_32_MC5S74TZMM7HG7ZK25QMTA5SHBCFEBUGZQF2IX24NSRRL5NWOC3A===="
"Value": "sha256_32_55IEZUD6FH4FHUP5YCGXIP7SDGHZDY2RCKEV3EU45JUBLABVOZUA====",
"Date": "Sat Sep 30 21:42:21 EDT 2023",
"PublicKeyHash": "sha256_32_VDFWNRKFDLDLFMN52A54NSYPPVKR2EXMUFGREHKNPGGCLIMY3SWQ===="
,
"signature": "
BYPHD3JGZLGJVWGEJHDU5KN7G6JDKU2GQKQ575DPAMDCR77B6ZBMYNEABVOSLGJVKXTXNK7NYNAKMTRKXJ3GW5YJUUVAATNDVF7XBFH27H4EZPDQULQRC4PFZABBJQIT7FFWX4E73VHNQZSJRVLYM3LB243FJD46532JNK243HKIPKNUFGUB2PLENV2AD72HV7CR3ORRTBRHFRRDSLYOCB7M7LXTFG26FXGM2VG3ZKMPPXO7MII7FIWOIN77D75D5IMBJ6RMM3KQWP3TPPEVMECOXEMI7ITKA3QKWWLI7KCR2TXHWTEOU3YY2TE4N7FHR7TALCERFPPTH5LDRFKB3YHZLCQATMBDFSETCWV63TVXWDCB2ZQTMLYFW4LTBOOUSMVGVYMXGYBUJZMYKRWYJADZCI
======"}
"signature": "
MFPBBVFRDCZHGBW3OIPZ2WUX43K7HIF23CVAHKFW75BSWBKAXJETNKAMYU6GKZ53N2KWYJ76K56QTH2EZMA46D6Y6QB3QFKEFEWWBNIQBVL63LIZQEV4SBXONJCT3YNAL7GOE5BPCQHMAC7ROGQ7AW3NUEMWLM5S65UIWWOJ22GIOYQNJOUR6FVBI3X5X7I55TCDI3QP2NREQG77B3YNBD6ZQSBLBSYYYJARYMA5DGBFGCO7ZXUEFXKGNR75ZE6HOZPD7VKLQ7S76WDZI7H6DVD56NA5DZH5HNUA7E4ZDYSYACDTKWPREOS3RJMICQ6GAJ3HJ2WYYKJJEZ4EXAD4LSV4KYMVUAX3LED2OOYRVYHDN5C6BN73GRXN4A5UKR5QGZJ5JCTOW2XOEUFYTTGVUAL6VY
======"}
```
### New command: `putraw`
You can check your verification by using the following public key. Get
the public key hash of the actual key file contents, not the recipe
pointing to it, but defining a new command
`putraw <filename>`
that
send a blob to the remote store, returns, and prints out the
resulting hash.
```
io:~/818/projects/p3/solution> cat key.public
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEAsIYRztz29n63uOAKjnvlmysxfu4YjOq4erx6FsAdHLp+8BLF3YjX
WbJB9IcSsik9oRQ9+Abv9jdc7qHz/gTmdxiBx55isbGWAjLeADSxorumQVqJqaXi
/PNATUCOozdOEzDjxv/OXxOc4uZqjj7i+AbncPFTt22WuD40U0UEKo8Uv4JJtryS
bYvvXTO2R6UEMusxhz2eKA1BdqIl4EEeNhjUpXEk9P6fJ6QXc2dm7sOP42gfhoL5
tLpXM9quAkpVv/L1vwIVpBZTgtsFHfHz06p7ST77+E6lua10km9EVcdfBlwo0uvf
7GAP/V9jBDVUrTfBlZIrKksm4sv27pmt0wIDAQAB
-----END RSA PUBLIC KEY-----
```
**This is not what we want**
, as this hash is of the public key file's recipe:
```
io:~/818/projects/p3/solution> go run cli.go put key.public
sha256_32_JUWSBINGL4PNJIKTUOSCJDXBHVBSDZYORGYTCCA52MP7W7QFZGIA====
```
**This is what we want:**
the hash of the data in the key file
itself:
```
io:~/818/projects/p3/solution> go run cli.go putraw key.public
sha256_32_VDFWNRKFDLDLFMN52A54NSYPPVKR2EXMUFGREHKNPGGCLIMY3SWQ====
```
Note that this matches the public key hash in the status binding above:
### Updating a binding
A binding is updated by replacing it with a new binding using the same name.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment