File tree Expand file tree Collapse file tree 4 files changed +32
-0
lines changed
Expand file tree Collapse file tree 4 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,27 @@ OSSLMLDSAPublicKey::~OSSLMLDSAPublicKey()
3737 }
3838}
3939
40+ OSSLMLDSAPublicKey::OSSLMLDSAPublicKey (OSSLMLDSAPublicKey&& other) noexcept
41+ : MLDSAPublicKey(std::move(other)), pkey(other.pkey)
42+ {
43+ other.pkey = NULL ;
44+ }
45+
46+ OSSLMLDSAPublicKey& OSSLMLDSAPublicKey::operator =(OSSLMLDSAPublicKey&& other) noexcept
47+ {
48+ if (this != &other)
49+ {
50+ // move base
51+ MLDSAPublicKey::operator =(std::move (other));
52+ // release current
53+ if (pkey) { EVP_PKEY_free (pkey); }
54+ // steal
55+ pkey = other.pkey ;
56+ other.pkey = NULL ;
57+ }
58+ return *this ;
59+ }
60+
4061// The type
4162/* static*/ const char * OSSLMLDSAPublicKey::type = " OpenSSL ML-DSA Public Key" ;
4263
Original file line number Diff line number Diff line change @@ -23,6 +23,14 @@ class OSSLMLDSAPublicKey : public MLDSAPublicKey
2323 // Destructor
2424 virtual ~OSSLMLDSAPublicKey ();
2525
26+ // Non-copyable (raw ownership of EVP_PKEY)
27+ OSSLMLDSAPublicKey (const OSSLMLDSAPublicKey&) = delete ;
28+ OSSLMLDSAPublicKey& operator =(const OSSLMLDSAPublicKey&) = delete ;
29+
30+ // Movable
31+ OSSLMLDSAPublicKey (OSSLMLDSAPublicKey&&) noexcept ;
32+ OSSLMLDSAPublicKey& operator =(OSSLMLDSAPublicKey&&) noexcept ;
33+
2634 // The type
2735 static const char * type;
2836
Original file line number Diff line number Diff line change 3434#include " log.h"
3535#include " DerUtil.h"
3636#include " OSSLUtil.h"
37+ #ifdef WITH_ML_DSA
3738#include " MLDSAParameters.h"
3839#include < map>
40+ #endif
3941#include < openssl/asn1.h>
4042#include < openssl/evp.h>
4143#include < openssl/err.h>
Original file line number Diff line number Diff line change @@ -520,6 +520,7 @@ static AttributeKind attributeKind(CK_ATTRIBUTE_TYPE type)
520520 case CKA_OS_USERPIN: return akBinary;
521521
522522 case CKA_PARAMETER_SET: return akInteger;
523+ case CKA_SEED: return akBinary;
523524
524525 default : return akUnknown;
525526 }
You can’t perform that action at this time.
0 commit comments