Mobileread
SSL Certificate install
#1  khansen188 01-13-2020, 05:38 PM
I am trying to set up an SSL certificate for my Calibre server. Unfortunately, I have no experience with SSL certificates and how to create them. The one experience that I had previously, I was able to click a few links and it created the certificate using Let's Encrypt and automatically updates it for me when needed.

I couldn't see in the instructions on how to create the certificate using Let's Encrypt, so I purchased a certificate from Comodo. When I got my certificate, it came with three files. It came with one that the type is Security Certificate, one that is PKCS#7 Certificate and a CA-Bundle File. Which of these files do I need to link to my Calibre installation?

I am running Calibre on a Windows 10 desktop install. It is not a server installation of the Windows OS. I know that I can access it via the web, because I have that successfully setup, including being able to access it via a domain name. However, I can't figure out how to make it work over a secure connection.

Can anyone offer any guidance on what I need to do to finish setting up the SSL portion of my Calibre install?
Reply 

#2  khansen188 01-13-2020, 05:51 PM
Here is some additional information that I should have included in my original post.


I have tried several different combinations of the SSL files that I was provided by Comodo with not success. They gave me three files, each of a different file type . . . a Security Certificate, a PKCS #7 Certificate, and a CA-BUNDLE File.

I haven't been able to get any combination of these three files to work when adding them to Calibre under the advanced tab for Sharing over the net.

When I add them to the advanced tab I have got a few error messages, depending on the combination of files that I have tried.
**ERROR: Failed to start Content Server
(SSL) PEM lib (_ssl.c:2834)

**ERROR: Unhandled exception
AttributeError: 'Path' object has no attribute 'save_history'
Reply 

#3  khansen188 01-13-2020, 05:58 PM
Here is some additional information that I should have included in my original post.



I have tried using the files that I received from Comodo in various combinations to accomplish making the SSL certificate work. However, I haven't been able to make it work.

From Comodo I received three files, each with the same name but a different file type. The file types I received are:
-- Security Certificate
-- PKCS#7 Certificates
-- CA-BUNDLE File


As I have been trying to make this work, I have tried several combinations. Whenever I try to add a file to Calibre's settings for Share over the Web, under Advanced I get an error. The error message that I get is shown in screenshot 1.



If I click OK and add the second file I get another error message when I try to restart the server, as shown in screenshot 2.
Screenshot 1.PNG Screenshot 2.PNG 
Reply 

#4  kovidgoyal 01-14-2020, 01:01 AM
You need to convert the certificates to PEM format. And you can definitely use lets encrypt certificates if you prefer those.
Reply 

#5  khansen188 01-19-2020, 08:49 PM
Hi -

I know very little about SSL. I contacted Comodo to see if they could help me convert my certificate into PEM format. They told me that the certificate was already in PEM format. So, now I am really confused. I have tried uploading all three of the files that I received from them in the certificate box, with my private key saved as a text file in the private key box. However, this doesn't work.

I am wondering if the error message that I am receiving has anything to do with my problem. When I try to add either the certificate file, or the private key file in the Advanced Tab, I get the attached error message. If I click on OK, the error message goes away, but it still doesn't let me start the content server in SSL.

As I mentioned originally, I no nothing about SSL and need more help than a one sentence reply. I am trying to set this up over SSL to use in my classroom so that my elementary students can access my ebook library. However, due to state law they have to be able to login to the site. In order to login to the site, also because of state law, the site has to be encrypted over SSL.

Can you please give some detailed instructions on how to accomplish this?
Calibre Error.PNG 
Reply 

#6  kovidgoyal 01-19-2020, 10:13 PM
https://www.namecheap.com/support/knowledgebase/article.aspx/9474/69/how-do-i-create-a-pem-file-from-the-certificates-i-received-from-you


And that error is harmless (and fixed in the next calibre release) it should not affect using the certificates.
Reply 

#7  khansen188 03-23-2020, 07:43 PM
HI - I finally have had time the past few days to work on this project again. I just got my certificate converted in PEM format using the link you provided. However, I still can't get the server to work when I have the SSL certificate and Private Key in place.

As I have tried various combinations of the three files that I got from namecheap for my SSL, I get various errors. Mostly I get a Connection Timed out Error, or a site didn't send any data error.

As soon as I remove the SSL files from the advanced tab and restart the server, I can access it just fine.


One question that I do have . . . .when I generated my SSL file, the private key was just a string of text. I have copied it and created a .txt file with that information in it, however, that doesn't seem to work. Is this the problem?
Reply 

Today's Posts | Search this Thread | Login | Register