Data Structures | Namespaces | Defines | Typedefs | Enumerations | Functions | Variables

P_SSLUtils.h File Reference

#include "ink_config.h"
#include "Diags.h"
#include <openssl/opensslconf.h>
#include <openssl/ssl.h>
Include dependency graph for P_SSLUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ssl::detail::SCOPED_X509_TRAITS
struct  ssl::detail::SCOPED_BIO_TRAITS

Namespaces

namespace  ssl
namespace  ssl::detail

Defines

#define OPENSSL_THREAD_DEFINES
#define SSL_INCREMENT_DYN_STAT(x)   RecIncrRawStat(ssl_rsb, NULL, (int) x, 1)
#define SSL_DECREMENT_DYN_STAT(x)   RecIncrRawStat(ssl_rsb, NULL, (int) x, -1)
#define SSL_SET_COUNT_DYN_STAT(x, count)   RecSetRawStatCount(ssl_rsb, x, count)
#define SSL_INCREMENT_DYN_STAT_EX(x, y)   RecIncrRawStat(ssl_rsb, NULL, (int) x, y)
#define SSL_CLEAR_DYN_STAT(x)
#define SSLError(fmt,...)   SSLDiagnostic(DiagsMakeLocation(), false, NULL, fmt, ##__VA_ARGS__)
#define SSLErrorVC(vc, fmt,...)   SSLDiagnostic(DiagsMakeLocation(), false, vc, fmt, ##__VA_ARGS__)
#define SSLDebug(fmt,...)   SSLDiagnostic(DiagsMakeLocation(), true, NULL, fmt, ##__VA_ARGS__)
#define SSLDebugVC(vc, fmt,...)   SSLDiagnostic(DiagsMakeLocation(), true, vc, fmt, ##__VA_ARGS__)

Typedefs

typedef ats_scoped_resource
< ssl::detail::SCOPED_X509_TRAITS
scoped_X509
typedef ats_scoped_resource
< ssl::detail::SCOPED_BIO_TRAITS
scoped_BIO

Enumerations

enum  SSL_Stats {
  ssl_origin_server_expired_cert_stat, ssl_user_agent_expired_cert_stat, ssl_origin_server_revoked_cert_stat, ssl_user_agent_revoked_cert_stat,
  ssl_origin_server_unknown_cert_stat, ssl_user_agent_unknown_cert_stat, ssl_origin_server_cert_verify_failed_stat, ssl_user_agent_cert_verify_failed_stat,
  ssl_origin_server_bad_cert_stat, ssl_user_agent_bad_cert_stat, ssl_origin_server_decryption_failed_stat, ssl_user_agent_decryption_failed_stat,
  ssl_origin_server_wrong_version_stat, ssl_user_agent_wrong_version_stat, ssl_origin_server_other_errors_stat, ssl_user_agent_other_errors_stat,
  ssl_origin_server_unknown_ca_stat, ssl_user_agent_unknown_ca_stat, ssl_user_agent_sessions_stat, ssl_user_agent_session_hit_stat,
  ssl_user_agent_session_miss_stat, ssl_user_agent_session_timeout_stat, ssl_total_handshake_time_stat, ssl_total_success_handshake_count_stat,
  ssl_total_tickets_created_stat, ssl_total_tickets_verified_stat, ssl_total_tickets_not_found_stat, ssl_total_tickets_renewed_stat,
  ssl_error_want_write, ssl_error_want_read, ssl_error_want_x509_lookup, ssl_error_syscall,
  ssl_error_read_eos, ssl_error_zero_return, ssl_error_ssl, ssl_sni_name_set_failure,
  ssl_cipher_stats_start = 100, ssl_cipher_stats_end = 300, Ssl_Stat_Count
}

Functions

SSL_CTX * SSLDefaultServerContext ()
SSL_CTX * SSLInitClientContext (const SSLConfigParams *param)
void SSLInitializeLibrary ()
void SSLInitializeStatistics ()
void SSLReleaseContext (SSL_CTX *ctx)
void SSLDiagnostic (const SrcLoc &loc, bool debug, SSLNetVConnection *vc, const char *fmt,...) TS_PRINTFLIKE(4
void const char * SSLErrorName (int ssl_error)
void SSLDebugBufferPrint (const char *tag, const char *buffer, unsigned buflen, const char *message)
bool SSLParseCertificateConfiguration (const SSLConfigParams *params, SSLCertLookup *lookup)

Variables

RecRawStatBlockssl_rsb

Detailed Description

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file P_SSLUtils.h.


Define Documentation

#define OPENSSL_THREAD_DEFINES

Definition at line 28 of file P_SSLUtils.h.

#define SSL_CLEAR_DYN_STAT (   x  ) 
Value:
do { \
    RecSetRawStatSum(ssl_rsb, (x), 0); \
    RecSetRawStatCount(ssl_rsb, (x), 0); \
  } while (0);

Definition at line 95 of file P_SSLUtils.h.

Referenced by SSLInitializeStatistics().

#define SSL_DECREMENT_DYN_STAT (   x  )     RecIncrRawStat(ssl_rsb, NULL, (int) x, -1)

Definition at line 92 of file P_SSLUtils.h.

#define SSL_INCREMENT_DYN_STAT (   x  )     RecIncrRawStat(ssl_rsb, NULL, (int) x, 1)
#define SSL_INCREMENT_DYN_STAT_EX (   x,
  y 
)    RecIncrRawStat(ssl_rsb, NULL, (int) x, y)

Definition at line 94 of file P_SSLUtils.h.

Referenced by SSLNetVConnection::sslServerHandShakeEvent().

#define SSL_SET_COUNT_DYN_STAT (   x,
  count 
)    RecSetRawStatCount(ssl_rsb, x, count)

Definition at line 93 of file P_SSLUtils.h.

Referenced by SSLRecRawStatSyncCount().

#define SSLDebug (   fmt,
  ... 
)    SSLDiagnostic(DiagsMakeLocation(), true, NULL, fmt, ##__VA_ARGS__)

Definition at line 120 of file P_SSLUtils.h.

Referenced by SSLNetProcessor::start().

#define SSLDebugVC (   vc,
  fmt,
  ... 
)    SSLDiagnostic(DiagsMakeLocation(), true, vc, fmt, ##__VA_ARGS__)

Definition at line 121 of file P_SSLUtils.h.

Referenced by SSLNetVConnection::sslServerHandShakeEvent().

#define SSLError (   fmt,
  ... 
)    SSLDiagnostic(DiagsMakeLocation(), false, NULL, fmt, ##__VA_ARGS__)
#define SSLErrorVC (   vc,
  fmt,
  ... 
)    SSLDiagnostic(DiagsMakeLocation(), false, vc, fmt, ##__VA_ARGS__)

Definition at line 118 of file P_SSLUtils.h.

Referenced by SSLNetVConnection::sslStartHandShake().


Typedef Documentation

typedef ats_scoped_resource<ssl::detail::SCOPED_BIO_TRAITS> scoped_BIO

Definition at line 151 of file P_SSLUtils.h.

typedef ats_scoped_resource<ssl::detail::SCOPED_X509_TRAITS> scoped_X509

Definition at line 150 of file P_SSLUtils.h.


Enumeration Type Documentation

enum SSL_Stats
Enumerator:
ssl_origin_server_expired_cert_stat 
ssl_user_agent_expired_cert_stat 
ssl_origin_server_revoked_cert_stat 
ssl_user_agent_revoked_cert_stat 
ssl_origin_server_unknown_cert_stat 
ssl_user_agent_unknown_cert_stat 
ssl_origin_server_cert_verify_failed_stat 
ssl_user_agent_cert_verify_failed_stat 
ssl_origin_server_bad_cert_stat 
ssl_user_agent_bad_cert_stat 
ssl_origin_server_decryption_failed_stat 
ssl_user_agent_decryption_failed_stat 
ssl_origin_server_wrong_version_stat 
ssl_user_agent_wrong_version_stat 
ssl_origin_server_other_errors_stat 
ssl_user_agent_other_errors_stat 
ssl_origin_server_unknown_ca_stat 
ssl_user_agent_unknown_ca_stat 
ssl_user_agent_sessions_stat 
ssl_user_agent_session_hit_stat 
ssl_user_agent_session_miss_stat 
ssl_user_agent_session_timeout_stat 
ssl_total_handshake_time_stat 
ssl_total_success_handshake_count_stat 
ssl_total_tickets_created_stat 
ssl_total_tickets_verified_stat 
ssl_total_tickets_not_found_stat 
ssl_total_tickets_renewed_stat 
ssl_error_want_write 
ssl_error_want_read 
ssl_error_want_x509_lookup 
ssl_error_syscall 
ssl_error_read_eos 
ssl_error_zero_return 
ssl_error_ssl 
ssl_sni_name_set_failure 
ssl_cipher_stats_start 
ssl_cipher_stats_end 
Ssl_Stat_Count 

Definition at line 41 of file P_SSLUtils.h.


Function Documentation

void SSLDebugBufferPrint ( const char *  tag,
const char *  buffer,
unsigned  buflen,
const char *  message 
)

Definition at line 885 of file SSLUtils.cc.

References is_debug_tag_set.

Referenced by ssl_read_from_net().

SSL_CTX* SSLDefaultServerContext (  ) 

Definition at line 899 of file SSLUtils.cc.

Referenced by SSLInitializeStatistics(), and SSLInitServerContext().

void SSLDiagnostic ( const SrcLoc loc,
bool  debug,
SSLNetVConnection vc,
const char *  fmt,
  ... 
)
void const char* SSLErrorName ( int  ssl_error  ) 

Definition at line 863 of file SSLUtils.cc.

References countof.

Referenced by SSLNetVConnection::sslServerHandShakeEvent().

SSL_CTX* SSLInitClientContext ( const SSLConfigParams param  ) 
void SSLInitializeLibrary (  ) 
void SSLInitializeStatistics (  ) 

Definition at line 540 of file SSLUtils.cc.

References Debug, ink_assert, ink_hash_table_create(), ink_hash_table_insert(), ink_hash_table_isbound(), InkHashTableKeyType_Word, RecAllocateRawStatBlock(), RECD_INT, RECP_NON_PERSISTENT, RECP_PERSISTENT, RecRawStatSyncCount(), RecRawStatSyncSum(), RecRegisterRawStat, RECT_PROCESS, ssl_cipher_name_table, ssl_cipher_stats_end, ssl_cipher_stats_start, SSL_CLEAR_DYN_STAT, ssl_error_read_eos, ssl_error_ssl, ssl_error_syscall, ssl_error_want_read, ssl_error_want_write, ssl_error_want_x509_lookup, ssl_error_zero_return, ssl_origin_server_bad_cert_stat, ssl_origin_server_cert_verify_failed_stat, ssl_origin_server_decryption_failed_stat, ssl_origin_server_expired_cert_stat, ssl_origin_server_other_errors_stat, ssl_origin_server_revoked_cert_stat, ssl_origin_server_unknown_ca_stat, ssl_origin_server_unknown_cert_stat, ssl_origin_server_wrong_version_stat, ssl_sni_name_set_failure, Ssl_Stat_Count, ssl_total_handshake_time_stat, ssl_total_success_handshake_count_stat, ssl_total_tickets_created_stat, ssl_total_tickets_not_found_stat, ssl_total_tickets_renewed_stat, ssl_total_tickets_verified_stat, ssl_user_agent_bad_cert_stat, ssl_user_agent_cert_verify_failed_stat, ssl_user_agent_decryption_failed_stat, ssl_user_agent_expired_cert_stat, ssl_user_agent_other_errors_stat, ssl_user_agent_revoked_cert_stat, ssl_user_agent_session_hit_stat, ssl_user_agent_session_miss_stat, ssl_user_agent_session_timeout_stat, ssl_user_agent_sessions_stat, ssl_user_agent_unknown_ca_stat, ssl_user_agent_unknown_cert_stat, ssl_user_agent_wrong_version_stat, SSLDefaultServerContext(), SSLError, and SSLRecRawStatSyncCount().

Referenced by SSLNetProcessor::start().

bool SSLParseCertificateConfiguration ( const SSLConfigParams params,
SSLCertLookup lookup 
)
void SSLReleaseContext ( SSL_CTX *  ctx  ) 

Definition at line 1596 of file SSLUtils.cc.

Referenced by SSLContextStorage::~SSLContextStorage().


Variable Documentation

Definition at line 120 of file SSLUtils.cc.