Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templates for Secure Communication Task require cast operator #346

Open
AndreSonntag opened this issue Nov 28, 2019 · 2 comments
Open

Templates for Secure Communication Task require cast operator #346

AndreSonntag opened this issue Nov 28, 2019 · 2 comments

Comments

@AndreSonntag
Copy link
Contributor

Context

The templates for the client-side as well the server-side use factory classes and cast operators like in the following code snippet for the TLSClient:

public TLSClient(String host, int port) throws UnknownHostException, IOException {
SSLSocketFactory sslsocketfactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
SSLSocket sslsocket = (SSLSocket) sslsocketfactory.createSocket(host, port);**	
	
sslsocket.setEnabledCipherSuites(new String[] {"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"});
sslsocket.setEnabledProtocols(new String[] { "TLSv1.2", "TLSv1.1"});
sslsocket.startHandshake();
}

Describe the bug/new feature

Currently, it is not possible to generate a cast construct like in the initialization line of SSLSocketFactory and SSLSocket via the new CrySL code generation. Furthermore, the CrySL syntax does not support cast operators or something similar to depict the described situation.

@AndreSonntag
Copy link
Contributor Author

@kruegers

@AndreSonntag AndreSonntag changed the title Templates for the Secure Communication Task require cast operator Templates for Secure Communication Task require cast operator Nov 28, 2019
@kruegers kruegers self-assigned this Nov 28, 2019
@kruegers
Copy link
Member

Can you please push the template somewhere? I'd like to be able to debug the feature while developing it. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants