Hi,
I generate the CA certificate and private key using OpenSSL on my Windows
XP machine:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout
private_key.key -out server.crt
and able to deploy to Rocket server :
web2py.py -a password -i 127.0.0.1 -p 8000 -c D:\certificates\sever.crt
-k D:\certificates\private_key.key
and added the below code to db.py:
from gluon.contrib.login_methods.x509_auth import X509Auth
auth.settings.actions_disabled=[*'register'*,*'change_password'*,
*'request_reset_password'*,*'profile'*]
auth.settings.login_form = X509Auth()
And added below function in default.py:
*@auth.requires_login*()
def *index*():
return dict(message=*T*(*'Welcome to My Application'*))
But when I am calling this function from browser using below:
https://127.0.0.1:8000/MyApp/default/index
It is displaying below message on the browser:
*Login not allowed. No valid x509 crentials*
* *
Please guide me what I am doing wrong.
Regards,
Amit
--