Hi ,
Quick Update.
I got the solution after i put in 3 hours into this thing.
Here it goes for the community.
import com.eviware.soapui.impl.wsdl.support.wss.crypto.CryptoType
import com.eviware.soapui.impl.rest.RestMethod
import com.eviware.soapui.impl.rest.RestRequestInterface.HttpMethod
import com.eviware.soapui.impl.rest.RestResource
import com.eviware.soapui.impl.wsdl.support.wss.WssCrypto
import com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep
import com.eviware.soapui.impl.wsdl.support.wss.crypto.CryptoType
def myList = testRunner.testCase.testSuite.project.wssContainer.getCryptoList()
if (myList.isEmpty()) //if no key store is defined on this project, create a keystore
{
log.info "No Keystore is Defined for this Project. Creating a Keystore First"
testRunner.testCase.testSuite.project.wssContainer.addCrypto(context.expand( '${#Project#KeystorePath}' ),context.expand( '${#Project#KeystorePassword}' ),CryptoType.KEYSTORE) //path, password, cryptoType
}
//Once the Keystore is Created , Apply it to whichever tests you want to apply it to
myList = testRunner.testCase.testSuite.project.wssContainer.getCryptoList()
log.info myList
def step = testRunner.testCase.testSteps['GET - TEST'].testRequest
step.setSslKeystore(myList[0])