#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;
}
#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;
}
#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;
#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];
#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;
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;
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;