Changes to allow compilation of EncryptDecrypt.c

BUG=none
TEST=compilation succeeds:
   cc -Wall -Werror -c -o /dev/null EncryptDecrypt.c

Change-Id: I1e8bc331c59ede5bf487d761c8e935b7f473acdd
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/274176
Reviewed-by: Utkarsh Sanghi <usanghi@chromium.org>
diff --git a/EncryptDecrypt.c b/EncryptDecrypt.c
index 7179ac3..af7fa2e 100644
--- a/EncryptDecrypt.c
+++ b/EncryptDecrypt.c
@@ -40,12 +40,12 @@
 
    // If the input mode is TPM_ALG_NULL, use the key's mode
    if( in->mode == TPM_ALG_NULL)
-       in->mode = symKey->publicArea.parameters.symDetail.sym.mode.sym;
+       in->mode = symKey->publicArea.parameters.symDetail.mode.sym;
 
    // If the key is restricted, the input symmetric mode should match the key's
    // symmetric mode
    if(   symKey->publicArea.objectAttributes.restricted == SET
-      && symKey->publicArea.parameters.symDetail.sym.mode.sym != in->mode)
+      && symKey->publicArea.parameters.symDetail.mode.sym != in->mode)
        return TPM_RC_VALUE + RC_EncryptDecrypt_mode;
 
    // If the mode is null, then we have a problem.
@@ -58,8 +58,8 @@
    // The input iv for ECB mode should be null. All the other modes should
    // have an iv size same as encryption block size
 
-   keySize = symKey->publicArea.parameters.symDetail.sym.keyBits.sym;
-   alg = symKey->publicArea.parameters.symDetail.sym.algorithm;
+   keySize = symKey->publicArea.parameters.symDetail.keyBits.sym;
+   alg = symKey->publicArea.parameters.symDetail.algorithm;
    blockSize = CryptGetSymmetricBlockSize(alg, keySize);
    if(   (in->mode == TPM_ALG_ECB && in->ivIn.t.size != 0)
       || (in->mode != TPM_ALG_ECB && in->ivIn.t.size != blockSize))