mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2024-11-10 18:25:17 +00:00
QOL – handle join announcements better by pre-empting the bundle announcement
This commit is contained in:
parent
5f9c90f284
commit
a0ff2ab3c6
@ -485,11 +485,32 @@ func (e *CeremonyExecutionEngine) announceJoin(
|
|||||||
) error {
|
) error {
|
||||||
idk, err := e.keyManager.GetAgreementKey("q-ratchet-idk")
|
idk, err := e.keyManager.GetAgreementKey("q-ratchet-idk")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "announce join")
|
if errors.Is(err, keys.KeyNotFoundErr) {
|
||||||
|
idk, err = e.keyManager.CreateAgreementKey(
|
||||||
|
"q-ratchet-idk",
|
||||||
|
keys.KeyTypeX448,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return errors.Wrap(err, "announce key bundle")
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return errors.Wrap(err, "announce key bundle")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
spk, err := e.keyManager.GetAgreementKey("q-ratchet-spk")
|
spk, err := e.keyManager.GetAgreementKey("q-ratchet-spk")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "announce join")
|
if errors.Is(err, keys.KeyNotFoundErr) {
|
||||||
|
spk, err = e.keyManager.CreateAgreementKey(
|
||||||
|
"q-ratchet-spk",
|
||||||
|
keys.KeyTypeX448,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return errors.Wrap(err, "announce key bundle")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return errors.Wrap(err, "announce key bundle")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g := curves.ED448().Point.Generator()
|
g := curves.ED448().Point.Generator()
|
||||||
|
Loading…
Reference in New Issue
Block a user