/* info needed for both encrypt and decrypt directions */ struct ovpn_key_direction { const u8 *cipher_key;
size_t cipher_key_size; const u8 *nonce_tail; /* only needed for GCM modes */
size_t nonce_tail_size; /* only needed for GCM modes */
};
/* all info for a particular symmetric key (primary or secondary) */ struct ovpn_key_config { enum ovpn_cipher_alg cipher_alg;
u8 key_id; struct ovpn_key_direction encrypt; struct ovpn_key_direction decrypt;
};
/* used to pass settings from netlink to the crypto engine */ struct ovpn_peer_key_reset { enum ovpn_key_slot slot; struct ovpn_key_config key;
};
ks = rcu_dereference(cs->slots[!idx]); if (ks && ks->key_id == key_id) { if (unlikely(!ovpn_crypto_key_slot_hold(ks)))
ks = NULL; goto out;
}
/* when both key slots are occupied but no matching key ID is found, ks * has to be reset to NULL to avoid carrying a stale pointer
*/
ks = NULL;
out:
rcu_read_unlock();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.