Telegraf: [inputs.sqlserver] Error in plugin read: connection reset by peer - sql-server

I am using the SQL Server plugin with the telegraf helm chart in the AKS cluster in order to monitor SQL servers that are on premise. My values file is as follows is as follows:
## Exposed telegraf configuration
## For full list of possible values see `/docs/all-config-values.yaml` and `/docs/all-config-values.toml`
## ref: https://docs.influxdata.com/telegraf/v1.1/administration/configuration/
config:
outputs:
- health:
service_address: "http://:8888"
- influxdb:
urls:
- "http://monitoring-influxdb.monitoring.svc.cluster.local:8086"
database: "telegraf"
username: admin
password: admin
inputs:
- sqlserver:
servers:
- "Server="XX.XX.XX.XX;Port=1433;User Id=sql_telegraf;Password=XXXXXXXX;app name=telegraf;log=1;"
However, I seem to be getting the following error all the time:
2020-02-20T04:22:26Z W! [agent] [inputs.sqlserver] did not complete
within its interval
2020-02-20T04:22:36Z W! [agent] [inputs.sqlserver] did not
complete within its interval
2020-02-20T04:22:36Z I! ERROR: Intercepted panic read tcp
YY.YY.YY.YY:45556->XX.XX.XX.XX:1433: read: connection reset by peer │ │ 2020-02-20T04:22:36Z E! [inputs.sqlserver] Error in plugin: read
tcp YY.YY.YY.YY:45556->XX.XX.XX.XX:1433: read: connection reset by
peer
2020-02-20T04:22:46Z W! [agent] [inputs.sqlserver] did not complete within its interval
2020-02-20T04:22:56Z W! [agent] [inputs.sqlserver] did not complete within its interval
2020-02-20T04:22:57Z I! ERROR: Intercepted panic read tcp YY.YY.YY.YY:45980->XX.XX.XX.XX:1433: read: connection reset by peer
2020-02-20T04:22:57Z E! [inputs.sqlserver] Error in plugin: read
tcp YY.YY.YY.YY:45980->XX.XX.XX.XX:1433: read: connection reset by peer
2020-02-20T04:23:01Z I! ERROR: BeginRead failed read tcp
YY.YY.YY.YY:45380->XX.XX.XX.XX:1433: read: connection reset by peer
2020-02-20T04:23:01Z E! [inputs.sqlserver] Error in plugin: read
tcp YY.YY.YY.YY:45380->XX.XX.XX.XX:1433: read: connection reset by peer
2020-02-20T04:23:06Z W! [agent] [inputs.sqlserver] did not complete within its interval
2020-02-20T04:23:08Z I! ERROR: Intercepted panic read tcp
YY.YY.YY.YY:45374->XX.XX.XX.XX:1433: read: connection reset by peer
2020-02-20T04:23:08Z E! [inputs.sqlserver] Error in plugin: read
tcp YY.YY.YY.YY:45374->XX.XX.XX.XX:1433: read: connection reset by peer

Related

Crash while calling Aws::Iot::MqttClientConnectionConfigBuilder.build()

i am getting cross this problem when i try to create an mqtt connection with some key, certificate and an endpoint that i get from provisioning in a previous step, when the i call for Aws::Iot::MqttClientConnectionConfigBuilder.build() to create the connection config, the binary crashes with:
free(): invalid pointer
[INFO] [2022-07-13T08:25:48Z] [00007f7c560cc800] [event-loop] - id=0x555d59343da0: Initializing edge-triggered epoll
[INFO] [2022-07-13T08:25:48Z] [00007f7c560cc800] [event-loop] - id=0x555d59343da0: Using eventfd for cross-thread notifications.
[TRACE] [2022-07-13T08:25:48Z] [00007f7c560cc800] [event-loop] - id=0x555d59343da0: eventfd descriptor 5.
[INFO] [2022-07-13T08:25:48Z] [00007f7c560cc800] [event-loop] - id=0x555d59343da0: Starting event-loop thread.
[INFO] [2022-07-13T08:25:48Z] [00007f7c560cc800] [dns] - id=0x555d593642a0: Initializing default host resolver with 1 max host entries.
[INFO] [2022-07-13T08:25:48Z] [00007f7c560cc800] [channel-bootstrap] - id=0x555d59366550: Initializing client bootstrap with event-loop group 0x555d59365820
[DEBUG] [2022-07-13T08:25:48Z] [00007f7c560cc800] [mqtt-client] - client=0x555d593665c0: Initalizing MQTT client
[DEBUG] [2022-07-13T08:25:48Z] [00007f7c560cc800] [tls-handler] - ctx: Certificate and key have been set, setting them up now.
[INFO] [2022-07-13T08:25:48Z] [00007f7c558c8640] [event-loop] - id=0x555d59343da0: main loop started
[TRACE] [2022-07-13T08:25:48Z] [00007f7c558c8640] [event-loop] - id=0x555d59343da0: subscribing to events on fd 5
[INFO] [2022-07-13T08:25:48Z] [00007f7c558c8640] [event-loop] - id=0x555d59343da0: default timeout 100000, and max events to process per tick 100
[TRACE] [2022-07-13T08:25:48Z] [00007f7c558c8640] [event-loop] - id=0x555d59343da0: waiting for a maximum of 100000 ms
Aborted (core dumped)
after some debugging the binary crashes on :
https://github.com/aws/s2n-tls/blob/8314a96de0c33a426ae877856a8a1a431d354e0d/crypto/s2n_certificate.c#L310
i did not really understand why, more over i saw some double freeing in :
https://github.com/aws/s2n-tls/blob/8314a96de0c33a426ae877856a8a1a431d354e0d/crypto/s2n_certificate.c#L317
that could cause a crash (may be) :).
i am compiling the sdk for x86 architecture and using the following flags: -DOPENSSL_NO_ASM=TRUE -DBUILD_SHARED_LIBS=ON
may be i am missing some thing, any help would be appreciated on how can i solve that.
thank you

Unable to connect with AWS host url using Embedded C SDK

I am trying to run subscribe_publish_sample on device(ARM architecture). For this I have cross compiled the code and copied to device. Required certificates also copied to device. I am getting following error.
Please let me know for any mistake.
ERROR: iot_tls_connect L#164 failed
! mbedtls_net_connect returned -0x52
ERROR: main L#190 Error(-23) connecting to 215740087218.iot.ap-south-1.amazonaws.com:8883
Configurations :
#define AWS_IOT_MQTT_HOST "215740087218.iot.ap-south-1.amazonaws.com" ///< Customer specific MQTT HOST. The same will be used for Thing Shadow
#define AWS_IOT_MQTT_PORT 8883 ///< default port for MQTT/S
#define AWS_IOT_MQTT_CLIENT_ID "RaspberryPi" ///< MQTT client ID should be unique for every device
#define AWS_IOT_MY_THING_NAME "RaspberryPi" ///< Thing Name of the Shadow this device is associated with
#define AWS_IOT_ROOT_CA_FILENAME "rootCA.crt" ///< Root CA file name
#define AWS_IOT_CERTIFICATE_FILENAME "7256bcd191-certificate.pem.crt" ///< device signed certificate file name
#define AWS_IOT_PRIVATE_KEY_FILENAME "7256bcd191-private.pem.key" ///< Device private key filename
// =================================================
======================================================================================
Certificates copied to device :
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs# ls
7256bcd191-certificate.pem.crt 7256bcd191-private.pem.key 7256bcd191-public.pem.key README.txt rootCA.crt
ARN : arn:aws:iot:ap-south-1:215740087218:thing/RaspberryPi
Policy attached : arn:aws:iot:ap-south-1:215740087218:policy/RaspberrypiPolicy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "iot:*",
"Resource": "*"
}
]
}
==============================================================================
Debug Logs for sample :
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/samples/linux/subscribe_publish_sample# ./subscribe_publish_sample
AWS IoT SDK Version 3.0.1-
DEBUG: main L#159 rootCA /home/root/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/samples/linux/subscribe_publish_sample/../../../certs/rootCA.crt
DEBUG: main L#160 clientCRT /home/root/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/samples/linux/subscribe_publish_sample/../../../certs/7256bcd191-certificate.pem.crt
DEBUG: main L#161 clientKey /home/root/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/samples/linux/subscribe_publish_sample/../../../certs/7256bcd191-private.pem.key
Connecting...
DEBUG: iot_tls_connect L#130
. Seeding the random number generator...
DEBUG: iot_tls_connect L#138 . Loading the CA root certificate ...
DEBUG: iot_tls_connect L#144 ok (0 skipped)
DEBUG: iot_tls_connect L#146 . Loading the client cert. and key...
DEBUG: iot_tls_connect L#159 ok
DEBUG: iot_tls_connect L#161 . Connecting to 215740087218.iot.ap-south-1.amazonaws.com/8883...
ERROR: iot_tls_connect L#164 failed
! mbedtls_net_connect returned -0x52
ERROR: main L#190 Error(-23) connecting to 215740087218.iot.ap-south-1.amazonaws.com:8883
telnet logs :
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs# telnet 215740087218.iot.ap-south-1.amazonaws.com 8883
telnet: bad address '215740087218.iot.ap-south-1.amazonaws.com'
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs#
ping response:
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs# ping 215740087218.iot.ap-south-1.amazonaws.com
ping: bad address '215740087218.iot.ap-south-1.amazonaws.com'
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs#
Mosquitto_sub response :
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs# mosquitto_sub --cafile rootCA.crt --cert 7256bcd191-certifi
cate.pem.crt --key 7256bcd191-private.pem.key -h 215740087218.iot.ap-south-1.amazonaws.com -p 8883 -q 0 -d -t sdkTest/sub -i Raspberr
yPi
Unable to connect (Lookup error.).
root#RelySys:~/aws_iot/my_app/aws-iot-device-sdk-embedded-C-master/certs#
The host name you provided seems to be incorrect:
nslookup 215740087218.iot.ap-south-1.amazonaws.com
Server: 127.0.1.1
Address: 127.0.1.1#53
** server can't find 215740087218.iot.ap-south-1.amazonaws.com: NXDOMAIN
This is confirmed by the error as well (in net_socket.h from the SDK):
#define MBEDTLS_ERR_NET_UNKNOWN_HOST -0x0052 /**< Failed to get an IP address for the given hostname. */
Read AWS IoT Connecting Devices. You need to provide the endpoint specific to your account.

Cause: Command execution failed on the local server with non-zero exit code

Failed to fetch information from target servers
Cause: Command execution failed on the local server with non-zero exit code.
command: /usr/local/psa/bin/ipmanage --xml-info
exit code: 255
stdout: <ipinfo>
<ip name="193.160.214.57">
<state>0</state>
<type>shared</type>
<ip_address>193.160.214.57</ip_address>
<mask>255.255.255.255</mask>
<iface>venet0</iface>
<clients>0</clients>
<hostings>0</hostings>
<ftps>false</ftps>
<publicIp></publicIp>
</ip>
</ipinfo>
stderr: [2019-10-20 21:21:51.133] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/f2bmng' '--reload'] with exit code [1]
PHP Fatal error: Uncaught PleskUtilException: f2bmng failed: 2019-10-20 21:21:51,115 fail2ban.jailreader [17670]: ERROR No file(s) found for glob /var/log/secure
2019-10-20 21:21:51,115 fail2ban [17670]: ERROR Failed during configuration: Have not found any log file for ssh jail
ERROR:__main__:Command '['/usr/bin/fail2ban-client', 'reload']' returned non-zero exit status 255 in /usr/local/psa/admin/plib/Service/Agent.php:210
Stack trace:
#0 /usr/local/psa/admin/plib/Ip/Ban/Manager.php(490): Service_Agent->execAndGetResponse('f2bmng', Array, '')
#1 /usr/local/psa/admin/plib/Ip/Ban/Manager.php(458): Ip_Ban_Manager->_callUtility('--reload')
#2 /usr/local/psa/admin/plib/Fail2Ban/EventListener.php(123): Ip_Ban_Manager->reload()
#3 [internal function]: Plesk\Fail2Ban\EventListener->applyChanges()
#4 {main}
thrown in /usr/local/psa/admin/plib/Service/Agent.php on line 210
That is a critical error, migration was stopped.
I don't know what is "wrong" with your plesk (not so familiar with), but fail2ban error is pretty simply:
ERROR No file(s) found for glob /var/log/secure
2019-10-20 21:21:51,115 fail2ban [17670]: ERROR Failed during configuration: Have not found any log file for ssh jail
Your ssh jail seems to be configured to monitor /var/log/secure which is not exist. Either you have to specify proper logpath (/var/log/auth.log?) where ssh logs authentication errors;
or if it is systemd journal on your system, you have to specify backend = systemd for that.
Related fail2ban jail.local would be:
[ssh]
# backend = systemd
logpath = /var/log/auth.log
But you can surely configure this in plesk settings too.
Also note your jail is called ssh, where normally original default jail of fail2ban is sshd (but it could be indeed configured with this name from your maintainer).

Apache-Camel multiple pollenrich() and error on move param

I'm using apache camel version 2.21.1 and i have a trouble with the pollEnrich
to download a specific file from ftp. It looks like when i download 2 file with pollenrich and the operation take some minutes (4 minutes) camel goes in error when moving the first file in the .done directory.
I have this exception:
`WARN o.a.camel.component.file.GenericFileOnCompletion - Error during commit. Exchange[ID-XXX16563-1529920620474-0-8]. Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - File operation failed: 250 CWD command successful.
Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Connection reset by peer: socket write error. Code: 250]
org.apache.camel.component.file.GenericFileOperationFailedException: File operation failed: 250 CWD command successful.
Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Connection reset by peer: socket write error. Code: 250
at org.apache.camel.component.file.remote.FtpOperations.buildDirectory(FtpOperations.java:352)
at org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:106)
at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:111)
at org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:127)
at org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:83)
at org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:57)
at org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:104)
at org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:243)
at org.apache.camel.util.UnitOfWorkHelper.doneUow(UnitOfWorkHelper.java:65)
at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:685)
at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:634)
at org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:251)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:127)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.component.aws.sqs.SqsConsumer.processBatch(SqsConsumer.java:206)
at org.apache.camel.component.aws.sqs.SqsConsumer.poll(SqsConsumer.java:111)
at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Connection reset by peer: socket write error
at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1541)
at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1553)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:71)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
at java.io.BufferedWriter.flush(BufferedWriter.java:254)
at org.apache.commons.net.ftp.FTP.__send(FTP.java:545)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:519)
at org.apache.commons.net.ftp.FTPSClient.sendCommand(FTPSClient.java:568)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:648)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:622)
at org.apache.commons.net.ftp.FTP.pwd(FTP.java:1495)
at org.apache.commons.net.ftp.FTPClient.printWorkingDirectory(FTPClient.java:2738)
at org.apache.camel.component.file.remote.FtpOperations.buildDirectory(FtpOperations.java:329)
... 24 common frames omitted
Caused by: javax.net.ssl.SSLException: java.net.SocketException: Connection reset by peer: socket write error
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1906)
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1870)
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1815)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:128)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
at java.io.BufferedWriter.flush(BufferedWriter.java:254)
at org.apache.commons.net.ftp.FTP.__send(FTP.java:545)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:519)
at org.apache.commons.net.ftp.FTPSClient.sendCommand(FTPSClient.java:568)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:648)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:622)
at org.apache.commons.net.ftp.FTP.pwd(FTP.java:1495)
at org.apache.commons.net.ftp.FTPClient.printWorkingDirectory(FTPClient.java:2738)
at org.apache.camel.component.file.remote.FtpOperations.getCurrentDirectory(FtpOperations.java:821)
at org.apache.camel.component.file.remote.FtpOperations.deleteFile(FtpOperations.java:286)
at org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:100)
... 23 common frames omitted
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:431)
at sun.security.ssl.OutputRecord.write(OutputRecord.java:417)
at sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:876)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:847)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
... 39 common frames omitted`.
This is my route:
from(queueSource)
.errorHandler(deadLetterChannel("direct:dead")
.useOriginalMessage()
.maximumRedeliveries(3)
.redeliveryDelay(180000)
.retryAttemptedLogLevel(LoggingLevel.WARN)
)
.unmarshal().json(JsonLibrary.Jackson,MyClass.class)
.process(setHeaderWithMyVariableProcessorClass)
.choice()
.when(header("DownloadFilename").isEqualTo(true))
.pollEnrich()
.simple("{{ftp.path}}
&useList=false
&consumer.bridgeErrorHandler=true
&autoCreate=false
&username={{ftp.username}}&password={{ftp.password}}
&passiveMode=true
&localWorkDirectory={{ftp.localWorkDirectory}}
&maxMessagesPerPoll=1
&disconnectOnBatchComplete=true
&move={{ftp.fullFileDir}}/.done
&soTimeout=600000
&fileName=${body.getFileAssetName()}")
.aggregationStrategy(new ApplyOldExchangeAggregationStrategy())
.end()
.end()
.choice()
.when(header("DownloadAttach0").isEqualTo(true))
.pollEnrich()
.simple("{{ftp.attachmentspath}}&.....&soTimeout=600000&fileName=${body.getAttachmentList()[0]}")
.aggregationStrategy(new ApplyOldExchangeAggregationStrategy())
.end()
.end()
.log("<<<<<< ${body} >>>>>>>")
.end();

Openssl: SSL_CTX_set_ecdh_auto() return failure

At the moment my openssl version is
OpenSSL 1.0.2h 3 May 2016
I use an example code offered by openssl Simple_TLS_Server to start a server and use s_client to send tls handshake. The server returned error like this:
139629255337616:error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher:s3_srvr.c:1349
And the s_client returned:
CONNECTED(00000003)
140266915485328:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:s23_clnt.c:769:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 307 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1471879558
Timeout : 300 (sec)
Verify return code: 0 (ok)
---
After reading this Manual:SSL_CTX_set1_curves(3), i modified some lines of the original:
if(!SSL_CTX_set_ecdh_auto(ctx, 1))
{
fprintf(stderr, "Error: SSL_CTX_set_ecdh_auto(ctx, 1)\n");
}
When i restarted the Simple_TLS_Server, it prints
Error: SSL_CTX_set_ecdh_auto(ctx, 1)
Also tried like this:
if(!SSL_CTX_set_ecdh_auto(ctx, 1))
{
ERR_print_errors_fp(stderr);
}
But there was no available error message.
Does anyone know how could this happen? If you require more information, please just let me know.
PS: i tried certificates and keys with s_server and s_client, that worked fine.
Does anyone know how could this happen?
According to the source code the only cases where SSL_CTX_set_ecdh_auto return 0 is when the openssl library was compiled without support for ECDH (OPENSSL_NO_ECDH) or without support for elliptic curves at all (OPENSSL_NO_EC).

Resources