YugabyteDB (2.13.0.0-b42, bfc6a6643e7399ac8a0e81d06a3ee6d6571b33ab)

Coverage Report

Created: 2022-03-09 17:30

/Users/deen/code/yugabyte-db/src/postgres/src/include/libpq/scram.h
Line
Count
Source (jump to first uncovered line)
1
/*-------------------------------------------------------------------------
2
 *
3
 * scram.h
4
 *    Interface to libpq/scram.c
5
 *
6
 * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
7
 * Portions Copyright (c) 1994, Regents of the University of California
8
 *
9
 * src/include/libpq/scram.h
10
 *
11
 *-------------------------------------------------------------------------
12
 */
13
#ifndef PG_SCRAM_H
14
#define PG_SCRAM_H
15
16
#include "lib/stringinfo.h"
17
#include "libpq/libpq-be.h"
18
19
/* Status codes for message exchange */
20
0
#define SASL_EXCHANGE_CONTINUE    0
21
0
#define SASL_EXCHANGE_SUCCESS   1
22
0
#define SASL_EXCHANGE_FAILURE   2
23
24
/* Routines dedicated to authentication */
25
extern void pg_be_scram_get_mechanisms(Port *port, StringInfo buf);
26
extern void *pg_be_scram_init(Port *port, const char *selected_mech, const char *shadow_pass);
27
extern int pg_be_scram_exchange(void *opaq, char *input, int inputlen,
28
           char **output, int *outputlen, char **logdetail);
29
30
/* Routines to handle and check SCRAM-SHA-256 verifier */
31
extern char *pg_be_scram_build_verifier(const char *password);
32
extern bool scram_verify_plain_password(const char *username,
33
              const char *password, const char *verifier);
34
35
#endif              /* PG_SCRAM_H */