New libpacks for Windows with Qt5.15, OCC7.5
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: New libpacks for Windows with Qt5.12.6, OCC7.4
I haven't tested it but I imagine? That if you signed up that you would be issued an API key that you can use to test. But it's a good point maybe there should be a self-test somewhere to be implemented
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
- vejmarie
- Posts: 713
- Joined: Mon Jan 04, 2016 4:52 pm
- Location: Somewhere between France, USA and Taiwan
- Contact:
Re: New libpacks for Windows with Qt5.12.6, OCC7.4
Hi, sorry for the delay. I am living on a different timezone it looks like . So to test the software, either you do it from the docker image on your machine. Or you test it from the justyour.parts website, or an Amazon s3 account.
If you use justyour.parts, after your account has been created, you can go to the user environment to grab your credential.
Within FreeCAD, you need to create a new model, create a part (like a cube / cylinder or whatever). When this is done, go into the Python console and type the following commands.
import Cloud \
Cloud.cloudurl(u"https://justyour.parts") \
Cloud.cloudtcpport(u"443") \
Cloud.cloudaccesskey(u"YOUR ACCESS KEY") \ -> This is the TokenAuth you find into the web interface
Cloud.cloudsecretkey(u"YOUR PRIVATE KEY") \ -> This is the TokenSecret you find into the web interface
Cloud.cloudsave(u"YOUR MODEL NAME (lowercase only)") \ -> This is the file name equivallent, lower case only
When done, you can close your model. Create a new empty one and restore it
Cloud.cloudrestore(u"YOUR MODEL NAME (lowercase only)") \ -> This is the file name equivallent, lower case only
You will see it appearing also on the front page of the website !
Thanks for your efforts, keep me posted, look like we are progressing in the right direction.
Last edited by vejmarie on Sun Mar 01, 2020 12:54 am, edited 1 time in total.
Re: New libpacks for Windows with Qt5.12.6, OCC7.4
Thanks for the info. Will try it tomorrow...
Re: New libpacks for Windows with Qt5.12.6, OCC7.4
Have tested your script. And i get the following error when trying to save some file to the cloud
curl_easy_perform returns
Code: Select all
CloudApp.cpp line 737
void Cloud::CloudWriter::pushCloud(const char *FileName, const char *data, long size)
.....
CloudApp.cpp line 789
res = curl_easy_perform(curl);
if(res != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
curl_easy_strerror(res));
curl_easy_cleanup(curl);
Code: Select all
CURLE_PEER_FAILED_VERIFICATION, /* 60 - peer's certificate or fingerprint
wasn't verified fine */
- vejmarie
- Posts: 713
- Joined: Mon Jan 04, 2016 4:52 pm
- Location: Somewhere between France, USA and Taiwan
- Contact:
Re: New libpacks for Windows with Qt5.12.6, OCC7.4
Weird Was it with the Container as a server or the justyour.parts server ? This error just mean that a certificate was not valid. justyour.parts server is using letsencrypt (I didn't purchased a certificate). I checked it and it is valid up to end of the month.apeltauer wrote: ↑Sun Mar 01, 2020 10:04 am Have tested your script. And i get the following error when trying to save some file to the cloudcurl_easy_perform returnsCode: Select all
CloudApp.cpp line 737 void Cloud::CloudWriter::pushCloud(const char *FileName, const char *data, long size) ..... CloudApp.cpp line 789 res = curl_easy_perform(curl); if(res != CURLE_OK) fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); curl_easy_cleanup(curl);
Code: Select all
CURLE_PEER_FAILED_VERIFICATION, /* 60 - peer's certificate or fingerprint wasn't verified fine */
Re: New libpacks for Windows with Qt5.12.6, OCC7.4
I don't know very much about SSL certificates...is it anything like PGP where the public keys queried against a server that documents if the keys are valid, revoked, updated etc... ?vejmarie wrote: ↑Sun Mar 01, 2020 2:08 pm Weird Was it with the Container as a server or the justyour.parts server ? This error just mean that a certificate was not valid. justyour.parts server is using letsencrypt (I didn't purchased a certificate). I checked it and it is valid up to end of the month.
Also, how long has the certificate been active (I know I could look, but I'm lazy )
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: New libpacks for Windows with Qt5.12.6, OCC7.4
I have used your mentioned server....
- vejmarie
- Posts: 713
- Joined: Mon Jan 04, 2016 4:52 pm
- Location: Somewhere between France, USA and Taiwan
- Contact:
Re: New libpacks for Windows with Qt5.12.6, OCC7.4
As to validate this is a certificate issue can you add within the Cloud code before the easy_perform call
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
This will disable strict certificate check, and it shall go through. If it doesn't it means the issue will be somewhere else. If it does, we will have to figure out what are the differences between windows, linux and macos. I just retried on linux and MacOS and it works
- vejmarie
- Posts: 713
- Joined: Mon Jan 04, 2016 4:52 pm
- Location: Somewhere between France, USA and Taiwan
- Contact:
Re: New libpacks for Windows with Qt5.12.6, OCC7.4
You can also try this command
curl https://justyour.parts
into a shell ? Does it report any certificate issue ? If not, it shall return the source code of the homepage
Can you print debug, the URL that the curl request is using when it fails within the PushCloud request ?
curl https://justyour.parts
into a shell ? Does it report any certificate issue ? If not, it shall return the source code of the homepage
Can you print debug, the URL that the curl request is using when it fails within the PushCloud request ?
Re: New libpacks for Windows with Qt5.12.6, OCC7.4
Update:
The url i get:
strUrl.c_str() = justyour.parts
If a add this line, i get a valid return code (CURLE_OK)vejmarie wrote: ↑Sun Mar 01, 2020 3:02 pmCode: Select all
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
The url i get:
Code: Select all
chunk = Cloud::BuildHeaderAmzS3v2( strUrl.c_str(), this->TcpPort, this->AccessKey, RequestData);