Apache2
ssl_ct_sct.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef SSL_CT_SCT_H
18 #define SSL_CT_SCT_H
19 
20 #include "apr_pools.h"
21 #include "apr_tables.h"
22 
23 #include "httpd.h"
24 #include "mod_ssl.h"
25 
26 #include "ssl_ct_log_config.h"
27 
28 #define LOG_ID_SIZE 32
29 
30 typedef struct cert_chain {
32  apr_array_header_t *cert_arr; /* array of X509 * */
33  X509 *leaf;
35 
36 typedef struct {
37  unsigned char version;
38  unsigned char logid[LOG_ID_SIZE];
41  char timestr[APR_RFC822_DATE_LEN];
42  const unsigned char *extensions;
44  unsigned char hash_alg;
45  unsigned char sig_alg;
47  const unsigned char *sig;
48  const unsigned char *signed_data;
50 } sct_fields_t;
51 
52 apr_status_t sct_parse(const char *source,
53  server_rec *s, const unsigned char *sct,
54  apr_size_t len, cert_chain *cc,
55  sct_fields_t *fields);
56 
58 
60  apr_array_header_t *log_config);
61 
63 
64 #endif /* SSL_CT_SCT_H */
APR memory allocation.
APR Table library.
const char * s
Definition: mod_dav.h:1327
int apr_status_t
Definition: apr_errno.h:44
unsigned short apr_uint16_t
Definition: apr.h:345
size_t apr_size_t
Definition: apr.h:394
uint64_t apr_uint64_t
Definition: apr.h:387
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
#define APR_RFC822_DATE_LEN
Definition: apr_time.h:186
apr_int64_t apr_time_t
Definition: apr_time.h:45
HTTP Daemon routines.
SSL extension module for Apache.
apr_status_t sct_verify_signature(conn_rec *c, sct_fields_t *sctf, apr_array_header_t *log_config)
apr_status_t sct_verify_timestamp(conn_rec *c, sct_fields_t *sctf)
void sct_release(sct_fields_t *sctf)
struct cert_chain cert_chain
apr_status_t sct_parse(const char *source, server_rec *s, const unsigned char *sct, apr_size_t len, cert_chain *cc, sct_fields_t *fields)
#define LOG_ID_SIZE
Definition: ssl_ct_sct.h:28
Definition: apr_tables.h:62
Definition: ssl_ct_sct.h:30
apr_pool_t * p
Definition: ssl_ct_sct.h:31
X509 * leaf
Definition: ssl_ct_sct.h:33
apr_array_header_t * cert_arr
Definition: ssl_ct_sct.h:32
Structure to store things which are per connection.
Definition: httpd.h:1193
Definition: ssl_ct_sct.h:36
const unsigned char * sig
Definition: ssl_ct_sct.h:47
const unsigned char * signed_data
Definition: ssl_ct_sct.h:48
apr_time_t time
Definition: ssl_ct_sct.h:40
const unsigned char * extensions
Definition: ssl_ct_sct.h:42
apr_size_t signed_data_len
Definition: ssl_ct_sct.h:49
apr_uint16_t siglen
Definition: ssl_ct_sct.h:46
unsigned char sig_alg
Definition: ssl_ct_sct.h:45
apr_uint64_t timestamp
Definition: ssl_ct_sct.h:39
unsigned char hash_alg
Definition: ssl_ct_sct.h:44
unsigned char version
Definition: ssl_ct_sct.h:37
apr_uint16_t extlen
Definition: ssl_ct_sct.h:43
A structure to store information for each virtual server.
Definition: httpd.h:1382