#ifndef OPENSSL_NO_SRTP
-static SRTP_PROTECTION_PROFILE srtp_known_profiles[] = {
+static const SRTP_PROTECTION_PROFILE srtp_known_profiles[] = {
{
"SRTP_AES128_CM_SHA1_80",
SRTP_AES128_CM_SHA1_80,
};
static int find_profile_by_name(char *profile_name,
- SRTP_PROTECTION_PROFILE **pptr, size_t len)
+ const SRTP_PROTECTION_PROFILE **pptr, size_t len)
{
- SRTP_PROTECTION_PROFILE *p;
+ const SRTP_PROTECTION_PROFILE *p;
p = srtp_known_profiles;
while (p->name) {
char *col;
char *ptr = (char *)profiles_string;
- SRTP_PROTECTION_PROFILE *p;
+ const SRTP_PROTECTION_PROFILE *p;
if ((profiles = sk_SRTP_PROTECTION_PROFILE_new_null()) == NULL) {
ERR_raise(ERR_LIB_SSL, SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES);
if (!find_profile_by_name(ptr, &p, col ? (size_t)(col - ptr)
: strlen(ptr))) {
- if (sk_SRTP_PROTECTION_PROFILE_find(profiles, p) >= 0) {
+ if (sk_SRTP_PROTECTION_PROFILE_find(profiles,
+ (SRTP_PROTECTION_PROFILE *)p) >= 0) {
ERR_raise(ERR_LIB_SSL, SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST);
goto err;
}
- if (!sk_SRTP_PROTECTION_PROFILE_push(profiles, p)) {
+ if (!sk_SRTP_PROTECTION_PROFILE_push(profiles,
+ (SRTP_PROTECTION_PROFILE *)p)) {
ERR_raise(ERR_LIB_SSL, SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES);
goto err;
}
size_t max_pipelines;
/* Function pointers for version specific functions */
- struct record_functions_st *funcs;
+ const struct record_functions_st *funcs;
};
typedef struct dtls_rlayer_record_data_st {
TLS_RL_RECORD rrec;
} DTLS_RLAYER_RECORD_DATA;
-extern struct record_functions_st ssl_3_0_funcs;
-extern struct record_functions_st tls_1_funcs;
-extern struct record_functions_st tls_1_3_funcs;
-extern struct record_functions_st tls_any_funcs;
-extern struct record_functions_st dtls_1_funcs;
-extern struct record_functions_st dtls_any_funcs;
+extern const struct record_functions_st ssl_3_0_funcs;
+extern const struct record_functions_st tls_1_funcs;
+extern const struct record_functions_st tls_1_3_funcs;
+extern const struct record_functions_st tls_any_funcs;
+extern const struct record_functions_st dtls_1_funcs;
+extern const struct record_functions_st dtls_any_funcs;
void ossl_rlayer_fatal(OSSL_RECORD_LAYER *rl, int al, int reason,
const char *fmt, ...);
return 1;
}
-struct record_functions_st ssl_3_0_funcs = {
+const struct record_functions_st ssl_3_0_funcs = {
ssl3_set_crypto_state,
ssl3_cipher,
ssl3_mac,
return 1;
}
-struct record_functions_st tls_1_3_funcs = {
+const struct record_functions_st tls_1_3_funcs = {
tls13_set_crypto_state,
tls13_cipher,
NULL,
}
/* TLSv1.0, TLSv1.1 and TLSv1.2 all use the same funcs */
-struct record_functions_st tls_1_funcs = {
+const struct record_functions_st tls_1_funcs = {
tls1_set_crypto_state,
tls1_cipher,
tls1_mac,
NULL
};
-struct record_functions_st dtls_1_funcs = {
+const struct record_functions_st dtls_1_funcs = {
tls1_set_crypto_state,
tls1_cipher,
tls1_mac,
return 1;
}
-struct record_functions_st tls_any_funcs = {
+const struct record_functions_st tls_any_funcs = {
tls_any_set_crypto_state,
tls_any_cipher,
NULL,
return 1;
}
-struct record_functions_st dtls_any_funcs = {
+const struct record_functions_st dtls_any_funcs = {
tls_any_set_crypto_state,
tls_any_cipher,
NULL,
unsigned char *p,
size_t len, size_t *secret_size)
{
- static const unsigned char *salt[3] = {
+ static const unsigned char *const salt[3] = {
#ifndef CHARSET_EBCDIC
(const unsigned char *)"A",
(const unsigned char *)"BB",
const char *ver;
const char *kx, *au, *enc, *mac;
uint32_t alg_mkey, alg_auth, alg_enc, alg_mac;
- static const char *format = "%-30s %-7s Kx=%-8s Au=%-5s Enc=%-22s Mac=%-4s\n";
+ static const char *const format = "%-30s %-7s Kx=%-8s Au=%-5s Enc=%-22s Mac=%-4s\n";
if (buf == NULL) {
len = 128;
return ssl_undefined_function(SSL_CONNECTION_GET_SSL(sc));
}
-SSL3_ENC_METHOD ssl3_undef_enc_method = {
+const SSL3_ENC_METHOD ssl3_undef_enc_method = {
ssl_undefined_function_8,
ssl_undefined_function_3,
ssl_undefined_function_4,
extern const unsigned char tls11downgrade[8];
extern const unsigned char tls12downgrade[8];
-extern SSL3_ENC_METHOD ssl3_undef_enc_method;
+extern const SSL3_ENC_METHOD ssl3_undef_enc_method;
__owur const SSL_METHOD *sslv3_method(void);
__owur const SSL_METHOD *sslv3_server_method(void);