Repository navigation
Updates repository_lib to use new securesystemslib interface (fix #412) - #422
Merged
Merged
Conversation
added 2 commits
January 27, 2017 17:07
securesystemslib.interface copies functions to generate and import keys from repository_lib. This commit replaces those function implementations with calls to securesystemslib. Removes internal _prompt and _get_password from repository_lib because they were only used by the removed function bodies and also exist in securesystemslib.interface
Updates requirements.txt and setup.py requirements to point to a securesystemslib branch that updates key generate and import functions to return a key object with the optional keyid_hash_algorithms field. This references have to be updated once lukpueh:update-import-keys is merged into securesystemslib's master.
Member
Author
|
And here is the shell snippet: >>> import tuf.repository_lib as rl
>>> rl.generate_and_write_ed25519_keypair('testkey', 'pw')
>>> rl.import_ed25519_privatekey_from_file('testkey', 'pw')
{
u'keytype': u'ed25519',
u'keyid': u'f9d7e20448545d1ecab27c2a3011ab6332e974054c83818c9550690c26a7e02a',
u'keyval': {
u'public': u'9ce9a03e4dcd3fee4baa97393783fce76fc583d2896abcb0e556208f1a894ab6',
u'private': u'19de8e160bf6d5df56715485c49a6c9683464a9388215b82ed2a0c2daa02d362'
},
u'keyid_hash_algorithms': [u'sha256', u'sha512']
}
>>> rl.import_ed25519_publickey_from_file('testkey.pub')
{
u'keytype': u'ed25519',
u'keyid': 'f9d7e20448545d1ecab27c2a3011ab6332e974054c83818c9550690c26a7e02a',
u'keyval': {
u'public': u'9ce9a03e4dcd3fee4baa97393783fce76fc583d2896abcb0e556208f1a894ab6'
},
u'keyid_hash_algorithms': [u'sha256', u'sha512']
} |
awwad
force-pushed
the
develop
branch
2 times, most recently
from
March 22, 2017 16:11
61d04eb to
40aaf93
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #412
securesystemslibcopies functions to generate and import keys fromrepository_lib.This PR replaces those function implementations with calls to
securesystemslib.interface.Removes internal
_promptand_get_passwordfromrepository_libbecause they were only used by the removed function bodies and also exist insecuresystemslib.interface.Updates
requirements.txtandsetup.pyto point to asecuresystemslibbranch that updates key generate and import functions to return a key object with the optionalkeyid_hash_algorithmsfield.ONLY MERGE AFTER lukpueh/securesystemslib/update-import-keys has merged into securesystemslib/master and above references have been updated!!
(@SantiagoTorres secretly dances the we-should-have-used-git-submodules-dance)