mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-21 08:39:46 +08:00
eb3d9eb0c9
Primary changes: * Add an improved cache system to speed up performance. * Fix NCZarr to properly handle scalar variables. Misc. Related Changes: * Added unit tests for extendible hash and for the generic cache. * Add config parameter to set size of the NCZarr cache. * Add initial performance tests but leave them unused. * Add CRC64 support. * Move location of ncdumpchunks utility from /ncgen to /ncdump. * Refactor auth support. Misc. Unrelated Changes: * More cleanup of the S3 support * Add support for S3 authentication in .rc files: HTTP.S3.ACCESSID and HTTP.S3.SECRETKEY. * Remove the hashkey from the struct OBJHDR since it is never used.
64 lines
1.9 KiB
C
64 lines
1.9 KiB
C
/*
|
|
Copyright (c) 1998-2018 University Corporation for Atmospheric Research/Unidata
|
|
See COPYRIGHT for license information.
|
|
*/
|
|
|
|
/*
|
|
Common authorization tracking.
|
|
Currently for DAP2 and DAP4 protocols.
|
|
Every curl connection will need a copy of this.
|
|
*/
|
|
|
|
#ifndef NCAUTH_H
|
|
#define NCAUTH_H
|
|
|
|
/* Need these support includes */
|
|
#include "ncrc.h"
|
|
|
|
typedef struct NCauth {
|
|
struct curlflags {
|
|
int proto_https; /* is https: supported? */
|
|
int compress; /*CURLOPT_ENCODING*/
|
|
int verbose; /*CURLOPT_ENCODING*/
|
|
int timeout; /*CURLOPT_TIMEOUT*/
|
|
int connecttimeout; /*CURLOPT_CONNECTTIMEOUT*/
|
|
int maxredirs; /*CURLOPT_MAXREDIRS*/
|
|
char* useragent; /*CURLOPT_USERAGENT*/
|
|
int cookiejarcreated;
|
|
char* cookiejar; /*CURLOPT_COOKIEJAR,CURLOPT_COOKIEFILE*/
|
|
char* netrc; /*CURLOPT_NETRC,CURLOPT_NETRC_FILE*/
|
|
} curlflags;
|
|
struct ssl {
|
|
int verifypeer; /* CURLOPT_SSL_VERIFYPEER;
|
|
do not do this when cert might be self-signed
|
|
or temporarily incorrect */
|
|
int verifyhost; /* CURLOPT_SSL_VERIFYHOST; for client-side verification */
|
|
char* certificate; /*CURLOPT_SSLCERT*/
|
|
char* key; /*CURLOPT_SSLKEY*/
|
|
char* keypasswd; /*CURLOPT_SSLKEYPASSWD*/
|
|
char* cainfo; /* CURLOPT_CAINFO; certificate authority */
|
|
char* capath; /*CURLOPT_CAPATH*/
|
|
} ssl;
|
|
struct proxy {
|
|
char *host; /*CURLOPT_PROXY*/
|
|
int port; /*CURLOPT_PROXYPORT*/
|
|
char* user; /*CURLOPT_PROXYUSERNAME*/
|
|
char* pwd; /*CURLOPT_PROXYPASSWORD*/
|
|
} proxy;
|
|
struct credentials {
|
|
char *user; /*CURLOPT_USERNAME*/
|
|
char *pwd; /*CURLOPT_PASSWORD*/
|
|
} creds;
|
|
struct s3credentials {
|
|
char *accessid;
|
|
char *secretkey;
|
|
} s3creds;
|
|
} NCauth;
|
|
|
|
extern int NC_authsetup(NCauth**, NCURI*);
|
|
extern void NC_authfree(NCauth*);
|
|
extern char* NC_combinehostport(NCURI*);
|
|
extern int NC_parsecredentials(const char* userpwd, char** userp, char** pwdp);
|
|
|
|
#endif /*NCAUTH_H*/
|