local.c revision a9d46b86993ee8d87fddf0ba50665c0b1b78ebb7
919N/A along with this program. If not, see <http://www.gnu.org/licenses/>.
919N/A#include "responder/secrets/secsrv_private.h"
919N/A#include "util/crypto/sss_crypto.h"
0N/Astruct local_context {
967N/A char **plain_secret)
0N/A char **ciphertext)
const char *req_path,
char **secret)
const char *attr_secret;
const char *attr_enctype;
int ret;
goto done;
goto done;
goto done;
if (!attr_secret) {
goto done;
if (attr_enctype) {
done:
return ret;
const char *req_path,
char ***_keys,
int *num_keys)
char **keys;
int ret;
goto done;
goto done;
if (!keys) {
goto done;
if (!keys[i]) {
goto done;
done:
return ret;
int num;
int ret;
for (int i = 0; i < num; i++) {
return EOK;
const char *req_path,
const char *secret)
char *enc_secret;
int ret;
if (!msg) {
goto done;
goto done;
done:
return ret;
const char *req_path)
int ret;
done:
return ret;
const char *req_path)
int ret;
if (!msg) {
goto done;
goto done;
done:
return ret;
char **local_db_path)
int ret;
return EINVAL;
return EINVAL;
if (ret != 0) {
return EINVAL;
if (!*local_db_path) {
return ENOMEM;
return EOK;
struct local_secret_state {
void *provider_ctx,
const char *content_type;
bool body_is_json;
char *req_path;
char *secret;
char **keys;
int nkeys;
int plen;
int ret;
if (!lctx) {
goto done;
"application/json")) {
body_is_json = true;
"application/octet-stream")) {
body_is_json = false;
goto done;
case HTTP_GET:
if (body_is_json) {
case HTTP_PUT:
if (body_is_json) {
&secret);
case HTTP_DELETE:
case HTTP_POST:
goto done;
goto done;
done:
int ret;
int fd;
return EFAULT;
return EOK;
int mfd;
int ret;
return EIO;
return EOK;