~mdw
/
catacomb-python
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ec.c: Reject strings with trailing junk in the curve-point constructor.
[catacomb-python]
/
passphrase.c
diff --git
a/passphrase.c
b/passphrase.c
index
49bc771
..
424bcc9
100644
(file)
--- a/
passphrase.c
+++ b/
passphrase.c
@@
-92,7
+92,7
@@
static PyObject *pixmeth_read(PyObject *me, PyObject *arg, PyObject *kw)
else if (r > 0)
RETURN_NONE;
else
else if (r > 0)
RETURN_NONE;
else
- rc =
PyString_FromString
(buf);
+ rc =
BIN_FROMSTR
(buf);
end:
return (rc);
}
end:
return (rc);
}
@@
-102,7
+102,7
@@
static PyObject *pixmeth_set(PyObject *me, PyObject *arg)
char *tag;
char *phrase;
char *tag;
char *phrase;
- if (!PyArg_ParseTuple(arg, "s
s
:set", &tag, &phrase))
+ if (!PyArg_ParseTuple(arg, "s
"Y"
:set", &tag, &phrase))
return (0);
pixie_set(PIXIE_FD(me), tag, phrase);
RETURN_ME;
return (0);
pixie_set(PIXIE_FD(me), tag, phrase);
RETURN_ME;
@@
-195,7
+195,7
@@
static PyObject *meth_ppread(PyObject *me, PyObject *arg, PyObject *kw)
goto end;
if (passphrase_read(tag, f, buf, sizeof(buf)))
SYSERR("passphrase read failed");
goto end;
if (passphrase_read(tag, f, buf, sizeof(buf)))
SYSERR("passphrase read failed");
- rc =
PyString_FromString
(buf);
+ rc =
BIN_FROMSTR
(buf);
end:
return (rc);
}
end:
return (rc);
}
@@
-220,7
+220,7
@@
static PyObject *meth_getpass(PyObject *me, PyObject *arg)
goto end;
if (pixie_getpass(prompt, buf, sizeof(buf)))
OSERR(0);
goto end;
if (pixie_getpass(prompt, buf, sizeof(buf)))
OSERR(0);
- rc =
PyString_FromString
(buf);
+ rc =
BIN_FROMSTR
(buf);
end:
return (rc);
}
end:
return (rc);
}