2
* Sets of allowed padding schemes for public key types
4
* This file was automatically generated by ./src/scripts/oids.py on 2017-12-20
6
* All manual edits to this file will be lost. Edit the script
7
* then regenerate this source file.
9
* Botan is released under the Simplified BSD License (see license.txt)
12
#include <botan/internal/padding.h>
20
const std::map<const std::string, std::vector<std::string>> allowed_signature_paddings =
23
{ "ECDSA", {"EMSA1"} },
24
{ "ECGDSA", {"EMSA1"} },
25
{ "ECKCDSA", {"EMSA1"} },
26
{ "GOST-34.10", {"EMSA1"} },
27
{ "RSA", {"EMSA4", "EMSA3"} },
30
const std::vector<std::string> get_sig_paddings(const std::string algo)
32
if(allowed_signature_paddings.count(algo) > 0)
33
return allowed_signature_paddings.at(algo);
37
bool sig_algo_and_pad_ok(const std::string algo, const std::string padding)
39
std::vector<std::string> pads = get_sig_paddings(algo);
40
return std::find(pads.begin(), pads.end(), padding) != pads.end();