Skip to content

Commit

Permalink
Move declaration of Slot from key.go to slot.go
Browse files Browse the repository at this point in the history
Signed-off-by: Steffen Vogel <[email protected]>
  • Loading branch information
stv0g committed Dec 10, 2024
1 parent 5ea6c8e commit 8492c93
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
13 changes: 0 additions & 13 deletions key.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,6 @@ func (e UnsupportedCurveError) Error() string {
return fmt.Sprintf("unsupported curve: %d", e.curve)
}

// Slot is a private key and certificate combination managed by the security key.
type Slot struct {
// Key is a reference for a key type.
//
// https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=32
Key byte

// Object is a reference for data object.
//
// https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=30
Object Object
}

//nolint:gochecknoglobals
var (
extIDFirmwareVersion = asn1.ObjectIdentifier([]int{1, 3, 6, 1, 4, 1, 41482, 3, 3})
Expand Down
13 changes: 13 additions & 0 deletions slot.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ import (
"strings"
)

// Slot is a private key and certificate combination managed by the security key.
type Slot struct {
// Key is a reference for a key type.
//
// https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=32
Key byte

// Object is a reference for data object.
//
// https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=30
Object Object
}

func parseSlot(commonName string) (Slot, bool) {
if !strings.HasPrefix(commonName, yubikeySubjectCNPrefix) {
return Slot{}, false
Expand Down

0 comments on commit 8492c93

Please sign in to comment.