Skip to content
Snippets Groups Projects
Commit 46e93488 authored by Josh Brooks's avatar Josh Brooks
Browse files

Add debug statement to discern error

parent d48f8405
No related branches found
No related tags found
2 merge requests!510Release,!333Frond End Assistance And Iterative Clean Up
...@@ -145,19 +145,34 @@ func (e *E2e) GetUdCertFromNdf() []byte { ...@@ -145,19 +145,34 @@ func (e *E2e) GetUdCertFromNdf() []byte {
// Returns // Returns
// - []byte - A byte marshalled contact.Contact. // - []byte - A byte marshalled contact.Contact.
func (e *E2e) GetUdContactFromNdf() ([]byte, error) { func (e *E2e) GetUdContactFromNdf() ([]byte, error) {
udIdData := e.api.GetCmix().GetInstance().GetPartialNdf().Get().UDB.ID // Retrieve data from E2e
netDef := e.api.GetCmix().GetInstance().GetPartialNdf().Get()
e2eGroup := e.api.GetE2E().GetGroup()
// Unmarshal UD ID
udIdData := netDef.UDB.ID
udId, err := id.Unmarshal(udIdData) udId, err := id.Unmarshal(udIdData)
if err != nil { if err != nil {
return nil, err return nil, err
} }
udDhPubKeyData := e.api.GetCmix().GetInstance().GetPartialNdf().Get().UDB.DhPubKey // Unmarshal DH pub key
udDhPubKey := e.api.GetE2E().GetGroup().NewInt(1) udDhPubKeyData := netDef.UDB.DhPubKey
udDhPubKey := e2eGroup.NewInt(1)
err = udDhPubKey.UnmarshalJSON(udDhPubKeyData) err = udDhPubKey.UnmarshalJSON(udDhPubKeyData)
jww.WARN.Printf("GetUdContactFromNdf debug\n"+
"netDef UD: %v\n"+
"netDef DHPubKey: %v\n"+
"udDhPubKey.UnmarshalJSON (key:%v, err: %v)\n",
netDef.UDB, netDef.UDB.DhPubKey, udDhPubKey, err)
if err != nil { if err != nil {
jww.WARN.Printf("GetUdContactFromNdf debug fails on udDhPubKey.UnmarshalJSON")
return nil, err return nil, err
} }
// Construct contact
udContact := contact.Contact{ udContact := contact.Contact{
ID: udId, ID: udId,
DhPubKey: udDhPubKey, DhPubKey: udDhPubKey,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment