For the client to connect to the CAS server, out of the generated keystore, we need to create a .crt file. In the same folder (cas-sample/server/src/main/resources/etc/cas), run the following command:
keytool -export -alias thekeystore -file thekeystore.crt -keystore thekeystore
When asked for a password, provide the same password (we have set the password as password). Executing the preceding command will create thekeystore.crt file.