|
wxMaxima
|
Declares TakeMaximaAuthLine(), which checks the auth= line a Maxima may start its connection to wxMaxima with. More...
#include <string>Go to the source code of this file.
Enumerations | |
| enum class | MaximaAuthLine { absent , accepted , rejected } |
| What TakeMaximaAuthLine() found. More... | |
Functions | |
| MaximaAuthLine | TakeMaximaAuthLine (std::string &text, const std::string &secret) |
| Checks and removes the auth=<secret> line from what Maxima sent first. | |
Declares TakeMaximaAuthLine(), which checks the auth= line a Maxima may start its connection to wxMaxima with.
|
strong |
What TakeMaximaAuthLine() found.
| Enumerator | |
|---|---|
| absent | No auth= line: a Maxima that predates it. wxMathML.lisp's key decides. |
| accepted | The line carries the secret wxMaxima passed in MAXIMA_AUTH_CODE. |
| rejected | There is an auth= line, but with something else than the secret. |
| 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. |