Change functions to ANSI C.
[oweals/openssl.git] / crypto / x509 / x509_cmp.c
index 7dec3199cd7188dd9c979996d1572c93682b1d74..899b00eb1346cf3f45d37a164938a912b2238a68 100644 (file)
@@ -64,9 +64,7 @@
 #include "objects.h"
 #include "x509.h"
 
-int X509_issuer_and_serial_cmp(a,b)
-X509 *a;
-X509 *b;
+int X509_issuer_and_serial_cmp(X509 *a, X509 *b)
        {
        int i;
        X509_CINF *ai,*bi;
@@ -79,8 +77,7 @@ X509 *b;
        }
 
 #ifndef NO_MD5
-unsigned long X509_issuer_and_serial_hash(a)
-X509 *a;
+unsigned long X509_issuer_and_serial_hash(X509 *a)
        {
        unsigned long ret=0;
        MD5_CTX ctx;
@@ -101,60 +98,47 @@ X509 *a;
        }
 #endif
        
-int X509_issuer_name_cmp(a, b)
-X509 *a;
-X509 *b;
+int X509_issuer_name_cmp(X509 *a, X509 *b)
        {
        return(X509_NAME_cmp(a->cert_info->issuer,b->cert_info->issuer));
        }
 
-int X509_subject_name_cmp(a, b)
-X509 *a;
-X509 *b;
+int X509_subject_name_cmp(X509 *a, X509 *b)
        {
        return(X509_NAME_cmp(a->cert_info->subject,b->cert_info->subject));
        }
 
-int X509_CRL_cmp(a, b)
-X509_CRL *a;
-X509_CRL *b;
+int X509_CRL_cmp(X509_CRL *a, X509_CRL *b)
        {
        return(X509_NAME_cmp(a->crl->issuer,b->crl->issuer));
        }
 
-X509_NAME *X509_get_issuer_name(a)
-X509 *a;
+X509_NAME *X509_get_issuer_name(X509 *a)
        {
        return(a->cert_info->issuer);
        }
 
-unsigned long X509_issuer_name_hash(x)
-X509 *x;
+unsigned long X509_issuer_name_hash(X509 *x)
        {
        return(X509_NAME_hash(x->cert_info->issuer));
        }
 
-X509_NAME *X509_get_subject_name(a)
-X509 *a;
+X509_NAME *X509_get_subject_name(X509 *a)
        {
        return(a->cert_info->subject);
        }
 
-ASN1_INTEGER *X509_get_serialNumber(a)
-X509 *a;
+ASN1_INTEGER *X509_get_serialNumber(X509 *a)
        {
        return(a->cert_info->serialNumber);
        }
 
-unsigned long X509_subject_name_hash(x)
-X509 *x;
+unsigned long X509_subject_name_hash(X509 *x)
        {
        return(X509_NAME_hash(x->cert_info->subject));
        }
 
-int X509_NAME_cmp(a, b)
-X509_NAME *a;
-X509_NAME *b;
+int X509_NAME_cmp(X509_NAME *a, X509_NAME *b)
        {
        int i,j;
        X509_NAME_ENTRY *na,*nb;
@@ -190,8 +174,7 @@ X509_NAME *b;
 #ifndef NO_MD5
 /* I now DER encode the name and hash it.  Since I cache the DER encoding,
  * this is reasonably effiecent. */
-unsigned long X509_NAME_hash(x)
-X509_NAME *x;
+unsigned long X509_NAME_hash(X509_NAME *x)
        {
        unsigned long ret=0;
        unsigned char md[16];
@@ -217,10 +200,8 @@ X509_NAME *x;
 #endif
 
 /* Search a stack of X509 for a match */
-X509 *X509_find_by_issuer_and_serial(sk,name,serial)
-STACK_OF(X509) *sk;
-X509_NAME *name;
-ASN1_INTEGER *serial;
+X509 *X509_find_by_issuer_and_serial(STACK_OF(X509) *sk, X509_NAME *name,
+               ASN1_INTEGER *serial)
        {
        int i;
        X509_CINF cinf;
@@ -239,9 +220,7 @@ ASN1_INTEGER *serial;
        return(NULL);
        }
 
-X509 *X509_find_by_subject(sk,name)
-STACK_OF(X509) *sk;
-X509_NAME *name;
+X509 *X509_find_by_subject(STACK_OF(X509) *sk, X509_NAME *name)
        {
        X509 *x509;
        int i;
@@ -255,17 +234,14 @@ X509_NAME *name;
        return(NULL);
        }
 
-EVP_PKEY *X509_get_pubkey(x)
-X509 *x;
+EVP_PKEY *X509_get_pubkey(X509 *x)
        {
        if ((x == NULL) || (x->cert_info == NULL))
                return(NULL);
        return(X509_PUBKEY_get(x->cert_info->key));
        }
 
-int X509_check_private_key(x,k)
-X509 *x;
-EVP_PKEY *k;
+int X509_check_private_key(X509 *x, EVP_PKEY *k)
        {
        EVP_PKEY *xk=NULL;
        int ok=0;