Blame crypto/store/store_strings.c
|
Packit Service |
084de1 |
/*
|
|
Packit Service |
084de1 |
* Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved.
|
|
Packit Service |
084de1 |
*
|
|
Packit Service |
084de1 |
* Licensed under the OpenSSL license (the "License"). You may not use
|
|
Packit Service |
084de1 |
* this file except in compliance with the License. You can obtain a copy
|
|
Packit Service |
084de1 |
* in the file LICENSE in the source distribution or at
|
|
Packit Service |
084de1 |
* https://www.openssl.org/source/license.html
|
|
Packit Service |
084de1 |
*/
|
|
Packit Service |
084de1 |
|
|
Packit Service |
084de1 |
#include <openssl/store.h>
|
|
Packit Service |
084de1 |
|
|
Packit Service |
084de1 |
static char *type_strings[] = {
|
|
Packit Service |
084de1 |
"Name", /* OSSL_STORE_INFO_NAME */
|
|
Packit Service |
084de1 |
"Parameters", /* OSSL_STORE_INFO_PARAMS */
|
|
Packit Service |
084de1 |
"Pkey", /* OSSL_STORE_INFO_PKEY */
|
|
Packit Service |
084de1 |
"Certificate", /* OSSL_STORE_INFO_CERT */
|
|
Packit Service |
084de1 |
"CRL" /* OSSL_STORE_INFO_CRL */
|
|
Packit Service |
084de1 |
};
|
|
Packit Service |
084de1 |
|
|
Packit Service |
084de1 |
const char *OSSL_STORE_INFO_type_string(int type)
|
|
Packit Service |
084de1 |
{
|
|
Packit Service |
084de1 |
int types = sizeof(type_strings) / sizeof(type_strings[0]);
|
|
Packit Service |
084de1 |
|
|
Packit Service |
084de1 |
if (type < 1 || type > types)
|
|
Packit Service |
084de1 |
return NULL;
|
|
Packit Service |
084de1 |
|
|
Packit Service |
084de1 |
return type_strings[type - 1];
|
|
Packit Service |
084de1 |
}
|