Skip to content
Snippets Groups Projects
Commit df68880e authored by Jake Taylor's avatar Jake Taylor
Browse files

fix integration

parent 895cf02d
No related branches found
No related tags found
2 merge requests!510Release,!257change structure of identities in api and bindings
...@@ -682,7 +682,6 @@ func initE2e() *xxdk.E2e { ...@@ -682,7 +682,6 @@ func initE2e() *xxdk.E2e {
// load the client // load the client
baseClient, err := xxdk.LoadCmix(storeDir, pass, params) baseClient, err := xxdk.LoadCmix(storeDir, pass, params)
if err != nil { if err != nil {
jww.FATAL.Panicf("%+v", err) jww.FATAL.Panicf("%+v", err)
} }
...@@ -690,10 +689,19 @@ func initE2e() *xxdk.E2e { ...@@ -690,10 +689,19 @@ func initE2e() *xxdk.E2e {
authCbs = makeAuthCallbacks( authCbs = makeAuthCallbacks(
viper.GetBool("unsafe-channel-creation")) viper.GetBool("unsafe-channel-creation"))
client, err := xxdk.Login(baseClient, authCbs, receptionIdentity) // Force LoginLegacy for precanned senderID
var client *xxdk.E2e
if isPrecanned := viper.GetUint("sendid") != 0; isPrecanned {
client, err = xxdk.LoginLegacy(baseClient, authCbs)
if err != nil {
jww.FATAL.Panicf("%+v", err)
}
} else {
client, err = xxdk.Login(baseClient, authCbs, receptionIdentity)
if err != nil { if err != nil {
jww.FATAL.Panicf("%+v", err) jww.FATAL.Panicf("%+v", err)
} }
}
if protoUser := viper.GetString("protoUserOut"); protoUser != "" { if protoUser := viper.GetString("protoUserOut"); protoUser != "" {
......
...@@ -141,11 +141,15 @@ func (r ReceptionIdentity) DeepCopy() ReceptionIdentity { ...@@ -141,11 +141,15 @@ func (r ReceptionIdentity) DeepCopy() ReceptionIdentity {
dhKeyCopy := make([]byte, len(r.DHKeyPrivate)) dhKeyCopy := make([]byte, len(r.DHKeyPrivate))
copy(dhKeyCopy, r.DHKeyPrivate) copy(dhKeyCopy, r.DHKeyPrivate)
grpCopy := make([]byte, len(r.E2eGrp))
copy(grpCopy, r.E2eGrp)
return ReceptionIdentity{ return ReceptionIdentity{
ID: r.ID.DeepCopy(), ID: r.ID.DeepCopy(),
RSAPrivatePem: r.RSAPrivatePem, RSAPrivatePem: r.RSAPrivatePem,
Salt: saltCopy, Salt: saltCopy,
DHKeyPrivate: dhKeyCopy, DHKeyPrivate: dhKeyCopy,
E2eGrp: grpCopy,
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment