Suppport for CRL distribution points extension. Also document some of
[openssl.git] / crypto / bf / bf_cbc.c
index 3d05d27cf15814349bb3f0e118323dba03347932..90f1ffef2bc42bdb851d52d737b1c04922cf55e9 100644 (file)
@@ -1,5 +1,5 @@
 /* crypto/bf/bf_cbc.c */
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
  * This package is an SSL implementation written
 #include "blowfish.h"
 #include "bf_locl.h"
 
-void BF_cbc_encrypt(in, out, length, ks, iv, encrypt)
-unsigned char *in;
-unsigned char *out;
-long length;
-BF_KEY *ks;
-unsigned char *iv;
-int encrypt;
+void BF_cbc_encrypt(unsigned char *in, unsigned char *out, long length,
+            BF_KEY *ks, unsigned char *iv, int encrypt)
        {
        register BF_LONG tin0,tin1;
        register BF_LONG tout0,tout1,xor0,xor1;
@@ -85,7 +80,7 @@ int encrypt;
                        tin1^=tout1;
                        tin[0]=tin0;
                        tin[1]=tin1;
-                       BF_encrypt(tin,ks,BF_ENCRYPT);
+                       BF_encrypt(tin,ks);
                        tout0=tin[0];
                        tout1=tin[1];
                        l2n(tout0,out);
@@ -98,7 +93,7 @@ int encrypt;
                        tin1^=tout1;
                        tin[0]=tin0;
                        tin[1]=tin1;
-                       BF_encrypt(tin,ks,BF_ENCRYPT);
+                       BF_encrypt(tin,ks);
                        tout0=tin[0];
                        tout1=tin[1];
                        l2n(tout0,out);
@@ -118,7 +113,7 @@ int encrypt;
                        n2l(in,tin1);
                        tin[0]=tin0;
                        tin[1]=tin1;
-                       BF_encrypt(tin,ks,BF_DECRYPT);
+                       BF_decrypt(tin,ks);
                        tout0=tin[0]^xor0;
                        tout1=tin[1]^xor1;
                        l2n(tout0,out);
@@ -132,7 +127,7 @@ int encrypt;
                        n2l(in,tin1);
                        tin[0]=tin0;
                        tin[1]=tin1;
-                       BF_encrypt(tin,ks,BF_DECRYPT);
+                       BF_decrypt(tin,ks);
                        tout0=tin[0]^xor0;
                        tout1=tin[1]^xor1;
                        l2nn(tout0,tout1,out,l+8);