Artifactspublic-v0

curl

master
ply4 git calls36 ms288 KiB3 cachedprotocol v2
119 lines4.4 KiBRaw
1#ifndef HEADER_CURL_X509ASN1_H
2#define HEADER_CURL_X509ASN1_H
4/***************************************************************************
5 * _ _ ____ _
6 * Project ___| | | | _ \| |
7 * / __| | | | |_) | |
8 * | (__| |_| | _ <| |___
9 * \___|\___/|_| \_\_____|
10 *
11 * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
12 *
13 * This software is licensed as described in the file COPYING, which
14 * you should have received as part of this distribution. The terms
15 * are also available at https://curl.se/docs/copyright.html.
16 *
17 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
18 * copies of the Software, and permit persons to whom the Software is
19 * furnished to do so, under the terms of the COPYING file.
20 *
21 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
22 * KIND, either express or implied.
23 *
24 * SPDX-License-Identifier: curl
25 *
26 ***************************************************************************/
27#include "curl_setup.h"
29/* forward-declare to make it visible in all builds */
30struct Curl_asn1Element;
32#if defined(USE_GNUTLS) || defined(USE_WOLFSSL) || defined(USE_SCHANNEL) || \
33 defined(USE_MBEDTLS) || defined(USE_RUSTLS)
35#include "cfilters.h"
36#include "urldata.h"
38/* ASN.1 classes. */
39/* #define CURL_ASN1_UNIVERSAL 0 */
40/* #define CURL_ASN1_APPLICATION 1 */
41/* #define CURL_ASN1_CONTEXT_SPECIFIC 2 */
42/* #define CURL_ASN1_PRIVATE 3 */
44/* ASN.1 types. */
45#define CURL_ASN1_BOOLEAN 1
46#define CURL_ASN1_INTEGER 2
47#define CURL_ASN1_BIT_STRING 3
48#define CURL_ASN1_OCTET_STRING 4
49#define CURL_ASN1_NULL 5
50#define CURL_ASN1_OBJECT_IDENTIFIER 6
51/* #define CURL_ASN1_OBJECT_DESCRIPTOR 7 */
52/* #define CURL_ASN1_INSTANCE_OF 8 */
53/* #define CURL_ASN1_REAL 9 */
54#define CURL_ASN1_ENUMERATED 10
55/* #define CURL_ASN1_EMBEDDED 11 */
56#define CURL_ASN1_UTF8_STRING 12
57/* #define CURL_ASN1_RELATIVE_OID 13 */
58/* #define CURL_ASN1_SEQUENCE 16 */
59/* #define CURL_ASN1_SET 17 */
60#define CURL_ASN1_NUMERIC_STRING 18
61#define CURL_ASN1_PRINTABLE_STRING 19
62#define CURL_ASN1_TELETEX_STRING 20
63/* #define CURL_ASN1_VIDEOTEX_STRING 21 */
64#define CURL_ASN1_IA5_STRING 22
65#define CURL_ASN1_UTC_TIME 23
66#define CURL_ASN1_GENERALIZED_TIME 24
67/* #define CURL_ASN1_GRAPHIC_STRING 25 */
68#define CURL_ASN1_VISIBLE_STRING 26
69/* #define CURL_ASN1_GENERAL_STRING 27 */
70#define CURL_ASN1_UNIVERSAL_STRING 28
71/* #define CURL_ASN1_CHARACTER_STRING 29 */
72#define CURL_ASN1_BMP_STRING 30
74/*
75 * Types.
76 */
78/* ASN.1 parsed element. */
79struct Curl_asn1Element {
80 const uint8_t *header; /* Pointer to header byte. */
81 const uint8_t *beg; /* Pointer to element data. */
82 const uint8_t *end; /* Pointer to 1st byte after element. */
83 uint8_t eclass; /* ASN.1 element class. */
84 uint8_t tag; /* ASN.1 element tag. */
85 BIT(constructed); /* Element is constructed. */
86};
88/* X509 certificate: RFC 5280. */
89struct Curl_X509certificate {
90 struct Curl_asn1Element certificate;
91 struct Curl_asn1Element version;
92 struct Curl_asn1Element serialNumber;
93 struct Curl_asn1Element signatureAlgorithm;
94 struct Curl_asn1Element signature;
95 struct Curl_asn1Element issuer;
96 struct Curl_asn1Element notBefore;
97 struct Curl_asn1Element notAfter;
98 struct Curl_asn1Element subject;
99 struct Curl_asn1Element subjectPublicKeyInfo;
100 struct Curl_asn1Element subjectPublicKeyAlgorithm;
101 struct Curl_asn1Element subjectPublicKey;
102 struct Curl_asn1Element issuerUniqueID;
103 struct Curl_asn1Element subjectUniqueID;
104 struct Curl_asn1Element extensions;
105};
107/*
108 * Prototypes.
109 */
111int Curl_parseX509(struct Curl_X509certificate *cert,
112 const uint8_t *beg, const uint8_t *end);
113CURLcode Curl_extract_certinfo(struct Curl_easy *data, int certnum,
114 const uint8_t *beg, const uint8_t *end);
115CURLcode Curl_verifyhost(struct Curl_cfilter *cf, struct Curl_easy *data,
116 const uint8_t *beg, const uint8_t *end);
117#endif /* USE_GNUTLS || USE_WOLFSSL || USE_SCHANNEL || USE_MBEDTLS ||
118 USE_RUSTLS */
119#endif /* HEADER_CURL_X509ASN1_H */
Diagnostics4 git calls · 36 ms
CallStatusSizeTime036 ms
discover200152 B3 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B · hit3 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=3
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=30
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2001.6 KiB · hit30 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=1598
git.response.cache=HIT
git.response.duration_ms=30
git.fetch.wants=cf97fffba63fc07658547ed22137d0c8c443c877
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=1598
git.pkt.payload.max=1577
git.sideband.band1.bytes=1576
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e39ff188d4689d
Request
ed5aae2b…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format