blacklist.c (2b1333b80885b896807ffb6ccf4bc21d29aa65e0) | blacklist.c (60050ffe3d770dd1df5b641aa48f49d07a54bd84) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* System hash blacklist. 3 * 4 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. 5 * Written by David Howells (dhowells@redhat.com) 6 */ 7 8#define pr_fmt(fmt) "blacklist: "fmt 9#include <linux/module.h> 10#include <linux/slab.h> 11#include <linux/key.h> 12#include <linux/key-type.h> 13#include <linux/sched.h> 14#include <linux/ctype.h> 15#include <linux/err.h> 16#include <linux/seq_file.h> 17#include <linux/uidgid.h> | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* System hash blacklist. 3 * 4 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. 5 * Written by David Howells (dhowells@redhat.com) 6 */ 7 8#define pr_fmt(fmt) "blacklist: "fmt 9#include <linux/module.h> 10#include <linux/slab.h> 11#include <linux/key.h> 12#include <linux/key-type.h> 13#include <linux/sched.h> 14#include <linux/ctype.h> 15#include <linux/err.h> 16#include <linux/seq_file.h> 17#include <linux/uidgid.h> |
18#include <linux/verification.h> | 18#include <keys/asymmetric-type.h> |
19#include <keys/system_keyring.h> 20#include "blacklist.h" | 19#include <keys/system_keyring.h> 20#include "blacklist.h" |
21#include "common.h" | |
22 23/* 24 * According to crypto/asymmetric_keys/x509_cert_parser.c:x509_note_pkey_algo(), 25 * the size of the currently longest supported hash algorithm is 512 bits, 26 * which translates into 128 hex characters. 27 */ 28#define MAX_HASH_LEN 128 29 --- 330 unchanged lines hidden (view full) --- 360/* 361 * Load the compiled-in list of revocation X.509 certificates. 362 */ 363static __init int load_revocation_certificate_list(void) 364{ 365 if (revocation_certificate_list_size) 366 pr_notice("Loading compiled-in revocation X.509 certificates\n"); 367 | 21 22/* 23 * According to crypto/asymmetric_keys/x509_cert_parser.c:x509_note_pkey_algo(), 24 * the size of the currently longest supported hash algorithm is 512 bits, 25 * which translates into 128 hex characters. 26 */ 27#define MAX_HASH_LEN 128 28 --- 330 unchanged lines hidden (view full) --- 359/* 360 * Load the compiled-in list of revocation X.509 certificates. 361 */ 362static __init int load_revocation_certificate_list(void) 363{ 364 if (revocation_certificate_list_size) 365 pr_notice("Loading compiled-in revocation X.509 certificates\n"); 366 |
368 return load_certificate_list(revocation_certificate_list, revocation_certificate_list_size, 369 blacklist_keyring); | 367 return x509_load_certificate_list(revocation_certificate_list, 368 revocation_certificate_list_size, 369 blacklist_keyring); |
370} 371late_initcall(load_revocation_certificate_list); 372#endif | 370} 371late_initcall(load_revocation_certificate_list); 372#endif |