9 #include <openssl/ssl.h>
10 #include <openssl/x509.h>
11 #include <openssl/x509v3.h>
12 #include <openssl/md5.h>
13 #include <openssl/err.h>
14 #include <openssl/pem.h>
15 #include <openssl/rand.h>
16 #include <openssl/des.h>
27 #if !defined(EVP_MD_CTX_FLAG_CLEANED)
28 #define EVP_MD_CTX_init(ctx)
29 #define EVP_MD_CTX_cleanup(ctx)
30 #define X509V3_set_nconf X509V3_set_conf_lhash
31 #define X509V3_EXT_add_nconf X509V3_EXT_add_conf
34 struct _ssl_credentials;
35 typedef struct _ssl_credentials SSL_CREDENTIALS;
37 struct _ssl_proxy_restrictions;
38 typedef struct _ssl_proxy_restrictions SSL_PROXY_RESTRICTIONS;
52 void ssl_credentials_destroy(SSL_CREDENTIALS *creds);
61 int ssl_proxy_file_destroy(
const char *path);
71 int ssl_certificate_load_from_file(SSL_CREDENTIALS *creds,
82 int ssl_certificate_push(SSL_CREDENTIALS *creds,
99 int ssl_private_key_load_from_file(SSL_CREDENTIALS *creds,
101 const char *pass_phrase,
102 const char *pass_phrase_prompt);
109 int ssl_private_key_store_to_file(SSL_CREDENTIALS *creds,
111 const char *pass_phrase);
119 int ssl_private_key_is_encrypted(
const char *path);
129 int ssl_proxy_from_pem(SSL_CREDENTIALS *creds,
130 const unsigned char *buffer,
132 const char *pass_phrase);
144 int ssl_proxy_load_from_file(SSL_CREDENTIALS *creds,
146 const char *pass_phrase);
156 int ssl_proxy_to_pem(SSL_CREDENTIALS *creds,
157 unsigned char **pbuffer,
159 const char *pass_phrase);
171 int ssl_proxy_store_to_file(SSL_CREDENTIALS *creds,
173 const char *pass_phrase);
182 SSL_CREDENTIALS *ssl_credentials_new();
194 int ssl_certreq_pem_to_der(
char *certreq,
195 unsigned char **buffer,
int *buffer_length);
224 int ssl_proxy_delegation_init(SSL_CREDENTIALS **new_creds,
225 unsigned char **buffer,
228 void (*callback)(
int,
int,
void *));
246 int ssl_proxy_delegation_finalize(SSL_CREDENTIALS *creds,
247 unsigned char *buffer,
276 int ssl_proxy_delegation_sign(SSL_CREDENTIALS *creds,
277 SSL_PROXY_RESTRICTIONS *restrictions,
278 unsigned char *request_buffer,
279 int request_buffer_length,
280 unsigned char **proxy_buffer,
281 int *proxy_buffer_length);
288 void ssl_free_buffer(
unsigned char *buffer);
298 SSL_PROXY_RESTRICTIONS *ssl_proxy_restrictions_new();
306 void ssl_proxy_restrictions_destroy(SSL_PROXY_RESTRICTIONS *restrictions);
317 int ssl_proxy_restrictions_set_lifetime(SSL_PROXY_RESTRICTIONS *restrictions,
329 int ssl_proxy_restrictions_set_limited(SSL_PROXY_RESTRICTIONS *restrictions,
340 ssl_get_base_subject_file(
const char *proxyfile,
char **subject);
349 ssl_get_base_subject(SSL_CREDENTIALS *creds,
char **subject);
359 int ssl_creds_to_buffer(SSL_CREDENTIALS *chain,
unsigned char **buffer,
370 int ssl_creds_from_buffer(
unsigned char *buffer,
int buffer_length,
371 SSL_CREDENTIALS **creds);
380 int ssl_creds_certificate_is_proxy(SSL_CREDENTIALS *creds);
389 int ssl_sign(
unsigned char *data,
int length, SSL_CREDENTIALS *creds,
390 unsigned char **signature,
int *signature_len,
const EVP_MD *md);
397 int ssl_verify(
unsigned char *data,
int length, SSL_CREDENTIALS *creds,
398 unsigned char *signature,
int signature_len,
const EVP_MD *md);
407 int ssl_verify_gsi_chain(SSL_CREDENTIALS *chain);
415 int ssl_limited_proxy_chain(SSL_CREDENTIALS *chain);
423 int ssl_limited_proxy_file(
const char path[]);
429 int ssl_get_times(
const char *proxyfile, time_t *not_before, time_t *not_after);
436 void ssl_error_to_verror();
454 int ssl_verify_cred(
const char path[]);
Globus GSI Credential Library.
Globus GSI Cert Utils Library.
Globus GSI System Config Library.
Globus GSI System Config Library.
uint32_t globus_result_t
Definition: globus_types.h:99