grst_asn1.c File Reference

#include <stdio.h>
#include <string.h>
#include <openssl/x509_vfy.h>
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/buffer.h>
#include <openssl/objects.h>
#include <openssl/asn1.h>
#include "gridsite.h"

Go to the source code of this file.

Defines

#define SSLARG   unsigned char**

Functions

time_t GRSTasn1TimeToTimeT (unsigned char *asn1time, size_t len)
 ASN1 time string (in a char *) to time_t.
static int asn1_print_info (BIO *bp, int tag, int xclass, int constructed, int indent)
static void GRSTasn1AddToTaglist (struct GRSTasn1TagList taglist[], int maxtag, int *lasttag, char *treecoords, int start, int headerlength, int length, int tag)
int GRSTasn1SearchTaglist (struct GRSTasn1TagList taglist[], int lasttag, char *treecoords)
static int GRSTasn1PrintPrintable (BIO *bp, char *str, int length)
static int GRSTasn1Parse2 (BIO *bp, unsigned char **pp, long length, int offset, int depth, int indent, int dump, char *treecoords, struct GRSTasn1TagList taglist[], int maxtag, int *lasttag)
int GRSTasn1ParseDump (BIO *bp, unsigned char *pp, long len, struct GRSTasn1TagList taglist[], int maxtag, int *lasttag)
int GRSTasn1GetX509Name (char *x509name, int maxlength, char *coords, char *asn1string, struct GRSTasn1TagList taglist[], int lasttag)


Define Documentation

#define SSLARG   unsigned char**

Definition at line 42 of file grst_asn1.c.

Referenced by GRSTasn1GetX509Name(), and GRSTasn1Parse2().


Function Documentation

static int asn1_print_info ( BIO *  bp,
int  tag,
int  xclass,
int  constructed,
int  indent 
) [static]

Definition at line 90 of file grst_asn1.c.

References NULL, p, p2(), sprintf(), and str.

Referenced by GRSTasn1Parse2().

static void GRSTasn1AddToTaglist ( struct GRSTasn1TagList  taglist[],
int  maxtag,
int *  lasttag,
char *  treecoords,
int  start,
int  headerlength,
int  length,
int  tag 
) [static]

Definition at line 129 of file grst_asn1.c.

References GRST_ASN1_MAXCOORDLEN, GRSTasn1TagList::headerlength, GRSTasn1TagList::length, GRSTasn1TagList::start, and GRSTasn1TagList::tag.

Referenced by GRSTasn1Parse2().

int GRSTasn1GetX509Name ( char *  x509name,
int  maxlength,
char *  coords,
char *  asn1string,
struct GRSTasn1TagList  taglist[],
int  lasttag 
)

Definition at line 492 of file grst_asn1.c.

References GRST_RET_FAILED, GRST_RET_OK, GRSTasn1SearchTaglist(), i, len, length, GRSTasn1TagList::length, n, NULL, snprintf, sprintf(), SSLARG, and start.

Referenced by GRSTx509ChainVomsAdd(), GRSTx509ParseVomsExt(), and GRSTx509VerifyVomsSig().

static int GRSTasn1Parse2 ( BIO *  bp,
unsigned char **  pp,
long  length,
int  offset,
int  depth,
int  indent,
int  dump,
char *  treecoords,
struct GRSTasn1TagList  taglist[],
int  maxtag,
int *  lasttag 
) [static]

Definition at line 176 of file grst_asn1.c.

References asn1_print_info(), GRSTasn1AddToTaglist(), GRSTasn1PrintPrintable(), i, if(), j, len, NULL, o, p, sprintf(), SSLARG, and x80.

Referenced by GRSTasn1ParseDump().

int GRSTasn1ParseDump ( BIO *  bp,
unsigned char *  pp,
long  len,
struct GRSTasn1TagList  taglist[],
int  maxtag,
int *  lasttag 
)

Definition at line 484 of file grst_asn1.c.

References GRSTasn1Parse2().

Referenced by GRSTx509ChainVomsAdd(), and GRSTx509ParseVomsExt().

static int GRSTasn1PrintPrintable ( BIO *  bp,
char *  str,
int  length 
) [static]

Definition at line 159 of file grst_asn1.c.

References free(), malloc(), NULL, and p.

Referenced by GRSTasn1Parse2().

int GRSTasn1SearchTaglist ( struct GRSTasn1TagList  taglist[],
int  lasttag,
char *  treecoords 
)

Definition at line 146 of file grst_asn1.c.

References i.

Referenced by GRSTasn1GetX509Name(), GRSTx509ChainVomsAdd(), GRSTx509ParseVomsExt(), and GRSTx509VerifyVomsSig().

time_t GRSTasn1TimeToTimeT ( unsigned char *  asn1time,
size_t  len 
)

ASN1 time string (in a char *) to time_t.

(Use ASN1_STRING_data() to convert ASN1_GENERALIZEDTIME to char * if necessary)

Definition at line 51 of file grst_asn1.c.

Referenced by GRSTx509ChainLoadCheck(), GRSTx509ChainVomsAdd(), GRSTx509CheckChain(), GRSTx509CompactCreds(), GRSTx509GetVomsCreds(), GRSTx509MakeProxyCert(), GRSTx509ParseVomsExt(), GRSTx509ProxyGetTimes(), and GRSTx509VerifySig().


Generated on Tue Jul 5 16:08:13 2011 for ROOT_528-00b_version by  doxygen 1.5.1