github.com/meulengracht/snapd@v0.0.0-20210719210640-8bde69bcc84e/cmd/snap-bootstrap/cmd_initramfs_mounts_nosecboot.go (about)

     1  // -*- Mode: Go; indent-tabs-mode: t -*-
     2  // +build nosecboot
     3  
     4  /*
     5   * Copyright (C) 2019-2020 Canonical Ltd
     6   *
     7   * This program is free software: you can redistribute it and/or modify
     8   * it under the terms of the GNU General Public License version 3 as
     9   * published by the Free Software Foundation.
    10   *
    11   * This program is distributed in the hope that it will be useful,
    12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
    13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14   * GNU General Public License for more details.
    15   *
    16   * You should have received a copy of the GNU General Public License
    17   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    18   *
    19   */
    20  
    21  package main
    22  
    23  import (
    24  	"errors"
    25  
    26  	"github.com/snapcore/snapd/asserts"
    27  	"github.com/snapcore/snapd/osutil/disks"
    28  	"github.com/snapcore/snapd/secboot"
    29  )
    30  
    31  var (
    32  	errNotImplemented = errors.New("not implemented")
    33  )
    34  
    35  func init() {
    36  	secbootMeasureSnapSystemEpochWhenPossible = func() error {
    37  		return errNotImplemented
    38  	}
    39  	secbootMeasureSnapModelWhenPossible = func(_ func() (*asserts.Model, error)) error {
    40  		return errNotImplemented
    41  	}
    42  	secbootUnlockVolumeUsingSealedKeyIfEncrypted = func(disk disks.Disk, name string, sealedEncryptionKeyFile string, opts *secboot.UnlockVolumeUsingSealedKeyOptions) (secboot.UnlockResult, error) {
    43  		return secboot.UnlockResult{}, errNotImplemented
    44  	}
    45  	secbootUnlockEncryptedVolumeUsingKey = func(disk disks.Disk, name string, key []byte) (secboot.UnlockResult, error) {
    46  		return secboot.UnlockResult{}, errNotImplemented
    47  	}
    48  
    49  	secbootLockSealedKeys = func() error {
    50  		return errNotImplemented
    51  	}
    52  }