Make IEncryptionService destructor protected 53/250753/1
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Mon, 4 Jan 2021 09:01:30 +0000 (10:01 +0100)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Mon, 4 Jan 2021 09:01:30 +0000 (10:01 +0100)
The implicitly-defined destructor is non-virtual and public. We don't
want the EncryptionService to be destroyed via IEncryptionService.

Change-Id: Iaf2b180cdd4f60a4f20cc1c9e1d593dcd1c1f220

src/manager/service/iencryption-service.h

index 35281e2..eb5a8ae 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *  Copyright (c) 2015 - 2021 Samsung Electronics Co., Ltd All Rights Reserved
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -35,6 +35,8 @@ public:
                                                                 int retCode,
                                                                 const RawBuffer &data = RawBuffer()) = 0;
        virtual void RequestKey(const CryptoRequest &request) = 0;
+protected:
+       ~IEncryptionService() {}
 };
 
 } // namespace CKM