diff options
author | Neal H. Walfield <neal@pep.foundation> | 2019-05-15 15:43:36 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2019-05-15 15:45:30 +0200 |
commit | 0e655002843c2754f2e24773d8117499a8b30a54 (patch) | |
tree | af68b488de46650f292f3a32cceaa0d66458209a /openpgp-ffi | |
parent | 9853283156cdfaa3bb6556d36a3a0c98a6bca244 (diff) |
openpgp: Support generating 2k RSA keys
Diffstat (limited to 'openpgp-ffi')
-rw-r--r-- | openpgp-ffi/include/sequoia/openpgp/types.h | 5 | ||||
-rw-r--r-- | openpgp-ffi/src/tpk.rs | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/openpgp-ffi/include/sequoia/openpgp/types.h b/openpgp-ffi/include/sequoia/openpgp/types.h index 40c926d0..42dfb727 100644 --- a/openpgp-ffi/include/sequoia/openpgp/types.h +++ b/openpgp-ffi/include/sequoia/openpgp/types.h @@ -430,6 +430,11 @@ typedef enum pgp_tpk_cipher_suite { /*/ PGP_TPK_CIPHER_SUITE_P521, + /*/ + /// 2048 bit RSA with SHA512 and AES256. + /*/ + PGP_TPK_CIPHER_SUITE_RSA2K, + /* Dummy value to make sure the enumeration has a defined size. Do not use this value. */ PGP_TPK_CIPHER_SUITE_FORCE_WIDTH = INT_MAX, diff --git a/openpgp-ffi/src/tpk.rs b/openpgp-ffi/src/tpk.rs index c8b70618..259b3a1c 100644 --- a/openpgp-ffi/src/tpk.rs +++ b/openpgp-ffi/src/tpk.rs @@ -845,6 +845,7 @@ fn int_to_cipher_suite(cs: c_int) -> CipherSuite { 2 => P256, 3 => P384, 4 => P521, + 5 => RSA2k, n => panic!("Bad ciphersuite: {}", n), } } |