tls_select.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _TLS_SELECT_H_
00024 #define _TLS_SELECT_H_
00025
00026 #include <openssl/ssl.h>
00027
00028 #include "../../parser/msg_parser.h"
00029 #include "../../pvar.h"
00030
00031 enum {
00032 CERT_LOCAL = 1<<0,
00033 CERT_PEER = 1<<1,
00034 CERT_SUBJECT = 1<<2,
00035 CERT_ISSUER = 1<<3,
00036
00037 CERT_VERIFIED = 1<<4,
00038 CERT_REVOKED = 1<<5,
00039 CERT_EXPIRED = 1<<6,
00040 CERT_SELFSIGNED = 1<<7,
00041 CERT_NOTBEFORE = 1<<8,
00042 CERT_NOTAFTER = 1<<9,
00043
00044 COMP_CN = 1<<10,
00045 COMP_O = 1<<11,
00046 COMP_OU = 1<<12,
00047 COMP_C = 1<<13,
00048 COMP_ST = 1<<14,
00049 COMP_L = 1<<15,
00050
00051 COMP_HOST = 1<<16,
00052 COMP_URI = 1<<17,
00053 COMP_E = 1<<18,
00054 COMP_IP = 1<<19,
00055
00056 TLSEXT_SNI = 1<<20,
00057 };
00058
00059
00060 typedef int select_t;
00061
00062 int tlsops_cipher(struct sip_msg *msg, pv_param_t *param,
00063 pv_value_t *res);
00064
00065 int tlsops_bits(struct sip_msg *msg, pv_param_t *param,
00066 pv_value_t *res);
00067
00068 int tlsops_version(struct sip_msg *msg, pv_param_t *param,
00069 pv_value_t *res);
00070
00071 int tlsops_desc(struct sip_msg *msg, pv_param_t *param,
00072 pv_value_t *res);
00073
00074 int tlsops_cert_version(struct sip_msg *msg, pv_param_t *param,
00075 pv_value_t *res);
00076
00077
00078
00079
00080
00081 int tlsops_check_cert(struct sip_msg *msg, pv_param_t *param,
00082 pv_value_t *res);
00083
00084 int tlsops_validity(struct sip_msg *msg, pv_param_t *param,
00085 pv_value_t *res);
00086
00087 int tlsops_sn(struct sip_msg *msg, pv_param_t *param,
00088 pv_value_t *res);
00089
00090 int tlsops_comp(struct sip_msg *msg, pv_param_t *param,
00091 pv_value_t *res);
00092
00093 int tlsops_alt(struct sip_msg *msg, pv_param_t *param,
00094 pv_value_t *res);
00095
00096 int tlsops_tlsext(struct sip_msg *msg, pv_param_t *param,
00097 pv_value_t *res);
00098
00099 #endif