The Red Project
 All Classes Namespaces Files Functions Variables Pages
post.php File Reference

Functions

 post_init (&$a)
 
 post_post (&$a)
 

Function Documentation

post_init ( $a)

Zot endpoint

post_post ( $a)

Many message packets will arrive encrypted. The existence of an 'iv' element tells us we need to unencapsulate the AES-256-CBC content using the site private key

The 'pickup' message arrives with a tracking ID which is associated with a particular outq_hash First verify that that the returned signatures verify, then check that we have an outbound queue item with the correct hash. If everything verifies, find any/all outbound messages in the queue for this hubloc and send them back

If we made it to here, the signatures verify, but we still don't know if the tracking ID is valid. It wouldn't be an error if the tracking ID isn't found, because we may have sent this particular queue item with another pickup (after the tracking ID for the other pickup was verified).

Everything is good if we made it here, so find all messages that are going to this location and send them all.

pickup: end

All other message types require us to verify the sender. This is a generic check, so we will do it once here and bail if anything goes wrong.

Check if the sender is already verified here

Have never seen this guid or this guid coming from this location. Check it and register it.