|
|
|
@ -21,6 +21,7 @@ import (
|
|
|
|
|
func oxDeleteNodes(jid string, client *xmpp.Client,
|
|
|
|
|
iqc chan xmpp.IQ) error {
|
|
|
|
|
nodeListRequest := etree.NewDocument()
|
|
|
|
|
nodeListRequest.WriteSettings.AttrSingleQuote = true
|
|
|
|
|
query := nodeListRequest.CreateElement("query")
|
|
|
|
|
query.CreateAttr("xmlns", nsDiscoItems)
|
|
|
|
|
nlr, err := nodeListRequest.WriteToString()
|
|
|
|
@ -231,6 +232,7 @@ func oxPublishPubKey(jid string, client *xmpp.Client, iqc chan xmpp.IQ,
|
|
|
|
|
}
|
|
|
|
|
pubKeyBase64 := base64.StdEncoding.EncodeToString(keySerialized)
|
|
|
|
|
root := etree.NewDocument()
|
|
|
|
|
root.WriteSettings.AttrSingleQuote = true
|
|
|
|
|
pubsub := root.CreateElement("pubsub")
|
|
|
|
|
pubsub.CreateAttr("xmlns", nsPubsub)
|
|
|
|
|
publish := pubsub.CreateElement("publish")
|
|
|
|
@ -278,6 +280,7 @@ func oxPublishPubKey(jid string, client *xmpp.Client, iqc chan xmpp.IQ,
|
|
|
|
|
return errors.New("couldn't successfully verify public key upload")
|
|
|
|
|
}
|
|
|
|
|
root = etree.NewDocument()
|
|
|
|
|
root.WriteSettings.AttrSingleQuote = true
|
|
|
|
|
pubsub = root.CreateElement("pubsub")
|
|
|
|
|
pubsub.CreateAttr("xmlns", nsPubsub)
|
|
|
|
|
publish = pubsub.CreateElement("publish")
|
|
|
|
@ -481,6 +484,7 @@ func oxGenPrivKey(jid string, client *xmpp.Client, iqc chan xmpp.IQ,
|
|
|
|
|
func oxRecvPublicKeys(client *xmpp.Client, iqc chan xmpp.IQ, recipient string,
|
|
|
|
|
fingerprint string) (*crypto.KeyRing, error) {
|
|
|
|
|
opkr := etree.NewDocument()
|
|
|
|
|
opkr.WriteSettings.AttrSingleQuote = true
|
|
|
|
|
opkrPs := opkr.CreateElement("pubsub")
|
|
|
|
|
opkrPs.CreateAttr("xmlns", nsPubsub)
|
|
|
|
|
opkrPsItems := opkrPs.CreateElement("items")
|
|
|
|
@ -555,6 +559,7 @@ func oxGetPublicKeyRing(client *xmpp.Client, iqc chan xmpp.IQ,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
oxPubKeyListReq := etree.NewDocument()
|
|
|
|
|
oxPubKeyListReq.WriteSettings.AttrSingleQuote = true
|
|
|
|
|
oxPubKeyListReqPs := oxPubKeyListReq.CreateElement("pubsub")
|
|
|
|
|
oxPubKeyListReqPs.CreateAttr("xmlns", nsPubsub)
|
|
|
|
|
oxPubKeyListReqPsItems := oxPubKeyListReqPs.CreateElement("items")
|
|
|
|
@ -708,6 +713,7 @@ func oxEncrypt(client *xmpp.Client, iqc chan xmpp.IQ, oxPrivKey *crypto.Key,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
oxCryptMessage := etree.NewDocument()
|
|
|
|
|
oxCryptMessage.WriteSettings.AttrSingleQuote = true
|
|
|
|
|
oxCryptMessageSc := oxCryptMessage.CreateElement("signcrypt")
|
|
|
|
|
oxCryptMessageSc.CreateAttr("xmlns", nsOx)
|
|
|
|
|
oxCryptMessageScTo := oxCryptMessageSc.CreateElement("to")
|
|
|
|
|