* BuildResponseMsgForSaltRequest builds the response BSON for a SALT * request command */
| 787 | * request command |
| 788 | */ |
| 789 | static pgbson * |
| 790 | BuildResponseMsgForSaltRequest(SaltIterationsReqResult *requestResult) |
| 791 | { |
| 792 | pgbson_writer resultWriter; |
| 793 | |
| 794 | PgbsonWriterInit(&resultWriter); |
| 795 | |
| 796 | PgbsonWriterAppendInt32(&resultWriter, AUTH_OK_KEY, AUTH_OK_KEY_LEN, |
| 797 | requestResult->ok); |
| 798 | PgbsonWriterAppendInt32(&resultWriter, AUTH_ITER_KEY, AUTH_ITER_KEY_LEN, |
| 799 | requestResult->iterationCount); |
| 800 | PgbsonWriterAppendUtf8(&resultWriter, AUTH_SALT_KEY, AUTH_SALT_KEY_LEN, |
| 801 | requestResult->encodedSalt); |
| 802 | |
| 803 | return PgbsonWriterGetPgbson(&resultWriter); |
| 804 | } |
| 805 | |
| 806 | |
| 807 | /* Build the response BSON for SCRAM SHA256 AUTH request */ |
no test coverage detected