Skip to content

Conversation

oncilla
Copy link
Contributor

@oncilla oncilla commented Nov 8, 2019

Add support for signing base TRCs and TRC updates based on the TRC
configuration and the prototype TRCs.

The version to sign can be provided via command line flag.
If no version is specified, the tool searches the newest TRC
configuration file and uses its version.


This change is Reviewable

@oncilla oncilla added the c/tooling SCION network tools label Nov 8, 2019
@oncilla oncilla added this to the Q4S2 milestone Nov 8, 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 16 of 16 files at r1.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @oncilla)


go/lib/scrypto/trc/v2/primary.go, line 292 at r1 (raw file):

		return []byte(s), nil
	}
	return nil, common.NewBasicError(ErrInvalidKeyType, nil, "key_type", int(t))

Use serrors.WithCtx


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

type signatureGen struct {
	Dirs    pkicmn.Dirs

hm why doesn't that just embed loader? or did you deliberately chose it like this?


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

			isdDir := filepath.Join(tmpDir, "ISD1")
			require.NoError(t, os.MkdirAll(isdDir, 0777))
			err := exec.Command("cp", "-r",

ugh, too bad there is no lib function for this :/

Add support for signing base TRCs and TRC updates based on the TRC
configuration and the prototype TRCs.

The version to sign can be provided via command line flag.
If no version is specified, the tool searches the newest TRC
configuration file and uses its version.
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: :shipit: complete! all files reviewed, all discussions resolved


go/lib/scrypto/trc/v2/primary.go, line 292 at r1 (raw file):

Previously, lukedirtwalker (Lukas Vogel) wrote…

Use serrors.WithCtx

I would rather have it consistent in the file and resolve this in a separate PR.


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

Previously, lukedirtwalker (Lukas Vogel) wrote…

hm why doesn't that just embed loader? or did you deliberately chose it like this?

Loader will have additional capability that should not be "inherited" by the signatureGen


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

Previously, lukedirtwalker (Lukas Vogel) wrote…

ugh, too bad there is no lib function for this :/

yes. :sad-panda:

@oncilla oncilla merged commit 504fd7d into scionproto:master Nov 12, 2019
@oncilla oncilla deleted the pub-spki-gen-sign branch November 12, 2019 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/tooling SCION network tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants