Skip to content

Conversation

oncilla
Copy link
Contributor

@oncilla oncilla commented Sep 11, 2019

This PR adds TRC signature combination.
Also, the gen call executes the 3 phases in one call.


This change is Reviewable

@oncilla oncilla added c/tooling SCION network tools c/CPPKI SCION Control-plane PKI labels Sep 11, 2019
@oncilla oncilla added this to the Q3S3 milestone Sep 11, 2019
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, 2 unresolved discussions (waiting on @oncilla)


go/tools/scion-pki/internal/v2/trcs/combine.go, line 67 at r1 (raw file):

}

func loadUniqueSignatures(isd addr.ISD, ver scrypto.Version, encoded trc.Encoded) (

uff, I think line splits like this are weird to me. I would split it after the version argument.


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

		return common.NewBasicError("unable to marshal signed TRC", err)
	}
	if err := validateResult(raw); err != nil {

Why do we need to Marshal it to json just UnMarshal it again for validation? couldn't we do validation on the signed argument? And only if it succeeds do the marshalling?

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: all files reviewed, 1 unresolved discussion (waiting on @lukedirtwalker)


go/tools/scion-pki/internal/v2/trcs/combine.go, line 67 at r1 (raw file):

Previously, lukedirtwalker (Lukas Vogel) wrote…

uff, I think line splits like this are weird to me. I would split it after the version argument.

Done.


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

Previously, lukedirtwalker (Lukas Vogel) wrote…

Why do we need to Marshal it to json just UnMarshal it again for validation? couldn't we do validation on the signed argument? And only if it succeeds do the marshalling?

This ensures that what we write is actually parsable and verifiable.
If we just verify the parsed version, we cannot guarantee that.
Should also not really be a performance concern, since manual TRC generation is infrequent anyway.

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 1 of 1 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

This PR adds TRC signature combination.
Also, the `gen` call executes the 3 phases in one call.
@oncilla oncilla merged commit 92e02a8 into scionproto:master Sep 12, 2019
@oncilla oncilla deleted the pub-spki-combine branch September 12, 2019 14:11
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