#include <openssl/ssl.h>
#include <openssl/crypto.h>
#include <time.h>
#include <stdio.h>
Go to the source code of this file.
Classes | |
struct | GRSTgaclCred |
struct | GRSTgaclNamevalue |
struct | GRSTgaclEntry |
struct | GRSTgaclAcl |
struct | GRSTgaclUser |
struct | GRSTasn1TagList |
struct | GRSTx509Cert |
struct | GRSTx509Chain |
struct | GRSThtcpCountstr |
struct | GRSThtcpMessage |
struct | GRSThttpCharsList |
struct | GRSThttpBody |
Defines | |
#define | GRST_VERSION 010500 |
#define | FALSE (0) |
#define | TRUE (!FALSE) |
#define | GRST_RET_OK 0 |
#define | GRST_RET_FAILED 1000 |
#define | GRST_RET_CERT_NOT_FOUND 1001 |
#define | GRST_RET_BAD_SIGNATURE 1002 |
#define | GRST_RET_NO_SUCH_FILE 1003 |
#define | GRSTerrorLog(GRSTerrorLevel,...) if (GRSTerrorLogFunc != NULL) (GRSTerrorLogFunc)(__FILE__, __LINE__, GRSTerrorLevel, __VA_ARGS__) |
#define | GRST_LOG_EMERG 0 |
#define | GRST_LOG_ALERT 1 |
#define | GRST_LOG_CRIT 2 |
#define | GRST_LOG_ERR 3 |
#define | GRST_LOG_WARNING 4 |
#define | GRST_LOG_NOTICE 5 |
#define | GRST_LOG_INFO 6 |
#define | GRST_LOG_DEBUG 7 |
#define | GRST_MAX_TIME_T INT32_MAX |
#define | GRST_PERM_NONE 0 |
#define | GRST_PERM_READ 1 |
#define | GRST_PERM_EXEC 2 |
#define | GRST_PERM_LIST 4 |
#define | GRST_PERM_WRITE 8 |
#define | GRST_PERM_ADMIN 16 |
#define | GRST_PERM_ALL 31 |
#define | GRSTgaclPermIsNone(perm) ((perm) == 0) |
#define | GRSTgaclPermHasNone(perm) ((perm) == 0) |
#define | GRSTgaclPermHasRead(perm) (((perm) & GRST_PERM_READ ) != 0) |
#define | GRSTgaclPermHasExec(perm) (((perm) & GRST_PERM_EXEC ) != 0) |
#define | GRSTgaclPermHasList(perm) (((perm) & GRST_PERM_LIST ) != 0) |
#define | GRSTgaclPermHasWrite(perm) (((perm) & GRST_PERM_WRITE) != 0) |
#define | GRSTgaclPermHasAdmin(perm) (((perm) & GRST_PERM_ADMIN) != 0) |
#define | GRST_ACTION_ALLOW 0 |
#define | GRST_ACTION_DENY 1 |
#define | GRST_HIST_PREFIX ".grsthist" |
#define | GRST_ACL_FILE ".gacl" |
#define | GRST_DN_LISTS "/etc/grid-security/dn-lists" |
#define | GRST_RECURS_LIMIT 9 |
#define | GRST_PROXYCERTINFO_OID "1.3.6.1.4.1.3536.1.222" |
#define | GRST_PROXYCERTNEWINFO_OID "1.3.6.1.5.5.7.1.14" |
#define | GRST_VOMS_OID "1.3.6.1.4.1.8005.100.100.5" |
#define | GRST_VOMS_DIR "/etc/grid-security/vomsdir" |
#define | GRST_ASN1_MAXCOORDLEN 50 |
#define | GRST_ASN1_MAXTAGS 500 |
#define | GRST_CERT_BAD_FORMAT 1 |
#define | GRST_CERT_BAD_CHAIN 2 |
#define | GRST_CERT_BAD_SIG 4 |
#define | GRST_CERT_BAD_TIME 8 |
#define | GRST_CERT_BAD_OCSP 16 |
#define | GRST_CERT_TYPE_CA 1 |
#define | GRST_CERT_TYPE_EEC 2 |
#define | GRST_CERT_TYPE_PROXY 3 |
#define | GRST_CERT_TYPE_VOMS 4 |
#define | GRST_HTTP_PORT 777 |
#define | GRST_HTTPS_PORT 488 |
#define | GRST_HTCP_PORT 777 |
#define | GRST_GSIFTP_PORT 2811 |
#define | GRSThtcpNOPop 0 |
#define | GRSThtcpTSTop 1 |
#define | GRSThtcpCountstrLen(string) (256*((string)->length_msb) + (string)->length_lsb) |
#define | GRSTgaclCredGetAuri(cred) ((cred)->auri) |
#define | GRSTgaclCredSetNotBefore(cred, time) ((cred)->notbefore = (time)) |
#define | GRSTgaclCredGetNotBefore(cred) ((cred)->notbefore) |
#define | GRSTgaclCredSetNotAfter(cred, time) ((cred)->notafter = (time)) |
#define | GRSTgaclCredGetNotAfter(cred) ((cred)->notafter) |
#define | GRSTgaclCredSetDelegation(cred, level) ((cred)->delegation = (level)) |
#define | GRSTgaclCredGetDelegation(cred) ((cred)->delegation) |
#define | GRSTgaclCredSetNistLoa(cred, level) ((cred)->nist_loa = (level)) |
#define | GRSTgaclCredGetNistLoa(cred) ((cred)->nist_loa) |
#define | GRST_HEADFILE "gridsitehead.txt" |
#define | GRST_FOOTFILE "gridsitefoot.txt" |
#define | GRST_ADMIN_FILE "gridsite-admin.cgi" |
Typedefs | |
typedef int | GRSTgaclAction |
typedef int | GRSTgaclPerm |
Functions | |
int | GRSTx509CertLoad (GRSTx509Cert *, X509 *) |
int | GRSTx509ChainLoadCheck (GRSTx509Chain **, STACK_OF(X509)*, X509 *, char *, char *) |
Check certificate chain for GSI proxy acceptability. | |
int | GRSTx509ChainFree (GRSTx509Chain *) |
int | GRSTgaclInit (void) |
GRSTgaclCred * | GRSTgaclCredNew (char *) |
GRSTgaclCred * | GRSTgaclCredCreate (char *, char *) |
int | GRSTgaclCredAddValue (GRSTgaclCred *, char *, char *) |
int | GRSTgaclCredFree (GRSTgaclCred *) |
int | GRSTgaclEntryAddCred (GRSTgaclEntry *, GRSTgaclCred *) |
int | GRSTgaclEntryDelCred (GRSTgaclEntry *, GRSTgaclCred *) |
int | GRSTgaclCredCredPrint (GRSTgaclCred *, FILE *) |
int | GRSTgaclCredCmpAuri (GRSTgaclCred *, GRSTgaclCred *) |
GRSTgaclEntry * | GRSTgaclEntryNew (void) |
int | GRSTgaclEntryFree (GRSTgaclEntry *) |
int | GRSTgaclAclAddEntry (GRSTgaclAcl *, GRSTgaclEntry *) |
int | GRSTgaclEntryPrint (GRSTgaclEntry *, FILE *) |
int | GRSTgaclPermPrint (GRSTgaclPerm, FILE *) |
int | GRSTgaclEntryAllowPerm (GRSTgaclEntry *, GRSTgaclPerm) |
int | GRSTgaclEntryUnallowPerm (GRSTgaclEntry *, GRSTgaclPerm) |
int | GRSTgaclEntryDenyPerm (GRSTgaclEntry *, GRSTgaclPerm) |
int | GRSTgaclEntryUndenyPerm (GRSTgaclEntry *, GRSTgaclPerm) |
char * | GRSTgaclPermToChar (GRSTgaclPerm) |
GRSTgaclPerm | GRSTgaclPermFromChar (char *) |
GRSTgaclAcl * | GRSTgaclAclNew (void) |
int | GRSTgaclAclFree (GRSTgaclAcl *) |
int | GRSTgaclAclPrint (GRSTgaclAcl *, FILE *) |
int | GRSTgaclAclSave (GRSTgaclAcl *, char *) |
GRSTgaclAcl * | GRSTgaclAclLoadFile (char *) |
char * | GRSTgaclFileFindAclname (char *) |
GRSTgaclAcl * | GRSTgaclAclLoadforFile (char *) |
int | GRSTgaclFileIsAcl (char *) |
GRSTgaclUser * | GRSTgaclUserNew (GRSTgaclCred *) |
int | GRSTgaclUserFree (GRSTgaclUser *) |
int | GRSTgaclUserAddCred (GRSTgaclUser *, GRSTgaclCred *) |
int | GRSTgaclUserHasCred (GRSTgaclUser *, GRSTgaclCred *) |
int | GRSTgaclUserSetDNlists (GRSTgaclUser *, char *) |
int | GRSTgaclUserLoadDNlists (GRSTgaclUser *, char *) |
GRSTgaclCred * | GRSTgaclUserFindCredtype (GRSTgaclUser *, char *) |
int | GRSTgaclDNlistHasUser (char *, GRSTgaclUser *) |
int | GRSTgaclUserHasAURI (GRSTgaclUser *, char *) |
GRSTgaclPerm | GRSTgaclAclTestUser (GRSTgaclAcl *, GRSTgaclUser *) |
GRSTgaclPerm | GRSTgaclAclTestexclUser (GRSTgaclAcl *, GRSTgaclUser *) |
char * | GRSThttpUrlDecode (char *) |
char * | GRSThttpUrlEncode (char *) |
char * | GRSThttpUrlMildencode (char *) |
int | GRSTx509NameCmp (char *, char *) |
Compare X509 Distinguished Name strings. | |
int | GRSTx509KnownCriticalExts (X509 *) |
Check critical extensions. | |
int | GRSTx509IsCA (X509 *) |
Check if certificate can be used as a CA to sign standard X509 certs. | |
int | GRSTx509CheckChain (int *, X509_STORE_CTX *) |
Check certificate chain for GSI proxy acceptability. | |
int | GRSTx509VerifyCallback (int, X509_STORE_CTX *) |
Example VerifyCallback routine. | |
int | GRSTx509GetVomsCreds (int *, int, size_t, char *, X509 *, STACK_OF(X509)*, char *) |
Get the VOMS attributes in the extensions to the given cert stack. | |
GRSTgaclCred * | GRSTx509CompactToCred (char *) |
Turn a Compact Cred line into a GRSTgaclCred object. | |
int | GRSTx509CompactCreds (int *, int, size_t, char *, STACK_OF(X509)*, char *, X509 *) |
Get the credentials in an X509 cert/GSI proxy, including any VOMS. | |
char * | GRSTx509CachedProxyFind (char *, char *, char *) |
Find a proxy file in the proxy cache. | |
char * | GRSTx509FindProxyFileName (void) |
Find proxy file name of the current user. | |
int | GRSTx509MakeProxyCert (char **, FILE *, char *, char *, char *, int) |
Make a GSI Proxy chain from a request, certificate and private key. | |
char * | GRSTx509CachedProxyKeyFind (char *, char *, char *) |
Find a temporary proxy private key file in the proxy cache. | |
int | GRSTx509ProxyDestroy (char *, char *, char *) |
Destroy stored GSI proxy files. | |
int | GRSTx509ProxyGetTimes (char *, char *, char *, time_t *, time_t *) |
Get start and finish validity times of stored GSI proxy file. | |
int | GRSTx509CreateProxyRequest (char **, char **, char *) |
Create a X.509 request for a GSI proxy and its private key. | |
int | GRSTx509MakeProxyRequest (char **, char *, char *, char *) |
Make and store a X.509 request for a GSI proxy. | |
char * | GRSTx509MakeDelegationID (void) |
Returns a Delegation ID based on hash of GRST_CRED_0, ... | |
int | GRSTx509StringToChain (STACK_OF(X509)**, char *) |
Create a stack of X509 certificate from a PEM-encoded string. | |
char * | GRSTx509MakeProxyFileName (char *, STACK_OF(X509)*) |
int | GRSTx509CacheProxy (char *, char *, char *, char *) |
Store a GSI proxy chain in the proxy cache, along with the private key. | |
void | GRSThttpBodyInit (GRSThttpBody *) |
void | GRSThttpPrintf (GRSThttpBody *, char *,...) |
int | GRSThttpCopy (GRSThttpBody *, char *) |
void | GRSThttpWriteOut (GRSThttpBody *) |
int | GRSThttpPrintHeaderFooter (GRSThttpBody *, char *, char *) |
int | GRSThttpPrintHeader (GRSThttpBody *, char *) |
int | GRSThttpPrintFooter (GRSThttpBody *, char *) |
char * | GRSThttpGetCGI (char *) |
time_t | GRSTasn1TimeToTimeT (unsigned char *, size_t) |
ASN1 time string (in a char *) to time_t. | |
int | GRSTasn1SearchTaglist (struct GRSTasn1TagList taglist[], int, char *) |
int | GRSTasn1ParseDump (BIO *, unsigned char *, long, struct GRSTasn1TagList taglist[], int, int *) |
int | GRSTasn1GetX509Name (char *, int, char *, char *, struct GRSTasn1TagList taglist[], int) |
int | GRSThtcpNOPrequestMake (char **, int *, unsigned int) |
int | GRSThtcpNOPresponseMake (char **, int *, unsigned int) |
int | GRSThtcpTSTrequestMake (char **, int *, unsigned int, char *, char *, char *) |
int | GRSThtcpTSTresponseMake (char **, int *, unsigned int, char *, char *, char *) |
int | GRSThtcpMessageParse (GRSThtcpMessage *, char *, int) |
Variables | |
void(*) | GRSTerrorLogFunc (char *, int, int, char *,...) |
#define FALSE (0) |
Definition at line 64 of file gridsite.h.
#define GRST_ACL_FILE ".gacl" |
Definition at line 151 of file gridsite.h.
Referenced by GRSTgaclFileFindAclname(), GRSTgaclFileIsAcl(), GRSTxacmlFileFindAclname(), and GRSTxacmlFileIsAcl().
#define GRST_ACTION_ALLOW 0 |
Definition at line 147 of file gridsite.h.
#define GRST_ACTION_DENY 1 |
Definition at line 148 of file gridsite.h.
#define GRST_ADMIN_FILE "gridsite-admin.cgi" |
Definition at line 404 of file gridsite.h.
#define GRST_ASN1_MAXCOORDLEN 50 |
#define GRST_ASN1_MAXTAGS 500 |
Definition at line 161 of file gridsite.h.
#define GRST_CERT_BAD_CHAIN 2 |
Definition at line 183 of file gridsite.h.
Referenced by GRSTx509ChainLoadCheck(), and GRSTx509ChainVomsAdd().
#define GRST_CERT_BAD_FORMAT 1 |
Definition at line 182 of file gridsite.h.
#define GRST_CERT_BAD_OCSP 16 |
Definition at line 186 of file gridsite.h.
#define GRST_CERT_BAD_SIG 4 |
Definition at line 184 of file gridsite.h.
Referenced by GRSTx509ChainLoadCheck(), and GRSTx509ChainVomsAdd().
#define GRST_CERT_BAD_TIME 8 |
Definition at line 185 of file gridsite.h.
Referenced by GRSTx509ChainLoadCheck(), and GRSTx509ChainVomsAdd().
#define GRST_CERT_TYPE_CA 1 |
#define GRST_CERT_TYPE_EEC 2 |
Definition at line 189 of file gridsite.h.
Referenced by GRST_get_voms_roles_and_free(), GRST_print_ssl_creds(), and GRSTx509ChainLoadCheck().
#define GRST_CERT_TYPE_PROXY 3 |
Definition at line 190 of file gridsite.h.
Referenced by GRST_get_voms_roles_and_free(), GRST_print_ssl_creds(), and GRSTx509ChainLoadCheck().
#define GRST_CERT_TYPE_VOMS 4 |
Definition at line 191 of file gridsite.h.
Referenced by GRST_get_voms_roles_and_free(), GRST_print_ssl_creds(), and GRSTx509ChainVomsAdd().
#define GRST_DN_LISTS "/etc/grid-security/dn-lists" |
#define GRST_FOOTFILE "gridsitefoot.txt" |
#define GRST_GSIFTP_PORT 2811 |
Definition at line 205 of file gridsite.h.
#define GRST_HEADFILE "gridsitehead.txt" |
#define GRST_HIST_PREFIX ".grsthist" |
Definition at line 150 of file gridsite.h.
#define GRST_HTCP_PORT 777 |
Definition at line 204 of file gridsite.h.
#define GRST_HTTP_PORT 777 |
Definition at line 202 of file gridsite.h.
#define GRST_HTTPS_PORT 488 |
Definition at line 203 of file gridsite.h.
#define GRST_LOG_ALERT 1 |
Definition at line 95 of file gridsite.h.
#define GRST_LOG_CRIT 2 |
Definition at line 96 of file gridsite.h.
#define GRST_LOG_DEBUG 7 |
Definition at line 101 of file gridsite.h.
Referenced by GRST_callback_SSLVerify_wrapper(), GRST_get_voms_roles_and_free(), GRST_print_ssl_creds(), GRSTgaclAclLoadFile(), GRSTx509ChainLoadCheck(), GRSTx509VerifyVomsSig(), recurse4dnlists(), ssl_callback_SSLVerify(), and ssl_callback_SSLVerify_CRL().
#define GRST_LOG_EMERG 0 |
Definition at line 94 of file gridsite.h.
#define GRST_LOG_ERR 3 |
Definition at line 97 of file gridsite.h.
Referenced by GRST_callback_SSLVerify_wrapper(), ssl_callback_SSLVerify(), and ssl_callback_SSLVerify_CRL().
#define GRST_LOG_INFO 6 |
Definition at line 100 of file gridsite.h.
Referenced by GRST_callback_SSLVerify_wrapper(), GRST_get_voms_roles_and_free(), GRST_print_ssl_creds(), and MyGRSTerrorLogFunc().
#define GRST_LOG_NOTICE 5 |
Definition at line 99 of file gridsite.h.
#define GRST_LOG_WARNING 4 |
#define GRST_MAX_TIME_T INT32_MAX |
Definition at line 103 of file gridsite.h.
#define GRST_PERM_ADMIN 16 |
Definition at line 134 of file gridsite.h.
Referenced by GRSTgaclAclTestUser(), GRSTgaclEntryPrint(), and GRSTxacmlEntryPrint().
#define GRST_PERM_ALL 31 |
Definition at line 135 of file gridsite.h.
#define GRST_PERM_EXEC 2 |
Definition at line 131 of file gridsite.h.
#define GRST_PERM_LIST 4 |
Definition at line 132 of file gridsite.h.
#define GRST_PERM_NONE 0 |
Definition at line 129 of file gridsite.h.
#define GRST_PERM_READ 1 |
Definition at line 130 of file gridsite.h.
Referenced by GRSTgaclEntryPrint(), GRSTgaclPermPrint(), GRSTxacmlEntryPrint(), and GRSTxacmlPermPrint().
#define GRST_PERM_WRITE 8 |
#define GRST_PROXYCERTINFO_OID "1.3.6.1.4.1.3536.1.222" |
#define GRST_PROXYCERTNEWINFO_OID "1.3.6.1.5.5.7.1.14" |
#define GRST_RECURS_LIMIT 9 |
#define GRST_RET_BAD_SIGNATURE 1002 |
Definition at line 80 of file gridsite.h.
#define GRST_RET_CERT_NOT_FOUND 1001 |
Definition at line 77 of file gridsite.h.
#define GRST_RET_FAILED 1000 |
Definition at line 74 of file gridsite.h.
Referenced by GRSTasn1GetX509Name(), GRSTx509CacheProxy(), GRSTx509ChainLoadCheck(), GRSTx509CompactCreds(), GRSTx509IsCA(), GRSTx509KnownCriticalExts(), GRSTx509MakeProxyCert(), GRSTx509MakeProxyRequest(), GRSTx509ProxyDestroy(), GRSTx509ProxyGetTimes(), GRSTx509StringToChain(), GRSTx509VerifySig(), and GRSTx509VerifyVomsSig().
#define GRST_RET_NO_SUCH_FILE 1003 |
Definition at line 83 of file gridsite.h.
Referenced by GRSTx509ProxyDestroy(), and GRSTx509ProxyGetTimes().
#define GRST_RET_OK 0 |
Definition at line 71 of file gridsite.h.
Referenced by GRST_callback_SSLVerify_wrapper(), GRSTasn1GetX509Name(), GRSTx509CacheProxy(), GRSTx509ChainFree(), GRSTx509ChainLoadCheck(), GRSTx509ChainVomsAdd(), GRSTx509CheckChain(), GRSTx509CompactCreds(), GRSTx509GetVomsCreds(), GRSTx509IsCA(), GRSTx509KnownCriticalExts(), GRSTx509MakeProxyCert(), GRSTx509ParseVomsExt(), GRSTx509ProxyDestroy(), GRSTx509ProxyGetTimes(), GRSTx509StringToChain(), GRSTx509VerifyCallback(), GRSTx509VerifySig(), and GRSTx509VerifyVomsSig().
#define GRST_VERSION 010500 |
Definition at line 41 of file gridsite.h.
#define GRST_VOMS_DIR "/etc/grid-security/vomsdir" |
Definition at line 158 of file gridsite.h.
#define GRST_VOMS_OID "1.3.6.1.4.1.8005.100.100.5" |
Definition at line 157 of file gridsite.h.
Referenced by GRSTx509ChainLoadCheck(), and GRSTx509GetVomsCreds().
#define GRSTerrorLog | ( | GRSTerrorLevel, | |||
... | ) | if (GRSTerrorLogFunc != NULL) (GRSTerrorLogFunc)(__FILE__, __LINE__, GRSTerrorLevel, __VA_ARGS__) |
Definition at line 88 of file gridsite.h.
Referenced by GRST_callback_SSLVerify_wrapper(), GRST_get_voms_roles_and_free(), GRST_print_ssl_creds(), GRSTgaclAclLoadFile(), GRSTx509ChainLoadCheck(), GRSTx509VerifyVomsSig(), recurse4dnlists(), ssl_callback_SSLVerify(), and ssl_callback_SSLVerify_CRL().
#define GRSTgaclCredGetAuri | ( | cred | ) | ((cred)->auri) |
Definition at line 244 of file gridsite.h.
#define GRSTgaclCredGetDelegation | ( | cred | ) | ((cred)->delegation) |
Definition at line 253 of file gridsite.h.
#define GRSTgaclCredGetNistLoa | ( | cred | ) | ((cred)->nist_loa) |
Definition at line 256 of file gridsite.h.
#define GRSTgaclCredGetNotAfter | ( | cred | ) | ((cred)->notafter) |
Definition at line 250 of file gridsite.h.
#define GRSTgaclCredGetNotBefore | ( | cred | ) | ((cred)->notbefore) |
Definition at line 247 of file gridsite.h.
Definition at line 252 of file gridsite.h.
Referenced by GRSTx509CompactToCred(), and recurse4dnlists().
#define GRSTgaclCredSetNotAfter | ( | cred, | |||
time | ) | ((cred)->notafter = (time)) |
#define GRSTgaclCredSetNotBefore | ( | cred, | |||
time | ) | ((cred)->notbefore = (time)) |
#define GRSTgaclPermHasAdmin | ( | perm | ) | (((perm) & GRST_PERM_ADMIN) != 0) |
Definition at line 145 of file gridsite.h.
#define GRSTgaclPermHasExec | ( | perm | ) | (((perm) & GRST_PERM_EXEC ) != 0) |
Definition at line 142 of file gridsite.h.
#define GRSTgaclPermHasList | ( | perm | ) | (((perm) & GRST_PERM_LIST ) != 0) |
Definition at line 143 of file gridsite.h.
#define GRSTgaclPermHasNone | ( | perm | ) | ((perm) == 0) |
Definition at line 140 of file gridsite.h.
#define GRSTgaclPermHasRead | ( | perm | ) | (((perm) & GRST_PERM_READ ) != 0) |
Definition at line 141 of file gridsite.h.
#define GRSTgaclPermHasWrite | ( | perm | ) | (((perm) & GRST_PERM_WRITE) != 0) |
Definition at line 144 of file gridsite.h.
#define GRSTgaclPermIsNone | ( | perm | ) | ((perm) == 0) |
Definition at line 138 of file gridsite.h.
Definition at line 214 of file gridsite.h.
#define GRSThtcpNOPop 0 |
Definition at line 207 of file gridsite.h.
#define GRSThtcpTSTop 1 |
Definition at line 208 of file gridsite.h.
#define TRUE (!FALSE) |
Definition at line 67 of file gridsite.h.
typedef int GRSTgaclAction |
Definition at line 117 of file gridsite.h.
typedef int GRSTgaclPerm |
Definition at line 118 of file gridsite.h.
int GRSTasn1GetX509Name | ( | char * | , | |
int | , | |||
char * | , | |||
char * | , | |||
struct GRSTasn1TagList | taglist[], | |||
int | ||||
) |
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().
int GRSTasn1ParseDump | ( | BIO * | , | |
unsigned char * | , | |||
long | , | |||
struct GRSTasn1TagList | taglist[], | |||
int | , | |||
int * | ||||
) |
Definition at line 484 of file grst_asn1.c.
References GRSTasn1Parse2().
Referenced by GRSTx509ChainVomsAdd(), and GRSTx509ParseVomsExt().
int GRSTasn1SearchTaglist | ( | struct GRSTasn1TagList | taglist[], | |
int | , | |||
char * | ||||
) |
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().
int GRSTgaclAclAddEntry | ( | GRSTgaclAcl * | , | |
GRSTgaclEntry * | ||||
) |
Definition at line 459 of file grst_gacl.c.
References acl(), entry, GRSTgaclEntryInsert(), and NULL.
Referenced by GRSTgaclAclParse(), and GRSTxacmlAclParse().
int GRSTgaclAclFree | ( | GRSTgaclAcl * | ) |
Definition at line 605 of file grst_gacl.c.
References acl(), GRSTgaclEntriesFree(), and NULL.
Referenced by GRSTgaclAclParse(), and GRSTxacmlAclParse().
GRSTgaclAcl* GRSTgaclAclLoadFile | ( | char * | ) |
Definition at line 783 of file grst_gacl.c.
References acl(), GRST_LOG_DEBUG, GRSTerrorLog, GRSTgaclAclParse(), GRSTxacmlAclParse(), and NULL.
Referenced by GRSTgaclAclLoadforFile().
GRSTgaclAcl* GRSTgaclAclLoadforFile | ( | char * | ) |
Definition at line 931 of file grst_gacl.c.
References acl(), free(), GRSTgaclAclLoadFile(), GRSTgaclFileFindAclname(), and NULL.
GRSTgaclAcl* GRSTgaclAclNew | ( | void | ) |
Definition at line 589 of file grst_gacl.c.
References GRSTgaclAcl::firstentry, malloc(), and NULL.
Referenced by GRSTgaclAclParse(), and GRSTxacmlAclParse().
int GRSTgaclAclPrint | ( | GRSTgaclAcl * | , | |
FILE * | ||||
) |
Definition at line 617 of file grst_gacl.c.
References acl(), entry, GRSTgaclEntryPrint(), and NULL.
Referenced by GRSTgaclAclSave().
int GRSTgaclAclSave | ( | GRSTgaclAcl * | , | |
char * | ||||
) |
Definition at line 631 of file grst_gacl.c.
References acl(), fclose(), fopen, fp, GRSTgaclAclPrint(), and NULL.
GRSTgaclPerm GRSTgaclAclTestexclUser | ( | GRSTgaclAcl * | , | |
GRSTgaclUser * | ||||
) |
Definition at line 1368 of file grst_gacl.c.
References acl(), GRSTgaclCred::auri, entry, flag, GRSTgaclUserHasCred(), GRSTgaclCred::next, and NULL.
GRSTgaclPerm GRSTgaclAclTestUser | ( | GRSTgaclAcl * | , | |
GRSTgaclUser * | ||||
) |
Definition at line 1323 of file grst_gacl.c.
References acl(), GRSTgaclCred::auri, entry, flag, GRST_PERM_ADMIN, GRST_PERM_WRITE, GRSTgaclUserHasCred(), GRSTgaclCred::next, and NULL.
int GRSTgaclCredAddValue | ( | GRSTgaclCred * | , | |
char * | , | |||
char * | ||||
) |
Definition at line 188 of file grst_gacl.c.
References GRSTgaclCred::auri, free(), GRSThttpUrlMildencode(), i, NULL, sprintf(), and value.
Referenced by GRSTgaclCredParse(), and GRSTxacmlCredParse().
int GRSTgaclCredCmpAuri | ( | GRSTgaclCred * | , | |
GRSTgaclCred * | ||||
) |
GRSTgaclCred* GRSTgaclCredCreate | ( | char * | , | |
char * | ||||
) |
Definition at line 126 of file grst_gacl.c.
References GRSTgaclCred::auri, GRSTgaclCred::delegation, i, malloc(), GRSTgaclCred::next, GRSTgaclCred::nist_loa, GRSTgaclCred::notafter, GRSTgaclCred::notbefore, NULL, and sprintf().
Referenced by GRSTgaclCredNew(), GRSTgaclCredParse(), GRSTx509CompactToCred(), and recurse4dnlists().
int GRSTgaclCredCredPrint | ( | GRSTgaclCred * | , | |
FILE * | ||||
) |
int GRSTgaclCredFree | ( | GRSTgaclCred * | ) |
Definition at line 251 of file grst_gacl.c.
References GRSTgaclCred::auri, free(), and NULL.
Referenced by GRSTgaclCredParse(), GRSTgaclCredsFree(), GRSTgaclEntryParse(), and GRSTxacmlEntryParse().
GRSTgaclCred* GRSTgaclCredNew | ( | char * | ) |
Definition at line 165 of file grst_gacl.c.
References GRSTgaclCredCreate(), and NULL.
Referenced by GRSTgaclCredParse(), and GRSTxacmlCredParse().
int GRSTgaclDNlistHasUser | ( | char * | , | |
GRSTgaclUser * | ||||
) |
int GRSTgaclEntryAddCred | ( | GRSTgaclEntry * | , | |
GRSTgaclCred * | ||||
) |
Definition at line 295 of file grst_gacl.c.
References entry, GRSTgaclCredInsert(), and NULL.
Referenced by GRSTgaclEntryParse(), and GRSTxacmlEntryParse().
int GRSTgaclEntryAllowPerm | ( | GRSTgaclEntry * | , | |
GRSTgaclPerm | ||||
) |
Definition at line 529 of file grst_gacl.c.
References entry.
Referenced by GRSTgaclEntryParse(), and GRSTxacmlEntryParse().
int GRSTgaclEntryDelCred | ( | GRSTgaclEntry * | , | |
GRSTgaclCred * | ||||
) |
int GRSTgaclEntryDenyPerm | ( | GRSTgaclEntry * | , | |
GRSTgaclPerm | ||||
) |
Definition at line 543 of file grst_gacl.c.
References entry.
Referenced by GRSTgaclEntryParse(), and GRSTxacmlEntryParse().
int GRSTgaclEntryFree | ( | GRSTgaclEntry * | ) |
Definition at line 414 of file grst_gacl.c.
References entry, free(), GRSTgaclCredsFree(), and NULL.
Referenced by GRSTgaclEntriesFree(), GRSTgaclEntryParse(), and GRSTxacmlEntryParse().
GRSTgaclEntry* GRSTgaclEntryNew | ( | void | ) |
Definition at line 395 of file grst_gacl.c.
References GRSTgaclEntry::allowed, GRSTgaclEntry::denied, GRSTgaclEntry::firstcred, malloc(), GRSTgaclEntry::next, and NULL.
Referenced by GRSTgaclEntryParse(), and GRSTxacmlEntryParse().
int GRSTgaclEntryPrint | ( | GRSTgaclEntry * | , | |
FILE * | ||||
) |
Definition at line 475 of file grst_gacl.c.
References entry, GRST_PERM_ADMIN, GRST_PERM_READ, GRSTgaclCredPrint(), GRSTgaclPermPrint(), i, GRSTgaclCred::next, and NULL.
Referenced by GRSTgaclAclPrint().
int GRSTgaclEntryUnallowPerm | ( | GRSTgaclEntry * | , | |
GRSTgaclPerm | ||||
) |
int GRSTgaclEntryUndenyPerm | ( | GRSTgaclEntry * | , | |
GRSTgaclPerm | ||||
) |
char* GRSTgaclFileFindAclname | ( | char * | ) |
Definition at line 873 of file grst_gacl.c.
References free(), GRST_ACL_FILE, len, malloc(), NULL, p, rindex, S_ISDIR, sprintf(), stat, strcat(), and strcpy().
Referenced by GRSTgaclAclLoadforFile().
int GRSTgaclFileIsAcl | ( | char * | ) |
int GRSTgaclInit | ( | void | ) |
Definition at line 106 of file grst_gacl.c.
GRSTgaclPerm GRSTgaclPermFromChar | ( | char * | ) |
int GRSTgaclPermPrint | ( | GRSTgaclPerm | , | |
FILE * | ||||
) |
Definition at line 515 of file grst_gacl.c.
References fprintf(), GRST_PERM_READ, i, and NULL.
Referenced by GRSTgaclEntryPrint().
char* GRSTgaclPermToChar | ( | GRSTgaclPerm | ) |
int GRSTgaclUserAddCred | ( | GRSTgaclUser * | , | |
GRSTgaclCred * | ||||
) |
Definition at line 984 of file grst_gacl.c.
References GRSTgaclUser::firstcred, GRSTgaclCred::next, and NULL.
Referenced by recurse4dnlists().
GRSTgaclCred* GRSTgaclUserFindCredtype | ( | GRSTgaclUser * | , | |
char * | ||||
) |
Definition at line 1075 of file grst_gacl.c.
References GRSTgaclCred::auri, GRSTgaclUser::firstcred, GRSTgaclCred::next, and NULL.
int GRSTgaclUserFree | ( | GRSTgaclUser * | ) |
Definition at line 971 of file grst_gacl.c.
References GRSTgaclUser::dnlists, GRSTgaclUser::firstcred, free(), GRSTgaclCredsFree(), and NULL.
int GRSTgaclUserHasAURI | ( | GRSTgaclUser * | , | |
char * | ||||
) |
Definition at line 1309 of file grst_gacl.c.
References GRSTgaclCred::auri, GRSTgaclUser::firstcred, GRSTgaclCred::next, and NULL.
Referenced by GRSTgaclDNlistHasUser().
int GRSTgaclUserHasCred | ( | GRSTgaclUser * | , | |
GRSTgaclCred * | ||||
) |
Definition at line 1007 of file grst_gacl.c.
References GRSTgaclCred::auri, GRSTgaclUser::firstcred, GRSTgaclCred::next, GRSTgaclCred::nist_loa, and NULL.
Referenced by GRSTgaclAclTestexclUser(), and GRSTgaclAclTestUser().
int GRSTgaclUserLoadDNlists | ( | GRSTgaclUser * | , | |
char * | ||||
) |
Definition at line 1212 of file grst_gacl.c.
References GRSTgaclCred::auri, GRSTgaclUser::firstcred, free(), getenv(), GRST_DN_LISTS, GRSTgaclCred::next, NULL, and recurse4dnlists().
Referenced by GRSTgaclUserSetDNlists().
GRSTgaclUser* GRSTgaclUserNew | ( | GRSTgaclCred * | ) |
Definition at line 954 of file grst_gacl.c.
References GRSTgaclUser::dnlists, GRSTgaclUser::firstcred, malloc(), and NULL.
int GRSTgaclUserSetDNlists | ( | GRSTgaclUser * | , | |
char * | ||||
) |
Definition at line 1105 of file grst_gacl.c.
References GRSTgaclUser::dnlists, free(), GRSTgaclUserLoadDNlists(), and NULL.
int GRSThtcpMessageParse | ( | GRSThtcpMessage * | , | |
char * | , | |||
int | ||||
) |
int GRSThtcpNOPrequestMake | ( | char ** | , | |
int * | , | |||
unsigned | int | |||
) |
int GRSThtcpNOPresponseMake | ( | char ** | , | |
int * | , | |||
unsigned | int | |||
) |
int GRSThtcpTSTrequestMake | ( | char ** | , | |
int * | , | |||
unsigned | int, | |||
char * | , | |||
char * | , | |||
char * | ||||
) |
int GRSThtcpTSTresponseMake | ( | char ** | , | |
int * | , | |||
unsigned | int, | |||
char * | , | |||
char * | , | |||
char * | ||||
) |
void GRSThttpBodyInit | ( | GRSThttpBody * | ) |
int GRSThttpCopy | ( | GRSThttpBody * | , | |
char * | ||||
) |
Definition at line 98 of file grst_http.c.
References close, GRSThttpBody::first, fstat, GRSThttpBody::last, len, malloc(), GRSThttpCharsList::next, NULL, open, p, read, GRSThttpBody::size, stat, and GRSThttpCharsList::text.
Referenced by GRSThttpPrintFooter(), GRSThttpPrintHeader(), and GRSThttpPrintHeaderFooter().
char* GRSThttpGetCGI | ( | char * | ) |
void GRSThttpPrintf | ( | GRSThttpBody * | , | |
char * | , | |||
... | ||||
) |
Definition at line 62 of file grst_http.c.
References GRSThttpBody::first, GRSThttpBody::last, malloc(), GRSThttpCharsList::next, NULL, p, size, GRSThttpBody::size, size_t, and GRSThttpCharsList::text.
int GRSThttpPrintFooter | ( | GRSThttpBody * | , | |
char * | ||||
) |
Definition at line 224 of file grst_http.c.
References getenv(), GRST_FOOTFILE, GRSThttpCopy(), GRSThttpPrintHeaderFooter(), and NULL.
int GRSThttpPrintHeader | ( | GRSThttpBody * | , | |
char * | ||||
) |
Definition at line 208 of file grst_http.c.
References getenv(), GRST_HEADFILE, GRSThttpCopy(), GRSThttpPrintHeaderFooter(), and NULL.
int GRSThttpPrintHeaderFooter | ( | GRSThttpBody * | , | |
char * | , | |||
char * | ||||
) |
Definition at line 171 of file grst_http.c.
References free(), GRSThttpCopy(), malloc(), NULL, p, rindex, S_ISDIR, stat, strcat(), and strcpy().
Referenced by GRSThttpPrintFooter(), and GRSThttpPrintHeader().
char* GRSThttpUrlDecode | ( | char * | ) |
Definition at line 332 of file grst_http.c.
References i, j, malloc(), n, and out.
Referenced by recurse4dnlists().
char* GRSThttpUrlEncode | ( | char * | ) |
Definition at line 371 of file grst_http.c.
References malloc(), out, p, and sprintf().
Referenced by GRSTx509CachedProxyFind(), GRSTx509CachedProxyKeyFind(), GRSTx509CacheProxy(), GRSTx509MakeProxyRequest(), GRSTx509ProxyDestroy(), and GRSTx509ProxyGetTimes().
char* GRSThttpUrlMildencode | ( | char * | ) |
Definition at line 404 of file grst_http.c.
References malloc(), out, p, and sprintf().
Referenced by GRSTgaclCredAddValue(), and GRSTx509CompactToCred().
void GRSThttpWriteOut | ( | GRSThttpBody * | ) |
Definition at line 153 of file grst_http.c.
References GRSThttpBody::first, NULL, p, and GRSThttpBody::size.
char* GRSTx509CachedProxyFind | ( | char * | proxydir, | |
char * | delegation_id, | |||
char * | user_dn | |||
) |
Find a proxy file in the proxy cache.
Returns the full path and file name of proxy file associated with given delegation ID and user DN.
Return a pointer to a malloc'd string with the full path of the proxy file corresponding to the given delegation_id, or NULL if not found.
Definition at line 1586 of file grst_x509.c.
References free(), GRSThttpUrlEncode(), malloc(), NULL, S_ISREG, sprintf(), and stat.
char* GRSTx509CachedProxyKeyFind | ( | char * | proxydir, | |
char * | delegation_id, | |||
char * | user_dn | |||
) |
Find a temporary proxy private key file in the proxy cache.
Returns the full path and file name of the private key file associated with given delegation ID and user DN.
Return a pointer to a malloc'd string with the full path of the private proxy key corresponding to the given delegation_id, or NULL if not found.
Definition at line 1617 of file grst_x509.c.
References free(), GRSThttpUrlEncode(), malloc(), NULL, S_ISREG, sprintf(), and stat.
Referenced by GRSTx509CacheProxy().
int GRSTx509CacheProxy | ( | char * | proxydir, | |
char * | delegation_id, | |||
char * | user_dn, | |||
char * | proxychain | |||
) |
Store a GSI proxy chain in the proxy cache, along with the private key.
Returns GRST_RET_OK on success, non-zero otherwise. The existing private key with the same delegation ID and user DN is moved out of the temporary cache.
Definition at line 2071 of file grst_x509.c.
References c, EOF, fclose(), fopen, free(), fwrite, GRST_RET_FAILED, GRST_RET_OK, GRSThttpUrlEncode(), GRSTx509CachedProxyKeyFind(), GRSTx509StringToChain(), mkdir_printf(), NULL, ptr, S_IRUSR, S_IWUSR, S_IXUSR, sprintf(), and unlink.
int GRSTx509CertLoad | ( | GRSTx509Cert * | , | |
X509 * | ||||
) |
int GRSTx509ChainFree | ( | GRSTx509Chain * | ) |
Definition at line 170 of file grst_x509.c.
References chain, GRSTx509Cert::dn, free(), GRST_RET_OK, GRSTx509Cert::issuer, GRSTx509Cert::next, NULL, and GRSTx509Cert::ocsp.
Referenced by GRST_callback_SSLVerify_wrapper(), GRST_free_chain(), and GRST_get_voms_roles_and_free().
int GRSTx509ChainLoadCheck | ( | GRSTx509Chain ** | chain, | |
STACK_OF(X509)* | certstack, | |||
X509 * | lastcert, | |||
char * | capath, | |||
char * | vomsdir | |||
) |
Check certificate chain for GSI proxy acceptability.
Returns GRST_RET_OK if valid; OpenSSL X509 errors otherwise.
The GridSite version handles old and new style Globus proxies, and proxies derived from user certificates issued with "X509v3 Basic Constraints: CA:FALSE" (eg UK e-Science CA)
TODO: we do not yet check ProxyCertInfo and ProxyCertPolicy extensions (although via GRSTx509KnownCriticalExts() we can accept them.)
Definition at line 506 of file grst_x509.c.
References chain, GRSTx509Cert::delegation, depth, GRSTx509Cert::dn, GRSTx509Cert::errors, FALSE, fclose(), fopen, fp, GRST_CERT_BAD_CHAIN, GRST_CERT_BAD_SIG, GRST_CERT_BAD_TIME, GRST_CERT_TYPE_CA, GRST_CERT_TYPE_EEC, GRST_CERT_TYPE_PROXY, GRST_LOG_DEBUG, GRST_RET_FAILED, GRST_RET_OK, GRST_VOMS_OID, GRSTasn1TimeToTimeT(), GRSTerrorLog, GRSTx509ChainVomsAdd(), GRSTx509IsCA(), i, int, GRSTx509Cert::issuer, j, len, malloc(), GRSTx509Cert::next, GRSTx509Cert::notafter, GRSTx509Cert::notbefore, NULL, s, GRSTx509Cert::serial, size_t, sprintf(), TRUE, and GRSTx509Cert::type.
Referenced by GRST_callback_SSLVerify_wrapper().
int GRSTx509CheckChain | ( | int * | first_non_ca, | |
X509_STORE_CTX * | ctx | |||
) |
Check certificate chain for GSI proxy acceptability.
Returns X509_V_OK/GRST_RET_OK if valid; OpenSSL X509 errors otherwise.
Inspired by GSIcheck written by Mike Jones, SVE, Manchester Computing, The University of Manchester.
The GridSite version handles old and new style Globus proxies, and proxies derived from user certificates issued with "X509v3 Basic Constraints: CA:FALSE" (eg UK e-Science CA)
We do not check chain links between certs here: this is done by GRST_check_issued/X509_check_issued in mod_ssl's ssl_engine_init.c
TODO: we do not yet check ProxyCertInfo and ProxyCertPolicy extensions (although via GRSTx509KnownCriticalExts() we can accept them.)
Definition at line 807 of file grst_x509.c.
References depth, FALSE, GRST_RET_OK, GRSTasn1TimeToTimeT(), GRSTx509IsCA(), i, len, NULL, size_t, and TRUE.
Referenced by GRSTx509VerifyCallback().
int GRSTx509CompactCreds | ( | int * | lastcred, | |
int | maxcreds, | |||
size_t | credlen, | |||
char * | creds, | |||
STACK_OF(X509)* | certstack, | |||
char * | vomsdir, | |||
X509 * | peercert | |||
) |
Get the credentials in an X509 cert/GSI proxy, including any VOMS.
Credentials are placed in Compact Creds string array at *creds.
Function returns GRST_RET_OK on success, or GRST_RET_FAILED if some inconsistency found in certificate.
Definition at line 1203 of file grst_x509.c.
References GRST_RET_FAILED, GRST_RET_OK, GRSTasn1TimeToTimeT(), GRSTx509GetVomsCreds(), GRSTx509IsCA(), i, NULL, snprintf, and strcpy().
GRSTgaclCred* GRSTx509CompactToCred | ( | char * | grst_cred | ) |
Turn a Compact Cred line into a GRSTgaclCred object.
Returns pointer to created GRSTgaclCred or NULL or failure.
Definition at line 1142 of file grst_x509.c.
References free(), GRSTgaclCredCreate(), GRSTgaclCredSetDelegation, GRSThttpUrlMildencode(), NULL, and p.
int GRSTx509CreateProxyRequest | ( | char ** | reqtxt, | |
char ** | keytxt, | |||
char * | ocspurl | |||
) |
Create a X.509 request for a GSI proxy and its private key.
Returns GRST_RET_OK on success, non-zero otherwise. Request string and private key are PEM encoded strings
Definition at line 1661 of file grst_x509.c.
References GRST_KEYSIZE, malloc(), NULL, ptr, and size_t.
char* GRSTx509FindProxyFileName | ( | void | ) |
int GRSTx509GetVomsCreds | ( | int * | lastcred, | |
int | maxcreds, | |||
size_t | credlen, | |||
char * | creds, | |||
X509 * | usercert, | |||
STACK_OF(X509)* | certstack, | |||
char * | vomsdir | |||
) |
Get the VOMS attributes in the extensions to the given cert stack.
Puts any VOMS credentials found into the Compact Creds string array starting at *creds. Always returns GRST_RET_OK.
Definition at line 1091 of file grst_x509.c.
References GRST_RET_OK, GRST_VOMS_OID, GRSTasn1TimeToTimeT(), GRSTx509ParseVomsExt(), i, j, NULL, and s.
Referenced by GRSTx509CompactCreds().
int GRSTx509IsCA | ( | X509 * | cert | ) |
Check if certificate can be used as a CA to sign standard X509 certs.
Return GRST_RET_OK if true; GRST_RET_FAILED if not.
Definition at line 156 of file grst_x509.c.
References GRST_RET_FAILED, and GRST_RET_OK.
Referenced by GRSTx509ChainLoadCheck(), GRSTx509CheckChain(), and GRSTx509CompactCreds().
int GRSTx509KnownCriticalExts | ( | X509 * | cert | ) |
Check critical extensions.
Returning GRST_RET_OK if all of extensions are known to us or OpenSSL; GRST_REF_FAILED otherwise.
Since this function relies on functionality (X509_supported_extension) introduced in 0.9.7, then we do nothing and report an error (GRST_RET_FAILED) if one of the associated defines (X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION) is absent.
Definition at line 120 of file grst_x509.c.
References GRST_PROXYCERTINFO_OID, GRST_PROXYCERTNEWINFO_OID, GRST_RET_FAILED, GRST_RET_OK, i, and s.
Referenced by GRST_callback_SSLVerify_wrapper(), and GRSTx509VerifyCallback().
char* GRSTx509MakeDelegationID | ( | void | ) |
int GRSTx509MakeProxyCert | ( | char ** | proxychain, | |
FILE * | debugfp, | |||
char * | reqtxt, | |||
char * | cert, | |||
char * | key, | |||
int | minutes | |||
) |
Make a GSI Proxy chain from a request, certificate and private key.
The proxy chain is returned in *proxychain. If debugfp is non-NULL, errors are output to that file pointer. The proxy will expired in the given number of minutes starting from the current time.
Definition at line 1312 of file grst_x509.c.
References fclose(), fopen, fp, GRST_BACKDATE_SECONDS, GRST_MAX_CHAIN_LEN, GRST_RET_FAILED, GRST_RET_OK, GRSTasn1TimeToTimeT(), i, RooFitShortHand::L(), mpcerror(), name, NULL, ptr, and realloc().
char* GRSTx509MakeProxyFileName | ( | char * | , | |
STACK_OF(X509)* | ||||
) |
int GRSTx509MakeProxyRequest | ( | char ** | reqtxt, | |
char * | proxydir, | |||
char * | delegation_id, | |||
char * | user_dn | |||
) |
Make and store a X.509 request for a GSI proxy.
Returns GRST_RET_OK on success, non-zero otherwise. Request string is PEM encoded, and the key is stored in the temporary cache under proxydir
Definition at line 1732 of file grst_x509.c.
References fclose(), fopen, fp, free(), GRST_KEYSIZE, GRST_RET_FAILED, GRSThttpUrlEncode(), malloc(), mkdir_printf(), NULL, ptr, S_IRUSR, S_IWUSR, S_IXUSR, size_t, and sprintf().
int GRSTx509NameCmp | ( | char * | a, | |
char * | b | |||
) |
Compare X509 Distinguished Name strings.
This function attempts to do with string representations what would ideally be done with OIDs/values. In particular, we equate "/Email=" == "/emailAddress=" to deal with this important change between OpenSSL 0.9.6 and 0.9.7. Other than that, it is currently the same as ordinary strcasecmp(3) (for consistency with EDG/LCG/EGEE gridmapdir case insensitivity.)
Definition at line 82 of file grst_x509.c.
References free(), memmove, NULL, p, and strcasecmp.
Referenced by GRSTx509ChainVomsAdd(), and GRSTx509ParseVomsExt().
int GRSTx509ProxyDestroy | ( | char * | proxydir, | |
char * | delegation_id, | |||
char * | user_dn | |||
) |
Destroy stored GSI proxy files.
Returns GRST_RET_OK on success, non-zero otherwise. (Including GRST_RET_NO_SUCH_FILE if the private key or cert chain were not found.)
Definition at line 1824 of file grst_x509.c.
References GRST_RET_FAILED, GRST_RET_NO_SUCH_FILE, GRST_RET_OK, GRSThttpUrlEncode(), sprintf(), and unlink.
int GRSTx509ProxyGetTimes | ( | char * | proxydir, | |
char * | delegation_id, | |||
char * | user_dn, | |||
time_t * | start, | |||
time_t * | finish | |||
) |
Get start and finish validity times of stored GSI proxy file.
Returns GRST_RET_OK on success, non-zero otherwise. (Including GRST_RET_NO_SUCH_FILE if the cert chain was not found.)
Definition at line 1855 of file grst_x509.c.
References fclose(), fopen, fp, free(), GRST_RET_FAILED, GRST_RET_NO_SUCH_FILE, GRST_RET_OK, GRSTasn1TimeToTimeT(), GRSThttpUrlEncode(), NULL, and sprintf().
int GRSTx509StringToChain | ( | STACK_OF(X509)** | certstack, | |
char * | certstring | |||
) |
Create a stack of X509 certificate from a PEM-encoded string.
Creates a dynamically allocated stack of X509 certificate objects by walking through the PEM-encoded X509 certificates.
Returns GRST_RET_OK on success, non-zero otherwise.
Definition at line 1893 of file grst_x509.c.
References GRST_RET_FAILED, GRST_RET_OK, and NULL.
Referenced by GRSTx509CacheProxy().
int GRSTx509VerifyCallback | ( | int | , | |
X509_STORE_CTX * | ||||
) |
Example VerifyCallback routine.
Definition at line 972 of file grst_x509.c.
References FALSE, GRST_RET_OK, GRSTx509CheckChain(), GRSTx509KnownCriticalExts(), TRUE, and X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION.
void(*) GRSTerrorLogFunc(char *, int, int, char *,...) |