rsakey-nettle.c.inc (2417cbd5916d043e0c56408221fbe9935d0bc8da) | rsakey-nettle.c.inc (5f4059ef33e927ce9f72cb60000efa156566cd5c) |
---|---|
1/* 2 * QEMU Crypto akcipher algorithms 3 * 4 * Copyright (c) 2022 Bytedance 5 * Author: lei he <helei.sig11@bytedance.com> 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public --- 131 unchanged lines hidden (view full) --- 140 return NULL; 141} 142 143QCryptoAkCipherRSAKey *qcrypto_akcipher_rsakey_parse( 144 QCryptoAkCipherKeyType type, const uint8_t *key, 145 size_t keylen, Error **errp) 146{ 147 switch (type) { | 1/* 2 * QEMU Crypto akcipher algorithms 3 * 4 * Copyright (c) 2022 Bytedance 5 * Author: lei he <helei.sig11@bytedance.com> 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public --- 131 unchanged lines hidden (view full) --- 140 return NULL; 141} 142 143QCryptoAkCipherRSAKey *qcrypto_akcipher_rsakey_parse( 144 QCryptoAkCipherKeyType type, const uint8_t *key, 145 size_t keylen, Error **errp) 146{ 147 switch (type) { |
148 case QCRYPTO_AKCIPHER_KEY_TYPE_PRIVATE: | 148 case QCRYPTO_AK_CIPHER_KEY_TYPE_PRIVATE: |
149 return qcrypto_nettle_rsa_private_key_parse(key, keylen, errp); 150 | 149 return qcrypto_nettle_rsa_private_key_parse(key, keylen, errp); 150 |
151 case QCRYPTO_AKCIPHER_KEY_TYPE_PUBLIC: | 151 case QCRYPTO_AK_CIPHER_KEY_TYPE_PUBLIC: |
152 return qcrypto_nettle_rsa_public_key_parse(key, keylen, errp); 153 154 default: 155 error_setg(errp, "Unknown key type: %d", type); 156 return NULL; 157 } 158} | 152 return qcrypto_nettle_rsa_public_key_parse(key, keylen, errp); 153 154 default: 155 error_setg(errp, "Unknown key type: %d", type); 156 return NULL; 157 } 158} |