Run `make vendor`

This commit is contained in:
Pedro Pombeiro 2019-12-30 12:59:58 +01:00 committed by Pedro Pombeiro
parent 18af9175ac
commit 41cba814c8
4 changed files with 0 additions and 43 deletions

View File

@ -66,12 +66,6 @@ func (w *gethWhisperWrapper) SubscribeEnvelopeEvents(eventsProxy chan<- types.En
return NewGethSubscriptionWrapper(w.whisper.SubscribeEnvelopeEvents(events))
}
// SelectedKeyPairID returns the id of currently selected key pair.
// It helps distinguish between different users w/o exposing the user identity itself.
func (w *gethWhisperWrapper) SelectedKeyPairID() string {
return w.whisper.SelectedKeyPairID()
}
func (w *gethWhisperWrapper) GetPrivateKey(id string) (*ecdsa.PrivateKey, error) {
return w.whisper.GetPrivateKey(id)
}

View File

@ -38,9 +38,6 @@ type Whisper interface {
// GetCurrentTime returns current time.
GetCurrentTime() time.Time
// SelectedKeyPairID returns the id of currently selected key pair.
// It helps distinguish between different users w/o exposing the user identity itself.
SelectedKeyPairID() string
// GetPrivateKey retrieves the private key of the specified identity.
GetPrivateKey(id string) (*ecdsa.PrivateKey, error)

View File

@ -39,10 +39,6 @@ func ValidateReceivedChatMessage(message *protobuf.ChatMessage) error {
if sticker == nil {
return errors.New("No sticker content")
}
if sticker.Pack == 0 {
return errors.New("Sticker pack not set")
}
if len(sticker.Hash) == 0 {
return errors.New("Sticker hash not set")
}

View File

@ -633,24 +633,6 @@ func (whisper *Whisper) AddKeyPair(key *ecdsa.PrivateKey) (string, error) {
return id, nil
}
// SelectKeyPair adds cryptographic identity, and makes sure
// that it is the only private key known to the node.
func (whisper *Whisper) SelectKeyPair(key *ecdsa.PrivateKey) error {
id, err := makeDeterministicID(common.ToHex(crypto.FromECDSAPub(&key.PublicKey)), keyIDSize)
if err != nil {
return err
}
whisper.keyMu.Lock()
defer whisper.keyMu.Unlock()
whisper.privateKeys = make(map[string]*ecdsa.PrivateKey) // reset key store
whisper.privateKeys[id] = key
log.Info("Whisper identity selected", "id", id, "key", common.ToHex(crypto.FromECDSAPub(&key.PublicKey)))
return nil
}
// DeleteKeyPairs removes all cryptographic identities known to the node
func (whisper *Whisper) DeleteKeyPairs() error {
whisper.keyMu.Lock()
@ -1608,15 +1590,3 @@ func addBloom(a, b []byte) []byte {
}
return c
}
// SelectedKeyPairID returns the id of currently selected key pair.
// It helps distinguish between different users w/o exposing the user identity itself.
func (whisper *Whisper) SelectedKeyPairID() string {
whisper.keyMu.RLock()
defer whisper.keyMu.RUnlock()
for id := range whisper.privateKeys {
return id
}
return ""
}