From 8f778c3d8854bc392bcac5067eb979be7f206882 Mon Sep 17 00:00:00 2001 From: Torfinn Berset Date: Thu, 31 Jan 2019 14:25:36 +0100 Subject: Check if at least one encryption mode is selected --- conanfile.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/conanfile.py b/conanfile.py index 20023bd..2baa361 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,4 +1,5 @@ from conans import ConanFile, CMake +from conans.errors import ConanException class TinyAesCConan(ConanFile): @@ -40,11 +41,15 @@ class TinyAesCConan(ConanFile): "AES128": True, "AES192": False, "AES256": False, - "CBC": False, - "ECB": False, - "CTR": False + "CBC": True, + "ECB": True, + "CTR": True } + def configure(self): + if not self.options.CBC and not self.options.ECB and not self.options.CTR: + raise ConanException("Need to at least specify one of CBC, ECB or CTR modes") + def build(self): cmake = CMake(self) -- cgit v1.2.3