diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-08-18 05:51:32 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-08-24 23:59:46 +0200 |
commit | f9fa90899a4691ce01244593e2902111fe9bf2c6 (patch) | |
tree | 39d1ba8c29b4df7323016dc171692225cc1f847f /examples | |
parent | eef7de54be0cd38abb689de7b0a749154b04c694 (diff) | |
download | cryptodev-linux-f9fa90899a4691ce01244593e2902111fe9bf2c6.tar.gz cryptodev-linux-f9fa90899a4691ce01244593e2902111fe9bf2c6.tar.xz cryptodev-linux-f9fa90899a4691ce01244593e2902111fe9bf2c6.zip |
Replace ncr_derive_t by NLA_NUL_STRING
Diffstat (limited to 'examples')
-rw-r--r-- | examples/pk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/pk.c b/examples/pk.c index 2503275..599f396 100644 --- a/examples/pk.c +++ b/examples/pk.c @@ -339,7 +339,7 @@ struct ncr_key_export kexport; struct __attribute__((packed)) { struct ncr_key_derive f; struct nlattr algo_head ALIGN_NL; - uint32_t algo ALIGN_NL; + char algo[sizeof(NCR_DERIVE_DH)] ALIGN_NL; struct nlattr flags_head ALIGN_NL; uint32_t flags ALIGN_NL; struct nlattr public_head ALIGN_NL; @@ -496,7 +496,7 @@ struct __attribute__((packed)) { kderive.f.new_key = z1; kderive.algo_head.nla_len = NLA_HDRLEN + sizeof(kderive.algo); kderive.algo_head.nla_type = NCR_ATTR_DERIVATION_ALGORITHM; - kderive.algo = NCR_DERIVE_DH; + strcpy(kderive.algo, NCR_DERIVE_DH); kderive.flags_head.nla_len = NLA_HDRLEN + sizeof(kderive.flags); kderive.flags_head.nla_type = NCR_ATTR_KEY_FLAGS; kderive.flags = NCR_KEY_FLAG_EXPORTABLE; @@ -527,7 +527,7 @@ struct __attribute__((packed)) { kderive.f.new_key = z2; kderive.algo_head.nla_len = NLA_HDRLEN + sizeof(kderive.algo); kderive.algo_head.nla_type = NCR_ATTR_DERIVATION_ALGORITHM; - kderive.algo = NCR_DERIVE_DH; + strcpy(kderive.algo, NCR_DERIVE_DH); kderive.flags_head.nla_len = NLA_HDRLEN + sizeof(kderive.flags); kderive.flags_head.nla_type = NCR_ATTR_KEY_FLAGS; kderive.flags = NCR_KEY_FLAG_EXPORTABLE; |