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

Save keys (don't generate new IdentityKeyPair every time) #7

Open
EscolarProgramming opened this issue Nov 21, 2021 · 0 comments
Open

Comments

@EscolarProgramming
Copy link

EscolarProgramming commented Nov 21, 2021

Is your feature request related to a problem? Please describe.
It would be great if the KeyPair is not regenerated at every startup, but is saved so that the contact does not have to be reconfirmed every time in Signal.

Describe the solution you'd like
Keys shuld be saved

Additional context
I've already tried to do it by myself, but it looks like I used the wrong approach. I'm using the following approach:
Check if KeyPair.txt exists
if not exists -> Generate KeyPair, serialize it and save it to KeyPair.txt
if exists -> Deserialize key from KeyPair.txt
After that refresh the pre keys.
At the first start everything works without problems. But when I stop it and start it again, it doesn't work anymore. I always get the following error when I try to write a message to the bot: "Error processing message: org.signal.libsignal.metadata.ProtocolNoSessionException: org.whispersystems.libsignal.NoSessionException: No session for: :1".
It doesn't matter where I put the refreshPreKeys, or if I leave it out altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant