typo
authorDr. Stephen Henson <steve@openssl.org>
Tue, 5 Mar 2013 21:19:39 +0000 (21:19 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 5 Mar 2013 21:20:00 +0000 (21:20 +0000)
demos/evp/aesccm.c

index 375d834845c9fb1ee901c7884d80b1f05bba6419..e8897fbbc19e288973c13e047289e4b00d649cac 100644 (file)
@@ -92,7 +92,7 @@ void aes_ccm_decrypt(void)
        /* Specify key and IV */
        EVP_DecryptInit_ex(ctx, NULL, NULL, ccm_key, ccm_nonce);
        /* Set ciphertext length: only needed if we have AAD */
-       EVP_EncryptUpdate(ctx, NULL, &outlen, NULL, sizeof(ccm_ct));
+       EVP_DecryptUpdate(ctx, NULL, &outlen, NULL, sizeof(ccm_ct));
        /* Zero or one call to specify any AAD */
        EVP_DecryptUpdate(ctx, NULL, &outlen, ccm_adata, sizeof(ccm_adata));
        /* Decrypt plaintext, verify tag: can only be called once */