// SPDX-License-Identifier: GPL-2.0-or-later /* PKCS#8 Private Key parser [RFC 5208]. * * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com)
*/
struct pkcs8_parse_context { struct public_key *pub; unsignedlong data; /* Start of data */ enum OID last_oid; /* Last OID encountered */ enum OID algo_oid; /* Algorithm OID */
u32 key_size; constvoid *key;
};
/* * Note an OID when we find one for later processing when we know how to * interpret it.
*/ int pkcs8_note_OID(void *context, size_t hdrlen, unsignedchar tag, constvoid *value, size_t vlen)
{ struct pkcs8_parse_context *ctx = context;
/* * Attempt to parse a data blob for a key as a PKCS#8 private key.
*/ staticint pkcs8_key_preparse(struct key_preparsed_payload *prep)
{ struct public_key *pub;
pub = pkcs8_parse(prep->data, prep->datalen); if (IS_ERR(pub)) return PTR_ERR(pub);
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.