Bugzilla – Attachment 2759 Details for
Bug 2508
Wanting OpenSSL error messages in ssherr() for SSH_ERR_LIBCRYPTO_ERROR
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Simple and thread-unsafe patch to add OpenSSL error strings to ssherr()
print_libcrypto_errors.patch (text/plain), 703 bytes, created by
Tomas Kuthan
on 2015-11-27 02:32:26 AEDT
(
hide
)
Description:
Simple and thread-unsafe patch to add OpenSSL error strings to ssherr()
Filename:
MIME Type:
Creator:
Tomas Kuthan
Created:
2015-11-27 02:32:26 AEDT
Size:
703 bytes
patch
obsolete
>diff -pur old/ssherr.c new/ssherr.c >--- old/ssherr.c >+++ new/ssherr.c >@@ -17,11 +17,13 @@ > > #include <errno.h> > #include <string.h> >+#include <openssl/err.h> > #include "ssherr.h" > > const char * > ssh_err(int n) > { >+ static char err_str[256]; > switch (n) { > case SSH_ERR_SUCCESS: > return "success"; >@@ -68,7 +70,8 @@ ssh_err(int n) > case SSH_ERR_SIGNATURE_INVALID: > return "incorrect signature"; > case SSH_ERR_LIBCRYPTO_ERROR: >- return "error in libcrypto"; /* XXX fetch and return */ >+ ERR_error_string_n(ERR_get_error(), err_str, sizeof (err_str)); >+ return err_str; > case SSH_ERR_UNEXPECTED_TRAILING_DATA: > return "unexpected bytes remain after decoding"; > case SSH_ERR_SYSTEM_ERROR:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2508
: 2759