Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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;
34 } cert_chain;
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 
57 void sct_release(sct_fields_t *sctf);
58 
60  apr_array_header_t *log_config);
61 
63 
64 #endif /* SSL_CT_SCT_H */
apr_uint16_t extlen
Definition: ssl_ct_sct.h:43
size_t apr_size_t
Definition: apr.h:375
#define LOG_ID_SIZE
Definition: ssl_ct_sct.h:28
apr_status_t sct_verify_signature(conn_rec *c, sct_fields_t *sctf, apr_array_header_t *log_config)
struct cert_chain cert_chain
Definition: apr_tables.h:62
apr_uint64_t timestamp
Definition: ssl_ct_sct.h:39
apr_uint16_t siglen
Definition: ssl_ct_sct.h:46
Definition: ssl_ct_sct.h:36
apr_time_t time
Definition: ssl_ct_sct.h:40
void sct_release(sct_fields_t *sctf)
Structure to store things which are per connection.
Definition: httpd.h:1124
const unsigned char * signed_data
Definition: ssl_ct_sct.h:48
unsigned short apr_uint16_t
Definition: apr.h:331
apr_int64_t apr_time_t
Definition: apr_time.h:45
APR memory allocation.
apr_pool_t * p
Definition: ssl_ct_sct.h:31
HTTP Daemon routines.
A structure to store information for each virtual server.
Definition: httpd.h:1311
#define APR_RFC822_DATE_LEN
Definition: apr_time.h:186
APR Table library.
apr_status_t sct_verify_timestamp(conn_rec *c, sct_fields_t *sctf)
apr_size_t signed_data_len
Definition: ssl_ct_sct.h:49
Definition: ssl_ct_sct.h:30
unsigned char hash_alg
Definition: ssl_ct_sct.h:44
SSL extension module for Apache.
apr_array_header_t * cert_arr
Definition: ssl_ct_sct.h:32
unsigned long apr_uint64_t
Definition: apr.h:372
unsigned char version
Definition: ssl_ct_sct.h:37
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)
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
int apr_status_t
Definition: apr_errno.h:44
unsigned char sig_alg
Definition: ssl_ct_sct.h:45
const unsigned char * sig
Definition: ssl_ct_sct.h:47
const unsigned char * extensions
Definition: ssl_ct_sct.h:42
X509 * leaf
Definition: ssl_ct_sct.h:33