Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove some unused glue code. #2332

Merged
merged 2 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
### Cleanup
* Removed the experimental map API.

## HEAD

### Improvements.
* Removed the deprecated crypto.NewSHA256Signer function.

## v1.3.12
[Published 2021-02-16](https://github.com/google/trillian/releases/tag/v1.3.12)

Expand Down
11 changes: 0 additions & 11 deletions crypto/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,6 @@ func NewSigner(keyID int64, signer crypto.Signer, hash crypto.Hash) *Signer {
}
}

// NewSHA256Signer creates a new SHA256 based Signer and a KeyID of 0.
//
// Deprecated: NewSHA256Signer was only meant for use in tests. It can be
// replaced by NewSigner(0, key, crypto.SHA256).
func NewSHA256Signer(signer crypto.Signer) *Signer {
return &Signer{
Hash: crypto.SHA256,
Signer: signer,
}
}

// Public returns the public key that can verify signatures produced by s.
func (s *Signer) Public() crypto.PublicKey {
return s.Signer.Public()
Expand Down
19 changes: 1 addition & 18 deletions merkle/coniks/coniks.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,7 @@ import (
"github.com/google/trillian/merkle/hashers/registry"
)

// Default is the standard CONIKS hasher.
//
// Deprecated: moved to hasher subpackage.
var Default = hasher.Default

func init() {
registry.RegisterMapHasher(trillian.HashStrategy_CONIKS_SHA512_256, Default)
registry.RegisterMapHasher(trillian.HashStrategy_CONIKS_SHA512_256, hasher.Default)
registry.RegisterMapHasher(trillian.HashStrategy_CONIKS_SHA256, hasher.New(crypto.SHA256))
}

// Hasher implements the sparse merkle tree hashing algorithm specified in the CONIKS paper.
//
// Deprecated: moved to hasher subpackage.
type Hasher = hasher.Hasher

// New creates a new hashers.TreeHasher using the passed in hash function.
//
// Deprecated: moved to hasher subpackage.
func New(h crypto.Hash) *Hasher {
return hasher.New(h)
}
37 changes: 0 additions & 37 deletions merkle/log_verifier.go

This file was deleted.

27 changes: 1 addition & 26 deletions merkle/rfc6962/rfc6962.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,5 @@ import (
)

func init() {
registry.RegisterLogHasher(trillian.HashStrategy_RFC6962_SHA256, New(crypto.SHA256))
}

// Domain separation prefixes
//
// Deprecated: moved to hasher subpackage.
const (
RFC6962LeafHashPrefix = hasher.RFC6962LeafHashPrefix
RFC6962NodeHashPrefix = hasher.RFC6962NodeHashPrefix
)

// DefaultHasher is a SHA256 based LogHasher.
//
// Deprecated: moved to hasher subpackage.
var DefaultHasher = hasher.DefaultHasher

// Hasher implements the RFC6962 tree hashing algorithm.
//
// Deprecated: moved to hasher subpackage.
type Hasher = hasher.Hasher

// New creates a new Hashers.LogHasher on the passed in hash function.
//
// Deprecated: moved to hasher subpackage.
func New(h crypto.Hash) *Hasher {
return hasher.New(h)
registry.RegisterLogHasher(trillian.HashStrategy_RFC6962_SHA256, hasher.New(crypto.SHA256))
}