summaryrefslogtreecommitdiffstats
path: root/ncr-key.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-08-26 16:08:47 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-08-26 16:08:47 +0200
commit1f30d575e5b413e522d6b3e95d3e348df9e9c69e (patch)
tree39a3f5c118e75d45ce587a3c4e9486eef511cfd0 /ncr-key.c
parent3b521fbc223cafd360def97841544d34d7396dc2 (diff)
downloadcryptodev-linux-1f30d575e5b413e522d6b3e95d3e348df9e9c69e.tar.gz
cryptodev-linux-1f30d575e5b413e522d6b3e95d3e348df9e9c69e.tar.xz
cryptodev-linux-1f30d575e5b413e522d6b3e95d3e348df9e9c69e.zip
Unwrapping keys are restricted the same way as wrapping keys.
Diffstat (limited to 'ncr-key.c')
-rw-r--r--ncr-key.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ncr-key.c b/ncr-key.c
index f9fdcf4..295a58e 100644
--- a/ncr-key.c
+++ b/ncr-key.c
@@ -723,7 +723,7 @@ struct key_item_st* newkey = NULL;
/* wrapping keys cannot be used for anything except wrapping.
*/
- if (key->flags & NCR_KEY_FLAG_WRAPPING) {
+ if (key->flags & NCR_KEY_FLAG_WRAPPING || key->flags & NCR_KEY_FLAG_UNWRAPPING) {
err();
ret = -EINVAL;
goto fail;