forked from security/hakurei
app: move app ID to app struct
App ID is inherent to App, and it makes no sense to generate it as part of the app sealing process. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
@@ -53,18 +53,11 @@ func (a *app) Seal(config *Config) error {
|
||||
// create seal
|
||||
seal := new(appSeal)
|
||||
|
||||
// generate application ID
|
||||
if id, err := newAppID(); err != nil {
|
||||
return fmsg.WrapErrorSuffix(err,
|
||||
"cannot generate application ID:")
|
||||
} else {
|
||||
seal.id = id
|
||||
}
|
||||
|
||||
// fetch system constants
|
||||
seal.SystemConstants = internal.GetSC()
|
||||
|
||||
// pass through config values
|
||||
seal.id = a.id.String()
|
||||
seal.fid = config.ID
|
||||
seal.command = config.Command
|
||||
|
||||
|
||||
Reference in New Issue
Block a user