Renew the device certificate from the browser, with the recovery phrase
Within the last 30 days the owner page offers it. The node signs a new certificate for the same device key (peer ID and listings stay), saves it, and signs again own listings that would outlive the old certificate. The phrase is used for one request and not kept; another identity's phrase and no-phrase identities are refused. Device.Current gives the certificate to sign with while a renewal happens. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
@@ -145,9 +145,10 @@ func (l *Listing) powOK(difficulty int) (bool, error) {
|
||||
// Seal fills in author, device and certificate from dev, mines the
|
||||
// proof-of-work and signs the listing with the device key.
|
||||
func (l *Listing) Seal(dev *identity.Device, difficulty int) error {
|
||||
l.Author = dev.Cert.Author
|
||||
l.Device = dev.Cert.Device
|
||||
l.Cert = dev.Cert
|
||||
cert := dev.Current()
|
||||
l.Author = cert.Author
|
||||
l.Device = cert.Device
|
||||
l.Cert = cert
|
||||
l.Sig = ""
|
||||
for l.PoW = 0; ; l.PoW++ {
|
||||
if l.PoW > maxSafeInt {
|
||||
|
||||
Reference in New Issue
Block a user