Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic code generation #76

Merged
merged 16 commits into from
Mar 11, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Regenerated LowLevelAPIs
  • Loading branch information
jariq committed Feb 16, 2018
commit ba74f8c7618752604746ca12c88ecb7a9f3a1048
5 changes: 3 additions & 2 deletions src/Pkcs11Interop/Pkcs11Interop/LowLevelAPI40/CK_ATTRIBUTE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

using System;
using System.Runtime.InteropServices;
using NativeLong = System.UInt32;

namespace Net.Pkcs11Interop.LowLevelAPI40
{
Expand All @@ -33,7 +34,7 @@ public struct CK_ATTRIBUTE
/// <summary>
/// The attribute type
/// </summary>
public uint type;
public NativeLong type;

/// <summary>
/// Pointer to the value of the attribute
Expand All @@ -43,6 +44,6 @@ public struct CK_ATTRIBUTE
/// <summary>
/// Length in bytes of the value
/// </summary>
public uint valueLen;
public NativeLong valueLen;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

using System;
using System.Runtime.InteropServices;
using NativeLong = System.UInt32;

namespace Net.Pkcs11Interop.LowLevelAPI40
{
Expand Down Expand Up @@ -53,7 +54,7 @@ public class CK_C_INITIALIZE_ARGS
/// <summary>
/// Bit flags specifying options
/// </summary>
public uint Flags = 0;
public NativeLong Flags = 0;

/// <summary>
/// Reserved for future use
Expand Down
3 changes: 2 additions & 1 deletion src/Pkcs11Interop/Pkcs11Interop/LowLevelAPI40/CK_INFO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/

using System.Runtime.InteropServices;
using NativeLong = System.UInt32;

namespace Net.Pkcs11Interop.LowLevelAPI40
{
Expand All @@ -43,7 +44,7 @@ public struct CK_INFO
/// <summary>
/// Bit flags reserved for future versions. Must be zero for this version
/// </summary>
public uint Flags;
public NativeLong Flags;

/// <summary>
/// Character-string description of the library. Must be padded with the blank character (‘ ‘). Should not be null-terminated.
Expand Down
5 changes: 3 additions & 2 deletions src/Pkcs11Interop/Pkcs11Interop/LowLevelAPI40/CK_MECHANISM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

using System;
using System.Runtime.InteropServices;
using NativeLong = System.UInt32;

namespace Net.Pkcs11Interop.LowLevelAPI40
{
Expand All @@ -33,7 +34,7 @@ public struct CK_MECHANISM
/// <summary>
/// The type of mechanism
/// </summary>
public uint Mechanism;
public NativeLong Mechanism;

/// <summary>
/// Pointer to the parameter if required by the mechanism
Expand All @@ -43,6 +44,6 @@ public struct CK_MECHANISM
/// <summary>
/// Length of the parameter in bytes
/// </summary>
public uint ParameterLen;
public NativeLong ParameterLen;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/

using System.Runtime.InteropServices;
using NativeLong = System.UInt32;

namespace Net.Pkcs11Interop.LowLevelAPI40
{
Expand All @@ -32,16 +33,16 @@ public struct CK_MECHANISM_INFO
/// <summary>
/// The minimum size of the key for the mechanism (whether this is measured in bits or in bytes is mechanism-dependent)
/// </summary>
public uint MinKeySize;
public NativeLong MinKeySize;

/// <summary>
/// The maximum size of the key for the mechanism (whether this is measured in bits or in bytes is mechanism-dependent)
/// </summary>
public uint MaxKeySize;
public NativeLong MaxKeySize;

/// <summary>
/// Bit flags specifying mechanism capabilities
/// </summary>
public uint Flags;
public NativeLong Flags;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/

using System.Runtime.InteropServices;
using NativeLong = System.UInt32;

namespace Net.Pkcs11Interop.LowLevelAPI40
{
Expand All @@ -32,21 +33,21 @@ public struct CK_SESSION_INFO
/// <summary>
/// ID of the slot that interfaces with the token
/// </summary>
public uint SlotId;
public NativeLong SlotId;

/// <summary>
/// The state of the session
/// </summary>
public uint State;
public NativeLong State;

/// <summary>
/// Bit flags that define the type of session
/// </summary>
public uint Flags;
public NativeLong Flags;

/// <summary>
/// An error code defined by the cryptographic device. Used for errors not covered by Cryptoki.
/// </summary>
public uint DeviceError;
public NativeLong DeviceError;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/

using System.Runtime.InteropServices;
using NativeLong = System.UInt32;

namespace Net.Pkcs11Interop.LowLevelAPI40
{
Expand All @@ -44,7 +45,7 @@ public struct CK_SLOT_INFO
/// <summary>
/// Bits flags that provide capabilities of the slot.
/// </summary>
public uint Flags;
public NativeLong Flags;

/// <summary>
/// Version number of the slot's hardware
Expand Down
23 changes: 12 additions & 11 deletions src/Pkcs11Interop/Pkcs11Interop/LowLevelAPI40/CK_TOKEN_INFO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/

using System.Runtime.InteropServices;
using NativeLong = System.UInt32;

namespace Net.Pkcs11Interop.LowLevelAPI40
{
Expand Down Expand Up @@ -56,57 +57,57 @@ public struct CK_TOKEN_INFO
/// <summary>
/// Bit flags indicating capabilities and status of the device
/// </summary>
public uint Flags;
public NativeLong Flags;

/// <summary>
/// Maximum number of sessions that can be opened with the token at one time by a single application
/// </summary>
public uint MaxSessionCount;
public NativeLong MaxSessionCount;

/// <summary>
/// Number of sessions that this application currently has open with the token
/// </summary>
public uint SessionCount;
public NativeLong SessionCount;

/// <summary>
/// Maximum number of read/write sessions that can be opened with the token at one time by a single application
/// </summary>
public uint MaxRwSessionCount;
public NativeLong MaxRwSessionCount;

/// <summary>
/// Number of read/write sessions that this application currently has open with the token
/// </summary>
public uint RwSessionCount;
public NativeLong RwSessionCount;

/// <summary>
/// Maximum length in bytes of the PIN
/// </summary>
public uint MaxPinLen;
public NativeLong MaxPinLen;

/// <summary>
/// Minimum length in bytes of the PIN
/// </summary>
public uint MinPinLen;
public NativeLong MinPinLen;

/// <summary>
/// The total amount of memory on the token in bytes in which public objects may be stored
/// </summary>
public uint TotalPublicMemory;
public NativeLong TotalPublicMemory;

/// <summary>
/// The amount of free (unused) memory on the token in bytes for public objects
/// </summary>
public uint FreePublicMemory;
public NativeLong FreePublicMemory;

/// <summary>
/// The total amount of memory on the token in bytes in which private objects may be stored
/// </summary>
public uint TotalPrivateMemory;
public NativeLong TotalPrivateMemory;

/// <summary>
/// The amount of free (unused) memory on the token in bytes for private objects
/// </summary>
public uint FreePrivateMemory;
public NativeLong FreePrivateMemory;

/// <summary>
/// Version number of hardware
Expand Down
Loading