• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*[clinic input]
2 preserve
3 [clinic start generated code]*/
4 
5 PyDoc_STRVAR(_ssl_Certificate_public_bytes__doc__,
6 "public_bytes($self, /, format=Encoding.PEM)\n"
7 "--\n"
8 "\n");
9 
10 #define _SSL_CERTIFICATE_PUBLIC_BYTES_METHODDEF    \
11     {"public_bytes", (PyCFunction)(void(*)(void))_ssl_Certificate_public_bytes, METH_FASTCALL|METH_KEYWORDS, _ssl_Certificate_public_bytes__doc__},
12 
13 static PyObject *
14 _ssl_Certificate_public_bytes_impl(PySSLCertificate *self, int format);
15 
16 static PyObject *
_ssl_Certificate_public_bytes(PySSLCertificate * self,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)17 _ssl_Certificate_public_bytes(PySSLCertificate *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
18 {
19     PyObject *return_value = NULL;
20     static const char * const _keywords[] = {"format", NULL};
21     static _PyArg_Parser _parser = {NULL, _keywords, "public_bytes", 0};
22     PyObject *argsbuf[1];
23     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
24     int format = PY_SSL_ENCODING_PEM;
25 
26     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf);
27     if (!args) {
28         goto exit;
29     }
30     if (!noptargs) {
31         goto skip_optional_pos;
32     }
33     format = _PyLong_AsInt(args[0]);
34     if (format == -1 && PyErr_Occurred()) {
35         goto exit;
36     }
37 skip_optional_pos:
38     return_value = _ssl_Certificate_public_bytes_impl(self, format);
39 
40 exit:
41     return return_value;
42 }
43 
44 PyDoc_STRVAR(_ssl_Certificate_get_info__doc__,
45 "get_info($self, /)\n"
46 "--\n"
47 "\n");
48 
49 #define _SSL_CERTIFICATE_GET_INFO_METHODDEF    \
50     {"get_info", (PyCFunction)_ssl_Certificate_get_info, METH_NOARGS, _ssl_Certificate_get_info__doc__},
51 
52 static PyObject *
53 _ssl_Certificate_get_info_impl(PySSLCertificate *self);
54 
55 static PyObject *
_ssl_Certificate_get_info(PySSLCertificate * self,PyObject * Py_UNUSED (ignored))56 _ssl_Certificate_get_info(PySSLCertificate *self, PyObject *Py_UNUSED(ignored))
57 {
58     return _ssl_Certificate_get_info_impl(self);
59 }
60 /*[clinic end generated code: output=569d161749ead2da input=a9049054013a1b77]*/
61