1 /*[clinic input] 2 preserve 3 [clinic start generated code]*/ 4 5 PyDoc_STRVAR(_ssl__SSLSocket_do_handshake__doc__, 6 "do_handshake($self, /)\n" 7 "--\n" 8 "\n"); 9 10 #define _SSL__SSLSOCKET_DO_HANDSHAKE_METHODDEF \ 11 {"do_handshake", (PyCFunction)_ssl__SSLSocket_do_handshake, METH_NOARGS, _ssl__SSLSocket_do_handshake__doc__}, 12 13 static PyObject * 14 _ssl__SSLSocket_do_handshake_impl(PySSLSocket *self); 15 16 static PyObject * 17 _ssl__SSLSocket_do_handshake(PySSLSocket *self, PyObject *Py_UNUSED(ignored)) 18 { 19 return _ssl__SSLSocket_do_handshake_impl(self); 20 } 21 22 PyDoc_STRVAR(_ssl__test_decode_cert__doc__, 23 "_test_decode_cert($module, path, /)\n" 24 "--\n" 25 "\n"); 26 27 #define _SSL__TEST_DECODE_CERT_METHODDEF \ 28 {"_test_decode_cert", (PyCFunction)_ssl__test_decode_cert, METH_O, _ssl__test_decode_cert__doc__}, 29 30 static PyObject * 31 _ssl__test_decode_cert_impl(PyObject *module, PyObject *path); 32 33 static PyObject * 34 _ssl__test_decode_cert(PyObject *module, PyObject *arg) 35 { 36 PyObject *return_value = NULL; 37 PyObject *path; 38 39 if (!PyArg_Parse(arg, "O&:_test_decode_cert", PyUnicode_FSConverter, &path)) { 40 goto exit; 41 } 42 return_value = _ssl__test_decode_cert_impl(module, path); 43 44 exit: 45 return return_value; 46 } 47 48 PyDoc_STRVAR(_ssl__SSLSocket_peer_certificate__doc__, 49 "peer_certificate($self, der=False, /)\n" 50 "--\n" 51 "\n" 52 "Returns the certificate for the peer.\n" 53 "\n" 54 "If no certificate was provided, returns None. If a certificate was\n" 55 "provided, but not validated, returns an empty dictionary. Otherwise\n" 56 "returns a dict containing information about the peer certificate.\n" 57 "\n" 58 "If the optional argument is True, returns a DER-encoded copy of the\n" 59 "peer certificate, or None if no certificate was provided. This will\n" 60 "return the certificate even if it wasn\'t validated."); 61 62 #define _SSL__SSLSOCKET_PEER_CERTIFICATE_METHODDEF \ 63 {"peer_certificate", (PyCFunction)_ssl__SSLSocket_peer_certificate, METH_VARARGS, _ssl__SSLSocket_peer_certificate__doc__}, 64 65 static PyObject * 66 _ssl__SSLSocket_peer_certificate_impl(PySSLSocket *self, int binary_mode); 67 68 static PyObject * 69 _ssl__SSLSocket_peer_certificate(PySSLSocket *self, PyObject *args) 70 { 71 PyObject *return_value = NULL; 72 int binary_mode = 0; 73 74 if (!PyArg_ParseTuple(args, "|p:peer_certificate", 75 &binary_mode)) { 76 goto exit; 77 } 78 return_value = _ssl__SSLSocket_peer_certificate_impl(self, binary_mode); 79 80 exit: 81 return return_value; 82 } 83 84 PyDoc_STRVAR(_ssl__SSLSocket_shared_ciphers__doc__, 85 "shared_ciphers($self, /)\n" 86 "--\n" 87 "\n"); 88 89 #define _SSL__SSLSOCKET_SHARED_CIPHERS_METHODDEF \ 90 {"shared_ciphers", (PyCFunction)_ssl__SSLSocket_shared_ciphers, METH_NOARGS, _ssl__SSLSocket_shared_ciphers__doc__}, 91 92 static PyObject * 93 _ssl__SSLSocket_shared_ciphers_impl(PySSLSocket *self); 94 95 static PyObject * 96 _ssl__SSLSocket_shared_ciphers(PySSLSocket *self, PyObject *Py_UNUSED(ignored)) 97 { 98 return _ssl__SSLSocket_shared_ciphers_impl(self); 99 } 100 101 PyDoc_STRVAR(_ssl__SSLSocket_cipher__doc__, 102 "cipher($self, /)\n" 103 "--\n" 104 "\n"); 105 106 #define _SSL__SSLSOCKET_CIPHER_METHODDEF \ 107 {"cipher", (PyCFunction)_ssl__SSLSocket_cipher, METH_NOARGS, _ssl__SSLSocket_cipher__doc__}, 108 109 static PyObject * 110 _ssl__SSLSocket_cipher_impl(PySSLSocket *self); 111 112 static PyObject * 113 _ssl__SSLSocket_cipher(PySSLSocket *self, PyObject *Py_UNUSED(ignored)) 114 { 115 return _ssl__SSLSocket_cipher_impl(self); 116 } 117 118 PyDoc_STRVAR(_ssl__SSLSocket_version__doc__, 119 "version($self, /)\n" 120 "--\n" 121 "\n"); 122 123 #define _SSL__SSLSOCKET_VERSION_METHODDEF \ 124 {"version", (PyCFunction)_ssl__SSLSocket_version, METH_NOARGS, _ssl__SSLSocket_version__doc__}, 125 126 static PyObject * 127 _ssl__SSLSocket_version_impl(PySSLSocket *self); 128 129 static PyObject * 130 _ssl__SSLSocket_version(PySSLSocket *self, PyObject *Py_UNUSED(ignored)) 131 { 132 return _ssl__SSLSocket_version_impl(self); 133 } 134 135 #if defined(OPENSSL_NPN_NEGOTIATED) 136 137 PyDoc_STRVAR(_ssl__SSLSocket_selected_npn_protocol__doc__, 138 "selected_npn_protocol($self, /)\n" 139 "--\n" 140 "\n"); 141 142 #define _SSL__SSLSOCKET_SELECTED_NPN_PROTOCOL_METHODDEF \ 143 {"selected_npn_protocol", (PyCFunction)_ssl__SSLSocket_selected_npn_protocol, METH_NOARGS, _ssl__SSLSocket_selected_npn_protocol__doc__}, 144 145 static PyObject * 146 _ssl__SSLSocket_selected_npn_protocol_impl(PySSLSocket *self); 147 148 static PyObject * 149 _ssl__SSLSocket_selected_npn_protocol(PySSLSocket *self, PyObject *Py_UNUSED(ignored)) 150 { 151 return _ssl__SSLSocket_selected_npn_protocol_impl(self); 152 } 153 154 #endif /* defined(OPENSSL_NPN_NEGOTIATED) */ 155 156 #if defined(HAVE_ALPN) 157 158 PyDoc_STRVAR(_ssl__SSLSocket_selected_alpn_protocol__doc__, 159 "selected_alpn_protocol($self, /)\n" 160 "--\n" 161 "\n"); 162 163 #define _SSL__SSLSOCKET_SELECTED_ALPN_PROTOCOL_METHODDEF \ 164 {"selected_alpn_protocol", (PyCFunction)_ssl__SSLSocket_selected_alpn_protocol, METH_NOARGS, _ssl__SSLSocket_selected_alpn_protocol__doc__}, 165 166 static PyObject * 167 _ssl__SSLSocket_selected_alpn_protocol_impl(PySSLSocket *self); 168 169 static PyObject * 170 _ssl__SSLSocket_selected_alpn_protocol(PySSLSocket *self, PyObject *Py_UNUSED(ignored)) 171 { 172 return _ssl__SSLSocket_selected_alpn_protocol_impl(self); 173 } 174 175 #endif /* defined(HAVE_ALPN) */ 176 177 PyDoc_STRVAR(_ssl__SSLSocket_compression__doc__, 178 "compression($self, /)\n" 179 "--\n" 180 "\n"); 181 182 #define _SSL__SSLSOCKET_COMPRESSION_METHODDEF \ 183 {"compression", (PyCFunction)_ssl__SSLSocket_compression, METH_NOARGS, _ssl__SSLSocket_compression__doc__}, 184 185 static PyObject * 186 _ssl__SSLSocket_compression_impl(PySSLSocket *self); 187 188 static PyObject * 189 _ssl__SSLSocket_compression(PySSLSocket *self, PyObject *Py_UNUSED(ignored)) 190 { 191 return _ssl__SSLSocket_compression_impl(self); 192 } 193 194 PyDoc_STRVAR(_ssl__SSLSocket_write__doc__, 195 "write($self, b, /)\n" 196 "--\n" 197 "\n" 198 "Writes the bytes-like object b into the SSL object.\n" 199 "\n" 200 "Returns the number of bytes written."); 201 202 #define _SSL__SSLSOCKET_WRITE_METHODDEF \ 203 {"write", (PyCFunction)_ssl__SSLSocket_write, METH_O, _ssl__SSLSocket_write__doc__}, 204 205 static PyObject * 206 _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b); 207 208 static PyObject * 209 _ssl__SSLSocket_write(PySSLSocket *self, PyObject *arg) 210 { 211 PyObject *return_value = NULL; 212 Py_buffer b = {NULL, NULL}; 213 214 if (!PyArg_Parse(arg, "y*:write", &b)) { 215 goto exit; 216 } 217 return_value = _ssl__SSLSocket_write_impl(self, &b); 218 219 exit: 220 /* Cleanup for b */ 221 if (b.obj) { 222 PyBuffer_Release(&b); 223 } 224 225 return return_value; 226 } 227 228 PyDoc_STRVAR(_ssl__SSLSocket_pending__doc__, 229 "pending($self, /)\n" 230 "--\n" 231 "\n" 232 "Returns the number of already decrypted bytes available for read, pending on the connection."); 233 234 #define _SSL__SSLSOCKET_PENDING_METHODDEF \ 235 {"pending", (PyCFunction)_ssl__SSLSocket_pending, METH_NOARGS, _ssl__SSLSocket_pending__doc__}, 236 237 static PyObject * 238 _ssl__SSLSocket_pending_impl(PySSLSocket *self); 239 240 static PyObject * 241 _ssl__SSLSocket_pending(PySSLSocket *self, PyObject *Py_UNUSED(ignored)) 242 { 243 return _ssl__SSLSocket_pending_impl(self); 244 } 245 246 PyDoc_STRVAR(_ssl__SSLSocket_read__doc__, 247 "read(size, [buffer])\n" 248 "Read up to size bytes from the SSL socket."); 249 250 #define _SSL__SSLSOCKET_READ_METHODDEF \ 251 {"read", (PyCFunction)_ssl__SSLSocket_read, METH_VARARGS, _ssl__SSLSocket_read__doc__}, 252 253 static PyObject * 254 _ssl__SSLSocket_read_impl(PySSLSocket *self, int len, int group_right_1, 255 Py_buffer *buffer); 256 257 static PyObject * 258 _ssl__SSLSocket_read(PySSLSocket *self, PyObject *args) 259 { 260 PyObject *return_value = NULL; 261 int len; 262 int group_right_1 = 0; 263 Py_buffer buffer = {NULL, NULL}; 264 265 switch (PyTuple_GET_SIZE(args)) { 266 case 1: 267 if (!PyArg_ParseTuple(args, "i:read", &len)) { 268 goto exit; 269 } 270 break; 271 case 2: 272 if (!PyArg_ParseTuple(args, "iw*:read", &len, &buffer)) { 273 goto exit; 274 } 275 group_right_1 = 1; 276 break; 277 default: 278 PyErr_SetString(PyExc_TypeError, "_ssl._SSLSocket.read requires 1 to 2 arguments"); 279 goto exit; 280 } 281 return_value = _ssl__SSLSocket_read_impl(self, len, group_right_1, &buffer); 282 283 exit: 284 /* Cleanup for buffer */ 285 if (buffer.obj) { 286 PyBuffer_Release(&buffer); 287 } 288 289 return return_value; 290 } 291 292 PyDoc_STRVAR(_ssl__SSLSocket_shutdown__doc__, 293 "shutdown($self, /)\n" 294 "--\n" 295 "\n" 296 "Does the SSL shutdown handshake with the remote end.\n" 297 "\n" 298 "Returns the underlying socket object."); 299 300 #define _SSL__SSLSOCKET_SHUTDOWN_METHODDEF \ 301 {"shutdown", (PyCFunction)_ssl__SSLSocket_shutdown, METH_NOARGS, _ssl__SSLSocket_shutdown__doc__}, 302 303 static PyObject * 304 _ssl__SSLSocket_shutdown_impl(PySSLSocket *self); 305 306 static PyObject * 307 _ssl__SSLSocket_shutdown(PySSLSocket *self, PyObject *Py_UNUSED(ignored)) 308 { 309 return _ssl__SSLSocket_shutdown_impl(self); 310 } 311 312 PyDoc_STRVAR(_ssl__SSLSocket_tls_unique_cb__doc__, 313 "tls_unique_cb($self, /)\n" 314 "--\n" 315 "\n" 316 "Returns the \'tls-unique\' channel binding data, as defined by RFC 5929.\n" 317 "\n" 318 "If the TLS handshake is not yet complete, None is returned."); 319 320 #define _SSL__SSLSOCKET_TLS_UNIQUE_CB_METHODDEF \ 321 {"tls_unique_cb", (PyCFunction)_ssl__SSLSocket_tls_unique_cb, METH_NOARGS, _ssl__SSLSocket_tls_unique_cb__doc__}, 322 323 static PyObject * 324 _ssl__SSLSocket_tls_unique_cb_impl(PySSLSocket *self); 325 326 static PyObject * 327 _ssl__SSLSocket_tls_unique_cb(PySSLSocket *self, PyObject *Py_UNUSED(ignored)) 328 { 329 return _ssl__SSLSocket_tls_unique_cb_impl(self); 330 } 331 332 static PyObject * 333 _ssl__SSLContext_impl(PyTypeObject *type, int proto_version); 334 335 static PyObject * 336 _ssl__SSLContext(PyTypeObject *type, PyObject *args, PyObject *kwargs) 337 { 338 PyObject *return_value = NULL; 339 int proto_version; 340 341 if ((type == &PySSLContext_Type) && 342 !_PyArg_NoKeywords("_SSLContext", kwargs)) { 343 goto exit; 344 } 345 if (!PyArg_ParseTuple(args, "i:_SSLContext", 346 &proto_version)) { 347 goto exit; 348 } 349 return_value = _ssl__SSLContext_impl(type, proto_version); 350 351 exit: 352 return return_value; 353 } 354 355 PyDoc_STRVAR(_ssl__SSLContext_set_ciphers__doc__, 356 "set_ciphers($self, cipherlist, /)\n" 357 "--\n" 358 "\n"); 359 360 #define _SSL__SSLCONTEXT_SET_CIPHERS_METHODDEF \ 361 {"set_ciphers", (PyCFunction)_ssl__SSLContext_set_ciphers, METH_O, _ssl__SSLContext_set_ciphers__doc__}, 362 363 static PyObject * 364 _ssl__SSLContext_set_ciphers_impl(PySSLContext *self, const char *cipherlist); 365 366 static PyObject * 367 _ssl__SSLContext_set_ciphers(PySSLContext *self, PyObject *arg) 368 { 369 PyObject *return_value = NULL; 370 const char *cipherlist; 371 372 if (!PyArg_Parse(arg, "s:set_ciphers", &cipherlist)) { 373 goto exit; 374 } 375 return_value = _ssl__SSLContext_set_ciphers_impl(self, cipherlist); 376 377 exit: 378 return return_value; 379 } 380 381 #if (OPENSSL_VERSION_NUMBER >= 0x10002000UL) 382 383 PyDoc_STRVAR(_ssl__SSLContext_get_ciphers__doc__, 384 "get_ciphers($self, /)\n" 385 "--\n" 386 "\n"); 387 388 #define _SSL__SSLCONTEXT_GET_CIPHERS_METHODDEF \ 389 {"get_ciphers", (PyCFunction)_ssl__SSLContext_get_ciphers, METH_NOARGS, _ssl__SSLContext_get_ciphers__doc__}, 390 391 static PyObject * 392 _ssl__SSLContext_get_ciphers_impl(PySSLContext *self); 393 394 static PyObject * 395 _ssl__SSLContext_get_ciphers(PySSLContext *self, PyObject *Py_UNUSED(ignored)) 396 { 397 return _ssl__SSLContext_get_ciphers_impl(self); 398 } 399 400 #endif /* (OPENSSL_VERSION_NUMBER >= 0x10002000UL) */ 401 402 PyDoc_STRVAR(_ssl__SSLContext__set_npn_protocols__doc__, 403 "_set_npn_protocols($self, protos, /)\n" 404 "--\n" 405 "\n"); 406 407 #define _SSL__SSLCONTEXT__SET_NPN_PROTOCOLS_METHODDEF \ 408 {"_set_npn_protocols", (PyCFunction)_ssl__SSLContext__set_npn_protocols, METH_O, _ssl__SSLContext__set_npn_protocols__doc__}, 409 410 static PyObject * 411 _ssl__SSLContext__set_npn_protocols_impl(PySSLContext *self, 412 Py_buffer *protos); 413 414 static PyObject * 415 _ssl__SSLContext__set_npn_protocols(PySSLContext *self, PyObject *arg) 416 { 417 PyObject *return_value = NULL; 418 Py_buffer protos = {NULL, NULL}; 419 420 if (!PyArg_Parse(arg, "y*:_set_npn_protocols", &protos)) { 421 goto exit; 422 } 423 return_value = _ssl__SSLContext__set_npn_protocols_impl(self, &protos); 424 425 exit: 426 /* Cleanup for protos */ 427 if (protos.obj) { 428 PyBuffer_Release(&protos); 429 } 430 431 return return_value; 432 } 433 434 PyDoc_STRVAR(_ssl__SSLContext__set_alpn_protocols__doc__, 435 "_set_alpn_protocols($self, protos, /)\n" 436 "--\n" 437 "\n"); 438 439 #define _SSL__SSLCONTEXT__SET_ALPN_PROTOCOLS_METHODDEF \ 440 {"_set_alpn_protocols", (PyCFunction)_ssl__SSLContext__set_alpn_protocols, METH_O, _ssl__SSLContext__set_alpn_protocols__doc__}, 441 442 static PyObject * 443 _ssl__SSLContext__set_alpn_protocols_impl(PySSLContext *self, 444 Py_buffer *protos); 445 446 static PyObject * 447 _ssl__SSLContext__set_alpn_protocols(PySSLContext *self, PyObject *arg) 448 { 449 PyObject *return_value = NULL; 450 Py_buffer protos = {NULL, NULL}; 451 452 if (!PyArg_Parse(arg, "y*:_set_alpn_protocols", &protos)) { 453 goto exit; 454 } 455 return_value = _ssl__SSLContext__set_alpn_protocols_impl(self, &protos); 456 457 exit: 458 /* Cleanup for protos */ 459 if (protos.obj) { 460 PyBuffer_Release(&protos); 461 } 462 463 return return_value; 464 } 465 466 PyDoc_STRVAR(_ssl__SSLContext_load_cert_chain__doc__, 467 "load_cert_chain($self, /, certfile, keyfile=None, password=None)\n" 468 "--\n" 469 "\n"); 470 471 #define _SSL__SSLCONTEXT_LOAD_CERT_CHAIN_METHODDEF \ 472 {"load_cert_chain", (PyCFunction)_ssl__SSLContext_load_cert_chain, METH_FASTCALL, _ssl__SSLContext_load_cert_chain__doc__}, 473 474 static PyObject * 475 _ssl__SSLContext_load_cert_chain_impl(PySSLContext *self, PyObject *certfile, 476 PyObject *keyfile, PyObject *password); 477 478 static PyObject * 479 _ssl__SSLContext_load_cert_chain(PySSLContext *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) 480 { 481 PyObject *return_value = NULL; 482 static const char * const _keywords[] = {"certfile", "keyfile", "password", NULL}; 483 static _PyArg_Parser _parser = {"O|OO:load_cert_chain", _keywords, 0}; 484 PyObject *certfile; 485 PyObject *keyfile = NULL; 486 PyObject *password = NULL; 487 488 if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, 489 &certfile, &keyfile, &password)) { 490 goto exit; 491 } 492 return_value = _ssl__SSLContext_load_cert_chain_impl(self, certfile, keyfile, password); 493 494 exit: 495 return return_value; 496 } 497 498 PyDoc_STRVAR(_ssl__SSLContext_load_verify_locations__doc__, 499 "load_verify_locations($self, /, cafile=None, capath=None, cadata=None)\n" 500 "--\n" 501 "\n"); 502 503 #define _SSL__SSLCONTEXT_LOAD_VERIFY_LOCATIONS_METHODDEF \ 504 {"load_verify_locations", (PyCFunction)_ssl__SSLContext_load_verify_locations, METH_FASTCALL, _ssl__SSLContext_load_verify_locations__doc__}, 505 506 static PyObject * 507 _ssl__SSLContext_load_verify_locations_impl(PySSLContext *self, 508 PyObject *cafile, 509 PyObject *capath, 510 PyObject *cadata); 511 512 static PyObject * 513 _ssl__SSLContext_load_verify_locations(PySSLContext *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) 514 { 515 PyObject *return_value = NULL; 516 static const char * const _keywords[] = {"cafile", "capath", "cadata", NULL}; 517 static _PyArg_Parser _parser = {"|OOO:load_verify_locations", _keywords, 0}; 518 PyObject *cafile = NULL; 519 PyObject *capath = NULL; 520 PyObject *cadata = NULL; 521 522 if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, 523 &cafile, &capath, &cadata)) { 524 goto exit; 525 } 526 return_value = _ssl__SSLContext_load_verify_locations_impl(self, cafile, capath, cadata); 527 528 exit: 529 return return_value; 530 } 531 532 PyDoc_STRVAR(_ssl__SSLContext_load_dh_params__doc__, 533 "load_dh_params($self, path, /)\n" 534 "--\n" 535 "\n"); 536 537 #define _SSL__SSLCONTEXT_LOAD_DH_PARAMS_METHODDEF \ 538 {"load_dh_params", (PyCFunction)_ssl__SSLContext_load_dh_params, METH_O, _ssl__SSLContext_load_dh_params__doc__}, 539 540 PyDoc_STRVAR(_ssl__SSLContext__wrap_socket__doc__, 541 "_wrap_socket($self, /, sock, server_side, server_hostname=None)\n" 542 "--\n" 543 "\n"); 544 545 #define _SSL__SSLCONTEXT__WRAP_SOCKET_METHODDEF \ 546 {"_wrap_socket", (PyCFunction)_ssl__SSLContext__wrap_socket, METH_FASTCALL, _ssl__SSLContext__wrap_socket__doc__}, 547 548 static PyObject * 549 _ssl__SSLContext__wrap_socket_impl(PySSLContext *self, PyObject *sock, 550 int server_side, PyObject *hostname_obj); 551 552 static PyObject * 553 _ssl__SSLContext__wrap_socket(PySSLContext *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) 554 { 555 PyObject *return_value = NULL; 556 static const char * const _keywords[] = {"sock", "server_side", "server_hostname", NULL}; 557 static _PyArg_Parser _parser = {"O!i|O:_wrap_socket", _keywords, 0}; 558 PyObject *sock; 559 int server_side; 560 PyObject *hostname_obj = Py_None; 561 562 if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, 563 PySocketModule.Sock_Type, &sock, &server_side, &hostname_obj)) { 564 goto exit; 565 } 566 return_value = _ssl__SSLContext__wrap_socket_impl(self, sock, server_side, hostname_obj); 567 568 exit: 569 return return_value; 570 } 571 572 PyDoc_STRVAR(_ssl__SSLContext__wrap_bio__doc__, 573 "_wrap_bio($self, /, incoming, outgoing, server_side,\n" 574 " server_hostname=None)\n" 575 "--\n" 576 "\n"); 577 578 #define _SSL__SSLCONTEXT__WRAP_BIO_METHODDEF \ 579 {"_wrap_bio", (PyCFunction)_ssl__SSLContext__wrap_bio, METH_FASTCALL, _ssl__SSLContext__wrap_bio__doc__}, 580 581 static PyObject * 582 _ssl__SSLContext__wrap_bio_impl(PySSLContext *self, PySSLMemoryBIO *incoming, 583 PySSLMemoryBIO *outgoing, int server_side, 584 PyObject *hostname_obj); 585 586 static PyObject * 587 _ssl__SSLContext__wrap_bio(PySSLContext *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) 588 { 589 PyObject *return_value = NULL; 590 static const char * const _keywords[] = {"incoming", "outgoing", "server_side", "server_hostname", NULL}; 591 static _PyArg_Parser _parser = {"O!O!i|O:_wrap_bio", _keywords, 0}; 592 PySSLMemoryBIO *incoming; 593 PySSLMemoryBIO *outgoing; 594 int server_side; 595 PyObject *hostname_obj = Py_None; 596 597 if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, 598 &PySSLMemoryBIO_Type, &incoming, &PySSLMemoryBIO_Type, &outgoing, &server_side, &hostname_obj)) { 599 goto exit; 600 } 601 return_value = _ssl__SSLContext__wrap_bio_impl(self, incoming, outgoing, server_side, hostname_obj); 602 603 exit: 604 return return_value; 605 } 606 607 PyDoc_STRVAR(_ssl__SSLContext_session_stats__doc__, 608 "session_stats($self, /)\n" 609 "--\n" 610 "\n"); 611 612 #define _SSL__SSLCONTEXT_SESSION_STATS_METHODDEF \ 613 {"session_stats", (PyCFunction)_ssl__SSLContext_session_stats, METH_NOARGS, _ssl__SSLContext_session_stats__doc__}, 614 615 static PyObject * 616 _ssl__SSLContext_session_stats_impl(PySSLContext *self); 617 618 static PyObject * 619 _ssl__SSLContext_session_stats(PySSLContext *self, PyObject *Py_UNUSED(ignored)) 620 { 621 return _ssl__SSLContext_session_stats_impl(self); 622 } 623 624 PyDoc_STRVAR(_ssl__SSLContext_set_default_verify_paths__doc__, 625 "set_default_verify_paths($self, /)\n" 626 "--\n" 627 "\n"); 628 629 #define _SSL__SSLCONTEXT_SET_DEFAULT_VERIFY_PATHS_METHODDEF \ 630 {"set_default_verify_paths", (PyCFunction)_ssl__SSLContext_set_default_verify_paths, METH_NOARGS, _ssl__SSLContext_set_default_verify_paths__doc__}, 631 632 static PyObject * 633 _ssl__SSLContext_set_default_verify_paths_impl(PySSLContext *self); 634 635 static PyObject * 636 _ssl__SSLContext_set_default_verify_paths(PySSLContext *self, PyObject *Py_UNUSED(ignored)) 637 { 638 return _ssl__SSLContext_set_default_verify_paths_impl(self); 639 } 640 641 #if !defined(OPENSSL_NO_ECDH) 642 643 PyDoc_STRVAR(_ssl__SSLContext_set_ecdh_curve__doc__, 644 "set_ecdh_curve($self, name, /)\n" 645 "--\n" 646 "\n"); 647 648 #define _SSL__SSLCONTEXT_SET_ECDH_CURVE_METHODDEF \ 649 {"set_ecdh_curve", (PyCFunction)_ssl__SSLContext_set_ecdh_curve, METH_O, _ssl__SSLContext_set_ecdh_curve__doc__}, 650 651 #endif /* !defined(OPENSSL_NO_ECDH) */ 652 653 PyDoc_STRVAR(_ssl__SSLContext_set_servername_callback__doc__, 654 "set_servername_callback($self, method, /)\n" 655 "--\n" 656 "\n" 657 "Set a callback that will be called when a server name is provided by the SSL/TLS client in the SNI extension.\n" 658 "\n" 659 "If the argument is None then the callback is disabled. The method is called\n" 660 "with the SSLSocket, the server name as a string, and the SSLContext object.\n" 661 "See RFC 6066 for details of the SNI extension."); 662 663 #define _SSL__SSLCONTEXT_SET_SERVERNAME_CALLBACK_METHODDEF \ 664 {"set_servername_callback", (PyCFunction)_ssl__SSLContext_set_servername_callback, METH_O, _ssl__SSLContext_set_servername_callback__doc__}, 665 666 PyDoc_STRVAR(_ssl__SSLContext_cert_store_stats__doc__, 667 "cert_store_stats($self, /)\n" 668 "--\n" 669 "\n" 670 "Returns quantities of loaded X.509 certificates.\n" 671 "\n" 672 "X.509 certificates with a CA extension and certificate revocation lists\n" 673 "inside the context\'s cert store.\n" 674 "\n" 675 "NOTE: Certificates in a capath directory aren\'t loaded unless they have\n" 676 "been used at least once."); 677 678 #define _SSL__SSLCONTEXT_CERT_STORE_STATS_METHODDEF \ 679 {"cert_store_stats", (PyCFunction)_ssl__SSLContext_cert_store_stats, METH_NOARGS, _ssl__SSLContext_cert_store_stats__doc__}, 680 681 static PyObject * 682 _ssl__SSLContext_cert_store_stats_impl(PySSLContext *self); 683 684 static PyObject * 685 _ssl__SSLContext_cert_store_stats(PySSLContext *self, PyObject *Py_UNUSED(ignored)) 686 { 687 return _ssl__SSLContext_cert_store_stats_impl(self); 688 } 689 690 PyDoc_STRVAR(_ssl__SSLContext_get_ca_certs__doc__, 691 "get_ca_certs($self, /, binary_form=False)\n" 692 "--\n" 693 "\n" 694 "Returns a list of dicts with information of loaded CA certs.\n" 695 "\n" 696 "If the optional argument is True, returns a DER-encoded copy of the CA\n" 697 "certificate.\n" 698 "\n" 699 "NOTE: Certificates in a capath directory aren\'t loaded unless they have\n" 700 "been used at least once."); 701 702 #define _SSL__SSLCONTEXT_GET_CA_CERTS_METHODDEF \ 703 {"get_ca_certs", (PyCFunction)_ssl__SSLContext_get_ca_certs, METH_FASTCALL, _ssl__SSLContext_get_ca_certs__doc__}, 704 705 static PyObject * 706 _ssl__SSLContext_get_ca_certs_impl(PySSLContext *self, int binary_form); 707 708 static PyObject * 709 _ssl__SSLContext_get_ca_certs(PySSLContext *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) 710 { 711 PyObject *return_value = NULL; 712 static const char * const _keywords[] = {"binary_form", NULL}; 713 static _PyArg_Parser _parser = {"|p:get_ca_certs", _keywords, 0}; 714 int binary_form = 0; 715 716 if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, 717 &binary_form)) { 718 goto exit; 719 } 720 return_value = _ssl__SSLContext_get_ca_certs_impl(self, binary_form); 721 722 exit: 723 return return_value; 724 } 725 726 static PyObject * 727 _ssl_MemoryBIO_impl(PyTypeObject *type); 728 729 static PyObject * 730 _ssl_MemoryBIO(PyTypeObject *type, PyObject *args, PyObject *kwargs) 731 { 732 PyObject *return_value = NULL; 733 734 if ((type == &PySSLMemoryBIO_Type) && 735 !_PyArg_NoPositional("MemoryBIO", args)) { 736 goto exit; 737 } 738 if ((type == &PySSLMemoryBIO_Type) && 739 !_PyArg_NoKeywords("MemoryBIO", kwargs)) { 740 goto exit; 741 } 742 return_value = _ssl_MemoryBIO_impl(type); 743 744 exit: 745 return return_value; 746 } 747 748 PyDoc_STRVAR(_ssl_MemoryBIO_read__doc__, 749 "read($self, size=-1, /)\n" 750 "--\n" 751 "\n" 752 "Read up to size bytes from the memory BIO.\n" 753 "\n" 754 "If size is not specified, read the entire buffer.\n" 755 "If the return value is an empty bytes instance, this means either\n" 756 "EOF or that no data is available. Use the \"eof\" property to\n" 757 "distinguish between the two."); 758 759 #define _SSL_MEMORYBIO_READ_METHODDEF \ 760 {"read", (PyCFunction)_ssl_MemoryBIO_read, METH_VARARGS, _ssl_MemoryBIO_read__doc__}, 761 762 static PyObject * 763 _ssl_MemoryBIO_read_impl(PySSLMemoryBIO *self, int len); 764 765 static PyObject * 766 _ssl_MemoryBIO_read(PySSLMemoryBIO *self, PyObject *args) 767 { 768 PyObject *return_value = NULL; 769 int len = -1; 770 771 if (!PyArg_ParseTuple(args, "|i:read", 772 &len)) { 773 goto exit; 774 } 775 return_value = _ssl_MemoryBIO_read_impl(self, len); 776 777 exit: 778 return return_value; 779 } 780 781 PyDoc_STRVAR(_ssl_MemoryBIO_write__doc__, 782 "write($self, b, /)\n" 783 "--\n" 784 "\n" 785 "Writes the bytes b into the memory BIO.\n" 786 "\n" 787 "Returns the number of bytes written."); 788 789 #define _SSL_MEMORYBIO_WRITE_METHODDEF \ 790 {"write", (PyCFunction)_ssl_MemoryBIO_write, METH_O, _ssl_MemoryBIO_write__doc__}, 791 792 static PyObject * 793 _ssl_MemoryBIO_write_impl(PySSLMemoryBIO *self, Py_buffer *b); 794 795 static PyObject * 796 _ssl_MemoryBIO_write(PySSLMemoryBIO *self, PyObject *arg) 797 { 798 PyObject *return_value = NULL; 799 Py_buffer b = {NULL, NULL}; 800 801 if (!PyArg_Parse(arg, "y*:write", &b)) { 802 goto exit; 803 } 804 return_value = _ssl_MemoryBIO_write_impl(self, &b); 805 806 exit: 807 /* Cleanup for b */ 808 if (b.obj) { 809 PyBuffer_Release(&b); 810 } 811 812 return return_value; 813 } 814 815 PyDoc_STRVAR(_ssl_MemoryBIO_write_eof__doc__, 816 "write_eof($self, /)\n" 817 "--\n" 818 "\n" 819 "Write an EOF marker to the memory BIO.\n" 820 "\n" 821 "When all data has been read, the \"eof\" property will be True."); 822 823 #define _SSL_MEMORYBIO_WRITE_EOF_METHODDEF \ 824 {"write_eof", (PyCFunction)_ssl_MemoryBIO_write_eof, METH_NOARGS, _ssl_MemoryBIO_write_eof__doc__}, 825 826 static PyObject * 827 _ssl_MemoryBIO_write_eof_impl(PySSLMemoryBIO *self); 828 829 static PyObject * 830 _ssl_MemoryBIO_write_eof(PySSLMemoryBIO *self, PyObject *Py_UNUSED(ignored)) 831 { 832 return _ssl_MemoryBIO_write_eof_impl(self); 833 } 834 835 PyDoc_STRVAR(_ssl_RAND_add__doc__, 836 "RAND_add($module, string, entropy, /)\n" 837 "--\n" 838 "\n" 839 "Mix string into the OpenSSL PRNG state.\n" 840 "\n" 841 "entropy (a float) is a lower bound on the entropy contained in\n" 842 "string. See RFC 1750."); 843 844 #define _SSL_RAND_ADD_METHODDEF \ 845 {"RAND_add", (PyCFunction)_ssl_RAND_add, METH_VARARGS, _ssl_RAND_add__doc__}, 846 847 static PyObject * 848 _ssl_RAND_add_impl(PyObject *module, Py_buffer *view, double entropy); 849 850 static PyObject * 851 _ssl_RAND_add(PyObject *module, PyObject *args) 852 { 853 PyObject *return_value = NULL; 854 Py_buffer view = {NULL, NULL}; 855 double entropy; 856 857 if (!PyArg_ParseTuple(args, "s*d:RAND_add", 858 &view, &entropy)) { 859 goto exit; 860 } 861 return_value = _ssl_RAND_add_impl(module, &view, entropy); 862 863 exit: 864 /* Cleanup for view */ 865 if (view.obj) { 866 PyBuffer_Release(&view); 867 } 868 869 return return_value; 870 } 871 872 PyDoc_STRVAR(_ssl_RAND_bytes__doc__, 873 "RAND_bytes($module, n, /)\n" 874 "--\n" 875 "\n" 876 "Generate n cryptographically strong pseudo-random bytes."); 877 878 #define _SSL_RAND_BYTES_METHODDEF \ 879 {"RAND_bytes", (PyCFunction)_ssl_RAND_bytes, METH_O, _ssl_RAND_bytes__doc__}, 880 881 static PyObject * 882 _ssl_RAND_bytes_impl(PyObject *module, int n); 883 884 static PyObject * 885 _ssl_RAND_bytes(PyObject *module, PyObject *arg) 886 { 887 PyObject *return_value = NULL; 888 int n; 889 890 if (!PyArg_Parse(arg, "i:RAND_bytes", &n)) { 891 goto exit; 892 } 893 return_value = _ssl_RAND_bytes_impl(module, n); 894 895 exit: 896 return return_value; 897 } 898 899 PyDoc_STRVAR(_ssl_RAND_pseudo_bytes__doc__, 900 "RAND_pseudo_bytes($module, n, /)\n" 901 "--\n" 902 "\n" 903 "Generate n pseudo-random bytes.\n" 904 "\n" 905 "Return a pair (bytes, is_cryptographic). is_cryptographic is True\n" 906 "if the bytes generated are cryptographically strong."); 907 908 #define _SSL_RAND_PSEUDO_BYTES_METHODDEF \ 909 {"RAND_pseudo_bytes", (PyCFunction)_ssl_RAND_pseudo_bytes, METH_O, _ssl_RAND_pseudo_bytes__doc__}, 910 911 static PyObject * 912 _ssl_RAND_pseudo_bytes_impl(PyObject *module, int n); 913 914 static PyObject * 915 _ssl_RAND_pseudo_bytes(PyObject *module, PyObject *arg) 916 { 917 PyObject *return_value = NULL; 918 int n; 919 920 if (!PyArg_Parse(arg, "i:RAND_pseudo_bytes", &n)) { 921 goto exit; 922 } 923 return_value = _ssl_RAND_pseudo_bytes_impl(module, n); 924 925 exit: 926 return return_value; 927 } 928 929 PyDoc_STRVAR(_ssl_RAND_status__doc__, 930 "RAND_status($module, /)\n" 931 "--\n" 932 "\n" 933 "Returns 1 if the OpenSSL PRNG has been seeded with enough data and 0 if not.\n" 934 "\n" 935 "It is necessary to seed the PRNG with RAND_add() on some platforms before\n" 936 "using the ssl() function."); 937 938 #define _SSL_RAND_STATUS_METHODDEF \ 939 {"RAND_status", (PyCFunction)_ssl_RAND_status, METH_NOARGS, _ssl_RAND_status__doc__}, 940 941 static PyObject * 942 _ssl_RAND_status_impl(PyObject *module); 943 944 static PyObject * 945 _ssl_RAND_status(PyObject *module, PyObject *Py_UNUSED(ignored)) 946 { 947 return _ssl_RAND_status_impl(module); 948 } 949 950 #if !defined(OPENSSL_NO_EGD) 951 952 PyDoc_STRVAR(_ssl_RAND_egd__doc__, 953 "RAND_egd($module, path, /)\n" 954 "--\n" 955 "\n" 956 "Queries the entropy gather daemon (EGD) on the socket named by \'path\'.\n" 957 "\n" 958 "Returns number of bytes read. Raises SSLError if connection to EGD\n" 959 "fails or if it does not provide enough data to seed PRNG."); 960 961 #define _SSL_RAND_EGD_METHODDEF \ 962 {"RAND_egd", (PyCFunction)_ssl_RAND_egd, METH_O, _ssl_RAND_egd__doc__}, 963 964 static PyObject * 965 _ssl_RAND_egd_impl(PyObject *module, PyObject *path); 966 967 static PyObject * 968 _ssl_RAND_egd(PyObject *module, PyObject *arg) 969 { 970 PyObject *return_value = NULL; 971 PyObject *path; 972 973 if (!PyArg_Parse(arg, "O&:RAND_egd", PyUnicode_FSConverter, &path)) { 974 goto exit; 975 } 976 return_value = _ssl_RAND_egd_impl(module, path); 977 978 exit: 979 return return_value; 980 } 981 982 #endif /* !defined(OPENSSL_NO_EGD) */ 983 984 PyDoc_STRVAR(_ssl_get_default_verify_paths__doc__, 985 "get_default_verify_paths($module, /)\n" 986 "--\n" 987 "\n" 988 "Return search paths and environment vars that are used by SSLContext\'s set_default_verify_paths() to load default CAs.\n" 989 "\n" 990 "The values are \'cert_file_env\', \'cert_file\', \'cert_dir_env\', \'cert_dir\'."); 991 992 #define _SSL_GET_DEFAULT_VERIFY_PATHS_METHODDEF \ 993 {"get_default_verify_paths", (PyCFunction)_ssl_get_default_verify_paths, METH_NOARGS, _ssl_get_default_verify_paths__doc__}, 994 995 static PyObject * 996 _ssl_get_default_verify_paths_impl(PyObject *module); 997 998 static PyObject * 999 _ssl_get_default_verify_paths(PyObject *module, PyObject *Py_UNUSED(ignored)) 1000 { 1001 return _ssl_get_default_verify_paths_impl(module); 1002 } 1003 1004 PyDoc_STRVAR(_ssl_txt2obj__doc__, 1005 "txt2obj($module, /, txt, name=False)\n" 1006 "--\n" 1007 "\n" 1008 "Lookup NID, short name, long name and OID of an ASN1_OBJECT.\n" 1009 "\n" 1010 "By default objects are looked up by OID. With name=True short and\n" 1011 "long name are also matched."); 1012 1013 #define _SSL_TXT2OBJ_METHODDEF \ 1014 {"txt2obj", (PyCFunction)_ssl_txt2obj, METH_FASTCALL, _ssl_txt2obj__doc__}, 1015 1016 static PyObject * 1017 _ssl_txt2obj_impl(PyObject *module, const char *txt, int name); 1018 1019 static PyObject * 1020 _ssl_txt2obj(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) 1021 { 1022 PyObject *return_value = NULL; 1023 static const char * const _keywords[] = {"txt", "name", NULL}; 1024 static _PyArg_Parser _parser = {"s|p:txt2obj", _keywords, 0}; 1025 const char *txt; 1026 int name = 0; 1027 1028 if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, 1029 &txt, &name)) { 1030 goto exit; 1031 } 1032 return_value = _ssl_txt2obj_impl(module, txt, name); 1033 1034 exit: 1035 return return_value; 1036 } 1037 1038 PyDoc_STRVAR(_ssl_nid2obj__doc__, 1039 "nid2obj($module, nid, /)\n" 1040 "--\n" 1041 "\n" 1042 "Lookup NID, short name, long name and OID of an ASN1_OBJECT by NID."); 1043 1044 #define _SSL_NID2OBJ_METHODDEF \ 1045 {"nid2obj", (PyCFunction)_ssl_nid2obj, METH_O, _ssl_nid2obj__doc__}, 1046 1047 static PyObject * 1048 _ssl_nid2obj_impl(PyObject *module, int nid); 1049 1050 static PyObject * 1051 _ssl_nid2obj(PyObject *module, PyObject *arg) 1052 { 1053 PyObject *return_value = NULL; 1054 int nid; 1055 1056 if (!PyArg_Parse(arg, "i:nid2obj", &nid)) { 1057 goto exit; 1058 } 1059 return_value = _ssl_nid2obj_impl(module, nid); 1060 1061 exit: 1062 return return_value; 1063 } 1064 1065 #if defined(_MSC_VER) 1066 1067 PyDoc_STRVAR(_ssl_enum_certificates__doc__, 1068 "enum_certificates($module, /, store_name)\n" 1069 "--\n" 1070 "\n" 1071 "Retrieve certificates from Windows\' cert store.\n" 1072 "\n" 1073 "store_name may be one of \'CA\', \'ROOT\' or \'MY\'. The system may provide\n" 1074 "more cert storages, too. The function returns a list of (bytes,\n" 1075 "encoding_type, trust) tuples. The encoding_type flag can be interpreted\n" 1076 "with X509_ASN_ENCODING or PKCS_7_ASN_ENCODING. The trust setting is either\n" 1077 "a set of OIDs or the boolean True."); 1078 1079 #define _SSL_ENUM_CERTIFICATES_METHODDEF \ 1080 {"enum_certificates", (PyCFunction)_ssl_enum_certificates, METH_FASTCALL, _ssl_enum_certificates__doc__}, 1081 1082 static PyObject * 1083 _ssl_enum_certificates_impl(PyObject *module, const char *store_name); 1084 1085 static PyObject * 1086 _ssl_enum_certificates(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) 1087 { 1088 PyObject *return_value = NULL; 1089 static const char * const _keywords[] = {"store_name", NULL}; 1090 static _PyArg_Parser _parser = {"s:enum_certificates", _keywords, 0}; 1091 const char *store_name; 1092 1093 if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, 1094 &store_name)) { 1095 goto exit; 1096 } 1097 return_value = _ssl_enum_certificates_impl(module, store_name); 1098 1099 exit: 1100 return return_value; 1101 } 1102 1103 #endif /* defined(_MSC_VER) */ 1104 1105 #if defined(_MSC_VER) 1106 1107 PyDoc_STRVAR(_ssl_enum_crls__doc__, 1108 "enum_crls($module, /, store_name)\n" 1109 "--\n" 1110 "\n" 1111 "Retrieve CRLs from Windows\' cert store.\n" 1112 "\n" 1113 "store_name may be one of \'CA\', \'ROOT\' or \'MY\'. The system may provide\n" 1114 "more cert storages, too. The function returns a list of (bytes,\n" 1115 "encoding_type) tuples. The encoding_type flag can be interpreted with\n" 1116 "X509_ASN_ENCODING or PKCS_7_ASN_ENCODING."); 1117 1118 #define _SSL_ENUM_CRLS_METHODDEF \ 1119 {"enum_crls", (PyCFunction)_ssl_enum_crls, METH_FASTCALL, _ssl_enum_crls__doc__}, 1120 1121 static PyObject * 1122 _ssl_enum_crls_impl(PyObject *module, const char *store_name); 1123 1124 static PyObject * 1125 _ssl_enum_crls(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) 1126 { 1127 PyObject *return_value = NULL; 1128 static const char * const _keywords[] = {"store_name", NULL}; 1129 static _PyArg_Parser _parser = {"s:enum_crls", _keywords, 0}; 1130 const char *store_name; 1131 1132 if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, 1133 &store_name)) { 1134 goto exit; 1135 } 1136 return_value = _ssl_enum_crls_impl(module, store_name); 1137 1138 exit: 1139 return return_value; 1140 } 1141 1142 #endif /* defined(_MSC_VER) */ 1143 1144 #ifndef _SSL__SSLSOCKET_SELECTED_NPN_PROTOCOL_METHODDEF 1145 #define _SSL__SSLSOCKET_SELECTED_NPN_PROTOCOL_METHODDEF 1146 #endif /* !defined(_SSL__SSLSOCKET_SELECTED_NPN_PROTOCOL_METHODDEF) */ 1147 1148 #ifndef _SSL__SSLSOCKET_SELECTED_ALPN_PROTOCOL_METHODDEF 1149 #define _SSL__SSLSOCKET_SELECTED_ALPN_PROTOCOL_METHODDEF 1150 #endif /* !defined(_SSL__SSLSOCKET_SELECTED_ALPN_PROTOCOL_METHODDEF) */ 1151 1152 #ifndef _SSL__SSLCONTEXT_GET_CIPHERS_METHODDEF 1153 #define _SSL__SSLCONTEXT_GET_CIPHERS_METHODDEF 1154 #endif /* !defined(_SSL__SSLCONTEXT_GET_CIPHERS_METHODDEF) */ 1155 1156 #ifndef _SSL__SSLCONTEXT_SET_ECDH_CURVE_METHODDEF 1157 #define _SSL__SSLCONTEXT_SET_ECDH_CURVE_METHODDEF 1158 #endif /* !defined(_SSL__SSLCONTEXT_SET_ECDH_CURVE_METHODDEF) */ 1159 1160 #ifndef _SSL_RAND_EGD_METHODDEF 1161 #define _SSL_RAND_EGD_METHODDEF 1162 #endif /* !defined(_SSL_RAND_EGD_METHODDEF) */ 1163 1164 #ifndef _SSL_ENUM_CERTIFICATES_METHODDEF 1165 #define _SSL_ENUM_CERTIFICATES_METHODDEF 1166 #endif /* !defined(_SSL_ENUM_CERTIFICATES_METHODDEF) */ 1167 1168 #ifndef _SSL_ENUM_CRLS_METHODDEF 1169 #define _SSL_ENUM_CRLS_METHODDEF 1170 #endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */ 1171 /*[clinic end generated code: output=a859b21fe68a6115 input=a9049054013a1b77]*/ 1172