Main Page   Data Structures   File List   Data Fields   Globals  

voms_apic.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  *
00003  * Authors: Vincenzo Ciaschini - Vincenzo.Ciaschini@cnaf.infn.it 
00004  *
00005  * Copyright (c) 2002, 2003 INFN-CNAF on behalf of the EU DataGrid.
00006  * For license conditions see LICENSE file or
00007  * http://www.edg.org/license.html
00008  *
00009  * Parts of this code may be based upon or even include verbatim pieces,
00010  * originally written by other people, in which case the original header
00011  * follows.
00012  *
00013  *********************************************************************/
00014 
00015 /* $Revision: 1.8 $ */
00016 /* $Date: 2004/01/14 17:05:20 $ */
00017 
00018 #ifndef _VOMS_APIC_H
00019 #define _VOMS_APIC_H
00020 
00021 #include <openssl/x509.h>
00022 
00025 struct data {
00026   char *group; 
00027   char *role;  
00028   char *cap;   
00029 };
00030 
00031 
00032 struct contactdata { 
00035   char *nick;     
00036   char *host;     
00037   char *contact;  
00038   char *vo;       
00039   int   port;     
00040   char *reserved; 
00041 };
00042 
00046 #define  TYPE_NODATA 0  
00047 #define  TYPE_STD    1  
00048 #define  TYPE_CUSTOM 2  
00051 struct voms {
00052   int siglen;        
00053   char *signature;   
00054   char *user;        
00055   char *userca;      
00056   char *server;      
00057   char *serverca;    
00058   char *voname;      
00059   char *uri;         
00060   char *date1;       
00061   char *date2;       
00062   int   type;        
00063   struct data **std; 
00064   char *custom;      
00065   int datalen;
00066   int version;
00067   char **fqan;    
00068   char *serial;      
00070   /* Fields below this line are reserved. */
00071 };
00072 
00073 
00074 #define RECURSE_CHAIN 0
00075 #define RECURSE_NONE  1
00076 
00077 #define VERIFY_FULL      0xffffffff
00078 #define VERIFY_NONE      0x00000000
00079 #define VERIFY_DATE      0x00000001
00080 #define VERIFY_NOTARGET  0x00000002
00081 #define VERIFY_KEY       0x00000004
00082 #define VERIFY_SIGN      0x00000008
00083 #define VERIFY_ORDER     0x00000010
00084 #define VERIFY_ID        0x00000020
00085 
00089 #define VERR_NONE       0
00090 #define VERR_NOSOCKET   1  
00091 #define VERR_NOIDENT    2  
00092 #define VERR_COMM       3  
00093 #define VERR_PARAM      4  
00094 #define VERR_NOEXT      5  
00095 #define VERR_NOINIT     6  
00096 #define VERR_TIME       7  
00097 #define VERR_IDCHECK    8  
00099 #define VERR_EXTRAINFO  9  
00100 #define VERR_FORMAT     10 
00101 #define VERR_NODATA     11 
00102 #define VERR_PARSE      12 
00103 #define VERR_DIR        13 
00104 #define VERR_SIGN       14 
00105 #define VERR_SERVER     15 
00106 #define VERR_MEM        16 
00107 #define VERR_VERIFY     17 
00108 #define VERR_TYPE       18 
00109 #define VERR_ORDER      19 
00110 #define VERR_SERVERCODE 20 
00112 struct vomsdata {
00113   char *cdir;
00114   char *vdir;
00115   struct voms **data; 
00118   char *workvo;     
00120   char *extra_data; 
00129   int volen;
00130   int extralen;
00131   /* Fields below this line are reserved. */
00132 };
00133 
00134 extern struct contactdata **VOMS_FindByAlias(struct vomsdata *vd,
00135                                              char *alias, 
00136                                              char *system, 
00137                                              char *user, 
00138                                              int *error); 
00156 extern struct contactdata **VOMS_FindByVO(struct vomsdata *vd,
00157                                           char *vo, 
00158                                           char *system, 
00159                                           char *user, 
00160                                           int *error);  
00178 extern void VOMS_DeleteContacts(struct contactdata **list); 
00182 extern struct vomsdata *VOMS_Init(char *voms, char *cert); 
00196 extern struct voms *VOMS_Copy(struct voms *v, int *error); 
00203 extern struct vomsdata *VOMS_CopyAll(struct vomsdata *vd, int *error); 
00210 extern void VOMS_Delete(struct voms *v); 
00213 extern int VOMS_AddTarget(struct vomsdata *vd, char *target, int *error); 
00218 extern void VOMS_FreeTargets(struct vomsdata *vd, int *error);            
00222 extern char *VOMS_ListTargets(struct vomsdata *vd, int *error);          /*< Gets the list of targets for the AC.
00223                                                                             \param vd The vomsdata structure.
00224                                                                             \param error RETURN PARAMETER: qualifies the error message. */
00225 
00226 extern int VOMS_SetVerificationType(int type, struct vomsdata *vd, int *error); /* Sets the verification type.
00227                                                                                    \param type. The verification type.
00228                                                                                    \param vd The vomsdata structure.
00229                                                                                    \param error RETURN PARAMETER: qualifies the error message. */
00230 
00231 extern int VOMS_SetLifetime(int length, struct vomsdata *vd,
00232                             int *error); 
00239 extern void VOMS_Destroy(struct vomsdata *vd); 
00242 extern int VOMS_ResetOrder(struct vomsdata *vd, int *error); 
00248 extern int VOMS_Ordering(char *order, struct vomsdata *vd, int *error); 
00258 extern int VOMS_Contact(char *hostname, int port, char *servsubject,
00259                         char *command, struct vomsdata *vd, int *error);  
00272 extern int VOMS_ContactRaw(char *hostname, int port, char *servsubject,
00273                            char *command, void **data, int *datalen, int *version,
00274                            struct vomsdata *vd, int *error); 
00279 extern int VOMS_Retrieve(X509 *cert, STACK_OF(X509) *chain, int how,
00280                          struct vomsdata *vd, int *error);  
00292 extern int VOMS_Import(char *buffer, int buflen, struct vomsdata *vd, int *error); 
00302 extern int VOMS_Export(char **buffer, int *buflen, struct vomsdata *vd, int *error);
00303 
00304 extern struct voms *VOMS_DefaultData(struct vomsdata *vd, int *error); 
00311 int getMajorVersionNumber(void);
00312 int getMinorVersionNumber(void);
00313 int getPatchVersionNumber(void);
00314 
00315 #endif

Generated on Thu Jan 29 11:36:24 2004 for VOMS C API by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002