C email with smtp authorization CURL - c

I try to make C email function using SMTP authorization according to this example: https://curl.se/libcurl/c/smtp-authzid.html
When i try to compile this example i get an error: 'Symbol 'CURLOPT_SASL_AUTHZID' could not be resolved'
Rocky Linux 8.6
Curl 7.61.1
Eclipse CDT

Added in CURL 7.66.0. Via Rocky packages last supported is just 7.61.1
Need to use the older example or update Curl.

Related

Salesforce TLS 1.0 disable test link tls1test responding grant_type not support

Since Salesforce TLS1.0 is getting disabled on July 22nd I was testing as suggested in the below url https://help.salesforce.com/articleView?id=Salesforce-disabling-TLS-1-0&language=en_US&type=1 .
We interact with salesforce from backend server via REST API Initiatilly we do a grant_type=password for getting the access token and instance_url. Its pointed to https://login.salesforce.com/services/oauth2/token and it works now. As mentioned in the help url tried to point it to https://tls1test.salesforce.com/services/oauth2/token and it gives me an error {"error":"unsupported_grant_type","error_description":"grant type not supported"} . Tried in the below format from linux command line it gives me the same response.
curl -v https://tls1test.salesforce.com/services/oauth2/token -d "grant_type=password&client_id=<>&client_secret=<>&username=username%40domain.com&password=<>" -H "Content-Type:application/x-www-form-urlencoded"

Google compute engine returned 399 internal server error

Google compute engine console return 399 error code already asks my question but the solution is not as suggested there. Since the URL is little old starting a new thread.
I am trying to do a wget using:
wget https://console.developers.google.com/m/cloudstorage/b/m-lab/o/ndt/2012/05/23/20120523T000000Z-mlab1-ams01-ndt-0000.tgz
I see the error:
Resolving console.developers.google.com (console.developers.google.com)... 216.239.32.27
Connecting to console.developers.google.com (console.developers.google.com)|216.239.32.27|:443... connected.
HTTP request sent, awaiting response... 399 Internal Server Error
2014-08-26 20:02:18 ERROR 399: Internal Server Error.
I am new to Linux commands so wanted to know if am missing something obvious.
The address works when I use Chrome downloader but fails with wget with me as well
I have never seen this behaviour before
You can also use cURL to download files, I used the -v switch and got a dns error(no idea why)
curl -v http://console.developers.googlO.com/m/cloudstorage/b/m-lab/o/ndt/2012/05/23/20120523T000000Z-mlab1-ams01-ndt-0000.tgz
We cannot download with traditional tools we have to use gsutil utility provided by google, using which automation is possible.
You need to use the following URI pattern:
http://storage.googleapis.com/<bucket>/<object>
In this case, you can download that file using the command:
wget http://storage.googleapis.com/m-lab/ndt/2012/05/23/20120523T000000Z-mlab1-ams01-ndt-0000.tgz

Google App Engine endpointscfg.py command starting 1.8.6 does not accept argument -f

This problem just started in Google App Engine version 1.8.6:
When executing command (based on instruction https://developers.google.com/appengine/docs/python/endpoints/gen_clients):
endpointscfg.py get_client_lib java -o . -f rest your_module.YourApi
We get error:
endpointscfg.py: error: unrecognized arguments: -f
The command with argument -f execute without any issue for Google App Engine version 1.8.5.
With 1.8.6, I don't know how to generate client end point library, because of this error. If you have a workaround, please help.
When you use get_client_lib to generate client library, rest format is the only option. So if you intend to generate a Rest client library, simply remove ".f rest" option. And you will get your Rest client without any problem.
If you want to use RPC client (which is currently only supported in iOS client). Please refer to https://developers.google.com/appengine/docs/python/endpoints/consume_ios for instruction.
I think one piece might be missing from the documentation above. In order to get the api-v1-rpc.discovery, you need to run get_discovery_doc command like following:
endpointscfg.py get_discovery_doc -o . -f rpc your_module.YourApi
Hope it helps.

Eclipse PDT & XDebug remote debugging

I have a hosting account on Virpus with Debian 6, running Apache2, php5 with memcache... & XDebug recently.
I was trying to configure Eclipse PDT & also Apache to debug PHP code remotely from my machine (Windows). Right now this message appears: "Waiting for XDebug Session 57%".
My config on XDebug looks like this:
Looking to the picture you can see that XDebug is installed and running... right?
Also, running php -m is not listing XDebug in PHP Modules or Zend Modules (I read xdebug should appear twice).
My Enabled modules on Apache are:
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mcrypt
memcache
memcached
mhash
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
suhosin
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib
[Zend Modules]
Suhosin
I really need more clues of what could be happening, I read a lot but I can't figure it out by myself.
Thanks a lot.
I was having the same issue, it turns out the browser that eclipse was configured with was not found and I finally realized this when tailing the project_dir/.metadata/.log file ... hope this helps :)

libcurl gnutls_handshake() failed: A TLS warning alert has been received

I am essentially trying to do the following:
http://curl.haxx.se/libcurl/c/https.html
I have my apache server set up with mod_ssl and a server cert. I added the line:
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
and also tried:
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false);
but I keep getting the error: gnutls_handshake() failed: A TLS warning alert has been received.
Does anyone know who to fix this or get around it?
Realizing that the question is fairly old and one answer was already accepted, here is an alternative answer that worked perfectly for me and may be useful for folks coming here from search:
Replace libcurl-gnutls with libcurl-openssl alternative.
I noticed that the certificate error was only generated with programs using libcurl and not with browsers so I assumed that something about GNUTLS was at fault here and not the certificates.
Here is what worked for me (Ubuntu 12.04 LTS):
$ sudo apt-get remove libcurl4-gnutls-dev
$ sudo apt-get install libcurl4-openssl-dev
All programs that were relying on libcurl started working fine immediately after I replaced the libraries (I also recompiled the programs just in case).
Note: this solution will only help you if you get a warning with GNUTLS but not with, say, browsers. That is, I am assuming the certificate chain is actually set up correctly.
I attempted the above solution and that did not work for me. In python, I tried the following option which effectively forces SSLv3 and disables TLS.
c.setopt(pycurl.SSLVERSION, pycurl.SSLVERSION_SSLv3)
in PHP it should be able to be accomplished by setting the CURLOPT_SSLVERSION option to 3.
That "usual" warning you get means there is no well-known organization (certificate authority) willing to vouch for its authenticity. That is what the "usual" warning means and that is what the TLS warning is telling you.
Try to set CURLOPT_SSL_VERIFYHOST to 0 or install a proper certificate.

Resources