|
wxMaxima
|
Implements TakeMaximaAuthLine(). More...
Functions | |
| MaximaAuthLine | TakeMaximaAuthLine (std::string &text, const std::string &secret) |
| Checks and removes the auth=<secret> line from what Maxima sent first. | |
Implements TakeMaximaAuthLine().
| MaximaAuthLine TakeMaximaAuthLine | ( | std::string & | text, |
| const std::string & | secret | ||
| ) |
Checks and removes the auth=<secret> line from what Maxima sent first.
A Maxima started with -s and MAXIMA_AUTH_CODE set sends "auth=" followed by the variable's value as the first line on its connection to wxMaxima, before its banner, its pid= line and its first prompt. That lets wxMaxima know whom it talks to before it trusts any of these.
The line is removed from text whatever its outcome, so the secret never reaches the log the banner is written to.
Kept free of wxWidgets, so it can be tested on its own.
| text | What Maxima sent up to and including its first prompt. |
| secret | The value of MAXIMA_AUTH_CODE. |