diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-02-12 18:25:18 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-02-12 18:25:18 +0000 |
commit | e47af46cd839c549fac2d9f8a2951c35c0113fbf (patch) | |
tree | 2fa93ea50fa6307c189711053274f8bba9949572 /fips/des | |
parent | 36246be9151adf1049d62f1261f87f9e3719afac (diff) |
Change FIPS source and utilities to use the "FIPS_" names directly
instead of using regular OpenSSL API names.
Diffstat (limited to 'fips/des')
-rw-r--r-- | fips/des/fips_des_selftest.c | 4 | ||||
-rw-r--r-- | fips/des/fips_desmovs.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/fips/des/fips_des_selftest.c b/fips/des/fips_des_selftest.c index d93d3b5558..7b7543b645 100644 --- a/fips/des/fips_des_selftest.c +++ b/fips/des/fips_des_selftest.c @@ -110,7 +110,7 @@ int FIPS_selftest_des() { int n, ret = 0; EVP_CIPHER_CTX ctx; - EVP_CIPHER_CTX_init(&ctx); + FIPS_cipher_ctx_init(&ctx); /* Encrypt/decrypt with 2-key 3DES and compare to known answers */ for(n=0 ; n < 2 ; ++n) { @@ -130,7 +130,7 @@ int FIPS_selftest_des() } ret = 1; err: - EVP_CIPHER_CTX_cleanup(&ctx); + FIPS_cipher_ctx_cleanup(&ctx); if (ret == 0) FIPSerr(FIPS_F_FIPS_SELFTEST_DES,FIPS_R_SELFTEST_FAILED); diff --git a/fips/des/fips_desmovs.c b/fips/des/fips_desmovs.c index 2debcee29a..eab761ced9 100644 --- a/fips/des/fips_desmovs.c +++ b/fips/des/fips_desmovs.c @@ -122,11 +122,11 @@ static int DESTest(EVP_CIPHER_CTX *ctx, EXIT(1); } - if (EVP_CipherInit_ex(ctx, cipher, NULL, aKey, iVec, dir) <= 0) + if (FIPS_cipherinit(ctx, cipher, aKey, iVec, dir) <= 0) return 0; if(!strcasecmp(amode,"CFB1")) M_EVP_CIPHER_CTX_set_flags(ctx, EVP_CIPH_FLAG_LENGTH_BITS); - EVP_Cipher(ctx, out, in, len); + FIPS_cipher(ctx, out, in, len); return 1; } @@ -184,7 +184,7 @@ static void do_mct(char *amode, int kp=akeysz/64; unsigned char old_iv[8]; EVP_CIPHER_CTX ctx; - EVP_CIPHER_CTX_init(&ctx); + FIPS_cipher_ctx_init(&ctx); fprintf(rfp,"\nCOUNT = %d\n",i); if(kp == 1) @@ -219,7 +219,7 @@ static void do_mct(char *amode, else { memcpy(old_iv,ctx.iv,8); - EVP_Cipher(&ctx,text,text,len); + FIPS_cipher(&ctx,text,text,len); } if(j == 9999) { @@ -282,7 +282,7 @@ static int proc_file(char *rqfile, char *rspfile) char *rp; EVP_CIPHER_CTX ctx; int numkeys=1; - EVP_CIPHER_CTX_init(&ctx); + FIPS_cipher_ctx_init(&ctx); if (!rqfile || !(*rqfile)) { |