File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+ # Allow using strings to represent CURLOPT_HTTPAUTH values when
3+ # generating corpus files. The original defines live in curl.h.
4+
5+ from enum import Enum
6+
7+ class CurlOptHttpAuth (Enum ):
8+ #define CURLAUTH_NONE ((unsigned long)0)
9+ CURLAUTH_NONE = 0
10+ #define CURLAUTH_BASIC (((unsigned long)1)<<0)
11+ CURLAUTH_BASIC = 1
12+ #define CURLAUTH_DIGEST (((unsigned long)1)<<1)
13+ CURLAUTH_DIGEST = 2
14+ #define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2)
15+ CURLAUTH_NEGOTIATE = 4
16+ #define CURLAUTH_NTLM (((unsigned long)1)<<3)
17+ CURLAUTH_NTLM = 8
18+ #define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4)
19+ CURLAUTH_DIGEST_IE = 16
20+ #define CURLAUTH_NTLM_WB (((unsigned long)1)<<5)
21+ CURLAUTH_NTLM_WB = 32
22+ #define CURLAUTH_BEARER (((unsigned long)1)<<6)
23+ CURLAUTH_BEARER = 64
24+ #define CURLAUTH_AWS_SIGV4 (((unsigned long)1)<<7)
25+ CURLAUTH_AWS_SIGV4 = 128
26+ #define CURLAUTH_ONLY (((unsigned long)1)<<31)
27+ CURLAUTH_ONLY = 2147483648
28+ #define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)
29+ CURLAUTH_ANY = 4294967279
30+ #define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
31+ CURLAUTH_ANYSAFE = 4294967278
You can’t perform that action at this time.
0 commit comments