Skip to content

Commit 94858be

Browse files
committed
post-merge
1 parent f96d44e commit 94858be

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

Modules/_hashopenssl.c

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -433,40 +433,8 @@ raise_smart_ssl_error_f(PyObject *exc_type, const char *fallback_format, ...)
433433
}
434434

435435
/*
436-
<<<<<<< HEAD
437-
* Same as raise_ssl_error() but raise a MemoryError
438-
* if the last error reason is ERR_R_MALLOC_FAILURE.
439-
*/
440-
static void
441-
raise_smart_ssl_error(PyObject *exc_type, const char *fallback_format, ...)
442-
{
443-
444-
assert(fallback_format != NULL);
445-
unsigned long errcode = ERR_peek_last_error();
446-
if (errcode) {
447-
ERR_clear_error();
448-
set_ssl_exception_from_errcode(
449-
get_smart_ssl_exception_type(errcode, exc_type),
450-
errcode
451-
);
452-
}
453-
else {
454-
va_list vargs;
455-
va_start(vargs, fallback_format);
456-
PyErr_FormatV(exc_type, fallback_format, vargs);
457-
va_end(vargs);
458-
}
459-
}
460-
461-
/*
462-
* Raise an exception with a generic default message after an error occurred.
463-
*
464-
* It can also be used without previous calls to SSL built-in functions,
465-
* in which case a generic error message is provided.
466-
=======
467436
* Raise a ValueError with a default message after an error occurred.
468437
* It can also be used without previous calls to SSL built-in functions.
469-
>>>>>>> feat/hashlib/smart-exceptions-135234
470438
*/
471439
static inline void
472440
notify_ssl_error_occurred(const char *message)
@@ -489,16 +457,6 @@ notify_smart_ssl_error_occurred_in(const char *funcname)
489457
raise_smart_ssl_error_f(PyExc_ValueError,
490458
"error in OpenSSL function %s()", funcname);
491459
}
492-
493-
/*
494-
* Same as notify_ssl_error_occurred() but raise a MemoryError
495-
* if the last error reason is ERR_R_MALLOC_FAILURE.
496-
*/
497-
static inline void
498-
notify_smart_ssl_error_occurred(void)
499-
{
500-
raise_smart_ssl_error(PyExc_ValueError, "no reason supplied");
501-
}
502460
/* LCOV_EXCL_STOP */
503461

504462
/*

0 commit comments

Comments
 (0)