aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi/ffi_pkey_algs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ffi/ffi_pkey_algs.cpp')
-rw-r--r--src/lib/ffi/ffi_pkey_algs.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/ffi/ffi_pkey_algs.cpp b/src/lib/ffi/ffi_pkey_algs.cpp
index 622da7a14..7987639c8 100644
--- a/src/lib/ffi/ffi_pkey_algs.cpp
+++ b/src/lib/ffi/ffi_pkey_algs.cpp
@@ -117,7 +117,7 @@ Botan::BigInt pubkey_get_field(const Botan::Public_Key& key,
else if(field == "e")
return rsa->get_e();
else
- throw Botan::Exception("Field not supported");
+ return BOTAN_FFI_ERROR_BAD_PARAMETER;
}
#endif
@@ -134,7 +134,7 @@ Botan::BigInt pubkey_get_field(const Botan::Public_Key& key,
else if(field == "y")
return dl->get_y();
else
- throw Botan::Exception("Field not supported");
+ return BOTAN_FFI_ERROR_BAD_PARAMETER;
}
#endif
@@ -160,12 +160,12 @@ Botan::BigInt pubkey_get_field(const Botan::Public_Key& key,
else if(field == "order")
return ecc->domain().get_order();
else
- throw Botan::Exception("Field not supported");
+ return BOTAN_FFI_ERROR_BAD_PARAMETER;
}
#endif
// Some other algorithm type not supported by this function
- throw Botan::Exception("Unsupported algorithm type for botan_pubkey_get_field");
+ return BOTAN_FFI_ERROR_NOT_IMPLEMENTED;
}
Botan::BigInt privkey_get_field(const Botan::Private_Key& key,
@@ -216,7 +216,7 @@ Botan::BigInt privkey_get_field(const Botan::Private_Key& key,
#endif
// Some other algorithm type not supported by this function
- throw Botan::Exception("Unsupported algorithm type for botan_privkey_get_field");
+ return BOTAN_FFI_ERROR_NOT_IMPLEMENTED;
}
}