Forums | Mahara Community
Support
/
Force Mahara to generate a new SSL key?
07 May 2011, 2:25
I had to change the Apache port from 80 of my Mahara and Moodle installations on WAMP, and therefore had to change the root in the config files to include the new port (from http://localhost/mahara to http://localhost:8081/mahara). The problem I have, though, is that I need Mahara to generate a new SSL public key (like you can do in Moodle where you have a button to delete the current one and it makes a new one). Because the current public key gives me this error when I paste it into the networking / manage peers section of Moodle 2:
The key is not a valid SSL key. (4: The subject of the certificate:
http://localhost/mahara
does not match the host it came from:
http://localhost:8081/mahara.
)
So the certificate still has http://localhost/mahara, and I want it to update itself to http://localhost:8081/mahara to match where the site now "lives".
Needless to say, I had it all working fine when the addresses were http://localhost/mahara and http://localhost/moodle2.
I have generated a new Moodle SSL public key, but need to be able to do the same for Mahara.
Even if there's something in the code somewhere I can change... problem is, I can't find the place where the public key is "kept" in the backend.
07 May 2011, 11:02
Miriam, We ran into this some time ago. The fix included running a few shell commands. I can check on Monday.08 May 2011, 23:05
Eagerly awaiting the fix. :) Though I have to say it would need to be in complete step-by-step instructions, because while I have a vague idea of what you mean by shell commands, I wouldn't know where to start...
09 May 2011, 14:39
Hi again,
from memory: We went into the database and deleted the key there. Then we went back to the page, refreshed and the key was re-generated.
It looks like on a WAMP setup you have phpMyAdmin installed. The documentation should tell you how to get into the database. Once in there, look for words such as 'key' on the left, click it and then empty it.
This is not much help, but perhaps it gets you started in the right direction.
10 May 2011, 22:00
Thank you that worked. I went into PHPMyAdmin and deleted the two entries that related to the key, then refreshed the networking page. It generated a new key and connected beautifully with my Moodle 2.
Am a happy camper!
28 February 2012, 10:34
Hello
I have to generate a new SSL key as well
Can you tell me which entries you deleted in the db ?
Thanks
Emilie Lenel
29 February 2012, 2:49
I reply to myself ;-)
I deleted the following entry from mah_config table:
openssl_history, openssl_keyrepair, penssl_keypair_expires
and i was able to generate a new key !
Emilie
29 February 2012, 23:51
Hello Emilie,
Thank you for putting your solution here. That'll be useful for somebody else with the same question.
Cheers
Kristina
03 March 2012, 15:38
Just in case someone reads this thread in the future, Mahara 1.5 (when it comes out) already has a button to delete the current SSL key and create a new one, just like Moodle does :-)
Saludos.
Iñaki.
05 October 2012, 10:01
For the record, it's:
openssl_keypair (not openssl_keyrepair)
openssl_keypair_expires (not penssl_keypair_expires)
(and of course openssl_history)
you should be looking for.