Skip to content

Conversation

oncilla
Copy link
Contributor

@oncilla oncilla commented Aug 28, 2019

This PR adds the capability to sign prototype TRCs to the spki tool.

contributes to #2983


This change is Reviewable

@oncilla oncilla added c/tooling SCION network tools c/CPPKI SCION Control-plane PKI labels Aug 28, 2019
@oncilla oncilla added this to the Q3S3 milestone Aug 28, 2019
@oncilla oncilla requested a review from lukedirtwalker August 28, 2019 10:29
Copy link
Collaborator

@lukedirtwalker lukedirtwalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 5 of 5 files at r1.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @oncilla)


go/tools/scion-pki/internal/v2/trc/sign.go, line 109 at r1 (raw file):

genSignatures

wouldn't sign or signTRC be more appropriate?


go/tools/scion-pki/internal/v2/trc/sign.go, line 113 at r1 (raw file):

	signatures := make(map[trc.Protected]trc.Signature)
	// FIXME(roosd): Here votes should be cast in updates.

I guess that refers to the fact that you do nothing with t.Votes ?


go/tools/scion-pki/internal/v2/trc/util.go, line 65 at r1 (raw file):

	})
	sigs := make([]trc.Signature, len(keys))
	for i, key := range keys {

I usually prefer the non-indexed loop for consistency and because it works "always" no matter how sigs is defined.

	sigs := make([]trc.Signature, 0, len(keys))
	for _, key := range keys {
		sigs = append(sigs, signatures[key])
	}

@oncilla oncilla force-pushed the pub-spki-sign-trc branch from 023a89f to acad7aa Compare August 29, 2019 12:02
Copy link
Contributor Author

@oncilla oncilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 3 of 5 files reviewed, 2 unresolved discussions (waiting on @lukedirtwalker)


go/tools/scion-pki/internal/v2/trc/sign.go, line 109 at r1 (raw file):

Previously, lukedirtwalker (Lukas Vogel) wrote…
genSignatures

wouldn't sign or signTRC be more appropriate?

Done.


go/tools/scion-pki/internal/v2/trc/sign.go, line 113 at r1 (raw file):

Previously, lukedirtwalker (Lukas Vogel) wrote…

I guess that refers to the fact that you do nothing with t.Votes ?

Yes. But since we do not support TRC updates yet, this is fine :)
A base TRC does not have votes.

The issue with TRC updates is, that we do not have properly defined how to do key management yet.
Key generation, update generation will largely depend on that.

My goal is to have some working CP-PKI with base TRCs + certificates and then implement the trust store.
Adding TRC updates can be done when key management is resolved.

Copy link
Collaborator

@lukedirtwalker lukedirtwalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

This PR adds the capability to sign prototype TRCs to the spki tool.

contributes to scionproto#2983
@oncilla oncilla force-pushed the pub-spki-sign-trc branch from acad7aa to ef970af Compare August 30, 2019 07:33
@oncilla oncilla merged commit 3521383 into scionproto:master Aug 30, 2019
@oncilla oncilla deleted the pub-spki-sign-trc branch August 30, 2019 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/CPPKI SCION Control-plane PKI c/tooling SCION network tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants