Lines Matching +full:use +full:- +full:minimum +full:- +full:ecc
2 * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
6 * Licensed under the Apache License 2.0 (the "License"). You may not use
49 /* NOTE - c is not incremented as per c2l */
54 case 8: l2 =((unsigned long)(*(--(c))))<<24; \
55 case 7: l2|=((unsigned long)(*(--(c))))<<16; \
56 case 6: l2|=((unsigned long)(*(--(c))))<< 8; \
57 case 5: l2|=((unsigned long)(*(--(c)))); \
58 case 4: l1 =((unsigned long)(*(--(c))))<<24; \
59 case 3: l1|=((unsigned long)(*(--(c))))<<16; \
60 case 2: l1|=((unsigned long)(*(--(c))))<< 8; \
61 case 1: l1|=((unsigned long)(*(--(c)))); \
106 /* NOTE - c is not incremented as per l2c */
110 case 8: *(--(c))=(unsigned char)(((l2)>>24)&0xff); \
111 case 7: *(--(c))=(unsigned char)(((l2)>>16)&0xff); \
112 case 6: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); \
113 case 5: *(--(c))=(unsigned char)(((l2) )&0xff); \
114 case 4: *(--(c))=(unsigned char)(((l1)>>24)&0xff); \
115 case 3: *(--(c))=(unsigned char)(((l1)>>16)&0xff); \
116 case 2: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); \
117 case 1: *(--(c))=(unsigned char)(((l1) )&0xff); \
152 * is for internal library use only, even though SSL_CIPHER.algorithms
154 * Use the according functions for cipher management instead.
183 /* GOST KDF key exchange, draft-smyshlyaev-tls12-gost-suites */
198 /* no auth (i.e. use ADH or AECDH) */
204 /* GOST R 34.10-2001 signature auth */
208 /* GOST R 34.10-2012 signature auth */
294 /* Bits 0-7 are handshake MAC */
304 /* Bits 8-15 bits are PRF */
320 * TLSTREE cipher/mac key derivation from draft-smyshlyaev-tls12-gost-suites
335 /* we have used 0000003f - 26 bits left to go */
341 # define SSL_IS_DTLS(s) (s->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
345 && (s)->method->version >= TLS1_3_VERSION \
346 && (s)->method->version != TLS_ANY_VERSION)
349 (SSL_IS_TLS13(s) || (s)->early_data_state == SSL_EARLY_DATA_CONNECTING \
350 || (s)->early_data_state == SSL_EARLY_DATA_CONNECT_RETRY \
351 || (s)->early_data_state == SSL_EARLY_DATA_WRITING \
352 || (s)->early_data_state == SSL_EARLY_DATA_WRITE_RETRY \
353 || (s)->hello_retry_request == SSL_HRR_PENDING)
355 # define SSL_IS_FIRST_HANDSHAKE(S) ((s)->s3.tmp.finish_md_len == 0 \
356 || (s)->s3.tmp.peer_finish_md_len == 0)
360 (s->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_EXPLICIT_IV)
362 * See if we use signature algorithms extension and signature algorithm
366 (s->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SIGALGS)
372 (s->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_TLS1_2_CIPHERS)
374 * Determine if a client can use TLS 1.2 ciphersuites: can't rely on method
378 ((!SSL_IS_DTLS(s) && s->client_version >= TLS1_2_VERSION) || \
379 (SSL_IS_DTLS(s) && DTLS_VERSION_GE(s->client_version, DTLS1_2_VERSION)))
391 IS_MAX_FRAGMENT_LENGTH_EXT_VALID(session->ext.max_fragment_len_mode)
393 (512U << (session->ext.max_fragment_len_mode - 1))
395 # define SSL_READ_ETM(s) (s->s3.flags & TLS1_FLAGS_ENCRYPT_THEN_MAC_READ)
396 # define SSL_WRITE_ETM(s) (s->s3.flags & TLS1_FLAGS_ENCRYPT_THEN_MAC_WRITE)
436 /*-
437 * SSL_kRSA <- RSA_ENC
438 * SSL_kDH <- DH_ENC & (RSA_ENC | RSA_SIGN | DSA_SIGN)
439 * SSL_kDHE <- RSA_ENC | RSA_SIGN | DSA_SIGN
440 * SSL_aRSA <- RSA_ENC | RSA_SIGN
441 * SSL_aDSS <- DSA_SIGN
444 /*-
450 /* Post-Handshake Authentication state */
453 SSL_PHA_EXT_SENT, /* client-side only: extension sent */
454 SSL_PHA_EXT_RECEIVED, /* server-side only: extension received */
455 SSL_PHA_REQUEST_PENDING, /* server-side only: request pending */
475 int min_tls; /* minimum SSL/TLS protocol version */
477 int min_dtls; /* minimum DTLS protocol version */
528 /*-
531 * version INTEGER, -- structure version number
532 * SSLversion INTEGER, -- SSL version number
533 * Cipher OCTET STRING, -- the 3 byte cipher ID
534 * Session_ID OCTET STRING, -- the Session ID
535 * Master_key OCTET STRING, -- the master key
536 * Key_Arg [ 0 ] IMPLICIT OCTET STRING, -- the optional Key argument
537 * Time [ 1 ] EXPLICIT INTEGER, -- optional Start Time
538 * Timeout [ 2 ] EXPLICIT INTEGER, -- optional Timeout ins seconds
539 * Peer [ 3 ] EXPLICIT X509, -- optional Peer Certificate
540 * Session_ID_context [ 4 ] EXPLICIT OCTET STRING, -- the Session ID context
541 * Verify_result [ 5 ] EXPLICIT INTEGER, -- X509_V_... code for `Peer'
542 * HostName [ 6 ] EXPLICIT OCTET STRING, -- optional HostName from servername TLS extension
543 * PSK_identity_hint [ 7 ] EXPLICIT OCTET STRING, -- optional PSK identity hint
544 * PSK_identity [ 8 ] EXPLICIT OCTET STRING, -- optional PSK identity
545 * Ticket_lifetime_hint [9] EXPLICIT INTEGER, -- server's lifetime hint for session ticket
546 * Ticket [10] EXPLICIT OCTET STRING, -- session ticket (clients only)
547 * Compression_meth [11] EXPLICIT OCTET STRING, -- optional compression method
548 * SRP_username [ 12 ] EXPLICIT OCTET STRING -- optional SRP username
549 * flags [ 13 ] EXPLICIT INTEGER -- optional flags
552 * I'm using EXPLICIT tags so I can read the damn things using asn1parse :-).
566 /* session_id - valid? */
607 * These are used to make removal of session-ids more efficient and to
627 * If this value does not contain RFC 4366 allowed values (1-4) then
720 /* Track what order extensions are received in (0-based). */
771 /* Dummy index - must always be the last entry */
822 unsigned int secbits; /* Bits of security (from SP800-57) */
824 int mintls; /* Minimum TLS version, -1 unsupported */
826 int mindtls; /* Minimum DTLS version, -1 unsupported */
853 * Most session-ids that will be cached, default is
876 * remove_session_cb is not null, it will be called when a session-id is
886 TSAN_QUALIFIER int sess_connect; /* SSL new conn - started */
887 TSAN_QUALIFIER int sess_connect_renegotiate; /* SSL reneg - requested */
888 TSAN_QUALIFIER int sess_connect_good; /* SSL new conne/reneg - finished */
889 TSAN_QUALIFIER int sess_accept; /* SSL new accept - started */
890 TSAN_QUALIFIER int sess_accept_renegotiate; /* SSL reneg - requested */
891 TSAN_QUALIFIER int sess_accept_good; /* SSL accept/reneg - finished */
896 TSAN_QUALIFIER int sess_cb_hit; /* session-id that was not in
900 * supplying session-id's from
901 * other processes - spooky
902 * :-) */
935 /* TLS1.3 app-controlled cookie generate callback */
939 /* TLS1.3 verify app-controlled cookie callback */
945 const EVP_MD *md5; /* For SSLv3/TLSv1 'ssl3-md5' */
946 const EVP_MD *sha1; /* For SSLv3/TLSv1 'ssl3-sha1' */
951 /* Default values used when no per-SSL value is defined follow */
966 * Default values to use in SSL structures follow (these are copied by
1018 /* Up to how many pipelines should we use? If 0 then 1 is assumed */
1021 /* The default read buffer length to use (0 means not set) */
1077 /*-
1084 * wire-format.
1148 * Callback for logging key material for use with debugging tools like
1182 /* Do we advertise Post-handshake auth support? */
1228 /* used during session-id reuse to concatenate messages */
1231 * This holds a variable that indicates what we were doing when a 0 or -1
1232 * is returned. This is needed for non-blocking IO so we know what
1233 * request needs re-doing when in SSL_accept or SSL_connect
1241 * handshake_func is == 0 until then, we use this test instead of an
1274 /* flags for countermeasure against known-IV weakness */
1314 /* used to hold the new cipher we are going to use */
1347 /* Signature algorithm we actually use */
1349 /* Pointer to certificate we use */
1379 * not. It contains the minimum and maximum version the client's using
1421 * 10.8 .. 10.8.3 has broken ECDHE-ECDSA support.
1562 * What was passed in ClientHello.legacy_version. Used for RSA pre-master
1576 /* Up to how many pipelines should we use? If 0 then 1 is assumed */
1580 /* Built-in extension flags */
1588 /* Status type or -1 if no status type */
1630 /* TLS pre-shared secret session resumption */
1668 * If this member contains one of the allowed values (1-4)
1691 /*-
1704 /* User-supplied argument that is passed to the ct_validation_callback */
1721 /*-
1729 /* Post-handshake authentication state */
1785 /* The next nonce value to use when we send a ticket on this connection */
1815 /* Index of hash algorithm or -1 if no hash algorithm */
1825 /* Whether this signature algorithm is actually available for use */
1881 unsigned char priority[8]; /* 64-bit value in big-endian encoding */
1912 size_t link_mtu; /* max on-the-wire DTLS packet size */
1935 * From ECC-TLS draft, used in encoding the curve type in ECParameters
1946 /*-
1957 # define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
1975 * Per-connection flags relating to this extension type: not used if
2025 * servers it represents the signature algorithms we are willing to use.
2034 * represents the signature algorithms we are willing to use for client
2064 /* If not NULL psk identity hint to use for servers */
2075 * of a mess of functions, but hell, think of it as an opaque structure :-)
2105 s->method->ssl3_enc->set_handshake_header((s), (pkt), (htype))
2107 s->method->ssl3_enc->close_construct_packet((s), (pkt), (htype))
2108 # define ssl_do_write(s) s->method->ssl3_enc->do_write(s)
2132 COMP_METHOD *method; /* The method :-) */
2146 #define TLSEXT_STATUSTYPE_nothing -1
2190 #define SSL_USE_PSS(s) (s->s3.tmp.peer_sigalg != NULL && \
2191 s->s3.tmp.peer_sigalg->sig == EVP_PKEY_RSA_PSS)
2365 return s->cert->pkeys[idx].x509 != NULL in ssl_has_cert()
2366 && s->cert->pkeys[idx].privatekey != NULL; in ssl_has_cert()
2372 *pgroups = s->ext.peer_supportedgroups; in tls1_get_peer_groups()
2373 *pgroupslen = s->ext.peer_supportedgroups_len; in tls1_get_peer_groups()
2855 # define ssl_init_wbio_buffer SSL_test_functions()->p_ssl_init_wbio_buffer
2856 # define ssl3_setup_buffers SSL_test_functions()->p_ssl3_setup_buffers
2864 if (!CRYPTO_THREAD_write_lock(ctx->tsan_lock)) in ssl_tsan_lock()
2873 CRYPTO_THREAD_unlock(ctx->tsan_lock); in ssl_tsan_unlock()