Top Description Inners Fields
com.sun.jna.platform.win32

public Interface WinCrypt

Imports
com.sun.jna.FromNativeContext, .Memory, .Native, .NativeMapped, .Pointer, .StringArray, .Structure, .Structure.FieldOrder, .Union, com.sun.jna.platform.win32.WinDef.HWND, .Guid.GUID, .WTypes.LPSTR, .WinBase.FILETIME, .WinCrypt.DATA_BLOB, .WinNT.HANDLE, com.sun.jna.win32.W32APITypeMapper, .StdCallLibrary

Ported from WinCrypt.h. Microsoft Windows SDK 6.0A.
Author
dblock[at]dblock.org

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
WinCrypt.CERT_CHAIN_CONTEXT

The CERT_CHAIN_CONTEXT structure contains an array of simple certificate chains and a trust status structure that indicates summary validity data on all of the connected simple chains.

public static class
WinCrypt.CERT_CHAIN_ELEMENT

The CERT_CHAIN_ELEMENT structure is a single element in a simple certificate chain.

public static class
WinCrypt.CERT_CHAIN_PARA

The CERT_CHAIN_PARA structure establishes the searching and matching criteria to be used in building a certificate chain.

public static class
WinCrypt.CERT_CHAIN_POLICY_PARA

The CERT_CHAIN_POLICY_PARA structure contains information used in CertVerifyCertificateChainPolicy to establish policy criteria for the verification of certificate chains.

public static class
WinCrypt.CERT_CHAIN_POLICY_STATUS

The CERT_CHAIN_POLICY_STATUS structure holds certificate chain status information returned by the CertVerifyCertificateChainPolicy function when the certificate chains are validated.

public static class
WinCrypt.CERT_CONTEXT

The CERT_CONTEXT structure contains both the encoded and decoded representations of a certificate.

public static class
WinCrypt.CERT_EXTENSION

The CERT_EXTENSION structure contains the extension information for a certificate, Certificate Revocation List (CRL) or Certificate Trust List (CTL).

public static class
WinCrypt.CERT_EXTENSIONS

The CERT_EXTENSIONS structure contains an array of extensions.

public static class
WinCrypt.CERT_INFO

The CERT_INFO structure contains the information of a certificate.

public static class
WinCrypt.CERT_PUBLIC_KEY_INFO

The CERT_PUBLIC_KEY_INFO structure contains a public key and its algorithm.

public static class
WinCrypt.CERT_REVOCATION_CRL_INFO

Contains information updated by a certificate revocation list (CRL) revocation type handler.

public static class
WinCrypt.CERT_REVOCATION_INFO

The CERT_REVOCATION_INFO structure indicates the revocation status of a certificate in a CERT_CHAIN_ELEMENT.

public static class
WinCrypt.CERT_SIMPLE_CHAIN

The CERT_SIMPLE_CHAIN structure contains an array of chain elements and a summary trust status for the chain that the array represents.

public static class
WinCrypt.CERT_STRONG_SIGN_PARA

Contains parameters used to check for strong signatures on certificates, certificate revocation lists (CRLs), online certificate status protocol (OCSP) responses, and PKCS #7 messages.

public static class
WinCrypt.CERT_STRONG_SIGN_SERIALIZED_INFO

Contains the signature algorithm/hash algorithm and public key algorithm/bit length pairs that can be used for strong signing.

public static class
WinCrypt.CERT_TRUST_LIST_INFO

The CERT_TRUST_LIST_INFO structure that indicates valid usage of a CTL.

public static class
WinCrypt.CERT_TRUST_STATUS

The CERT_TRUST_STATUS structure contains trust information about a certificate in a certificate chain, summary trust information about a simple chain of certificates, or summary information about an array of simple chains.

public static class
WinCrypt.CERT_USAGE_MATCH

The CERT_USAGE_MATCH structure provides criteria for identifying issuer certificates to be used to build a certificate chain.

public static class
public static class
WinCrypt.CRL_CONTEXT

The CRL_CONTEXT structure contains both the encoded and decoded representations of a certificate revocation list (CRL).

public static class
WinCrypt.CRL_ENTRY

The CRL_ENTRY structure contains information about a single revoked certificate.

public static class
WinCrypt.CRL_INFO

The CRL_INFO structure contains the information of a certificate revocation list (CRL).

public static class
WinCrypt.CRYPT_ALGORITHM_IDENTIFIER

The CRYPT_ALGORITHM_IDENTIFIER structure specifies an algorithm used to encrypt a private key.

public static class
WinCrypt.CRYPT_ATTRIBUTE

The CRYPT_ATTRIBUTE structure specifies an attribute that has one or more values.

public static class
WinCrypt.CRYPT_BIT_BLOB

The CRYPT_BIT_BLOB structure contains a set of bits represented by an array of bytes.

public static class
WinCrypt.CRYPT_KEY_PROV_INFO

The CRYPT_KEY_PROV_INFO structure contains information about a key container within a cryptographic service provider (CSP).

public static class
WinCrypt.CRYPT_KEY_PROV_PARAM

The CRYPT_KEY_PROV_PARAM structure contains information about a key container parameter.

public static class
WinCrypt.CRYPT_SIGN_MESSAGE_PARA

The CRYPT_SIGN_MESSAGE_PARA structure contains information for signing messages using a specified signing certificate context.

public static class
WinCrypt.CRYPT_VERIFY_MESSAGE_PARA

The CRYPT_VERIFY_MESSAGE_PARA structure contains information needed to verify signed messages.

public static interface
WinCrypt.CryptGetSignerCertificateCallback

The CryptGetSignerCertificateCallback user supplied callback function is used with the CRYPT_VERIFY_MESSAGE_PARA structure to get and verify a message signer's certificate.

public static class
WinCrypt.CRYPTPROTECT_PROMPTSTRUCT

The CRYPTPROTECT_PROMPTSTRUCT structure provides the text of a prompt and information about when and where that prompt is to be displayed when using the CryptProtectData and CryptUnprotectData functions.

public static class
WinCrypt.CTL_CONTEXT

The CTL_CONTEXT structure contains both the encoded and decoded representations of a CTL.

public static class
WinCrypt.CTL_ENTRY

The CTL_ENTRY structure is an element of a certificate trust list (CTL).

public static class
WinCrypt.CTL_INFO

The CTL_INFO structure contains the information stored in a Certificate Trust List (CTL).

public static class
WinCrypt.CTL_USAGE

The CTL_USAGE structure contains an array of object identifiers (OIDs) for Certificate Trust List (CTL) extensions.

public static class
WinCrypt.DATA_BLOB

The CryptoAPI CRYPTOAPI_BLOB structure is used for an arbitrary array of bytes.

public static class
WinCrypt.HCERTCHAINENGINE

Handle to a certificate chain engine.

public static class
WinCrypt.HCERTSTORE

Handle to a certificate store.

public static class
WinCrypt.HCRYPTMSG

Handle to a cryptographic message.

public static class

Field Summary

Modifier and TypeField and Description
public static final int
CERT_CHAIN_POLICY_BASE

Predefined verify chain policies.

public static final int
CERT_CLOSE_STORE_CHECK_FLAG

Forces the freeing of memory for all contexts associated with the store.

public static final int
CERT_CLOSE_STORE_FORCE_FLAG

Checks for nonfreed certificate, CRL, and CTL contexts.

public static final int
CERT_COMPARE_NAME_STR_W

Certificate comparison functions.

public static final int
CERT_COMPARE_SHIFT

Certificate comparison functions.

public static final int
CERT_FIND_SUBJECT_STR

Certificate comparison functions.

public static final int
CERT_FIND_SUBJECT_STR_W

Certificate comparison functions.

public static final int
CERT_INFO_SUBJECT_FLAG

Certificate comparison functions.

public static final int
CERT_OID_NAME_STR

Certificate name string type.

public static final int
CERT_QUERY_CONTENT_CERT

encoded single certificate

public static final int
CERT_QUERY_CONTENT_CERT_PAIR

an encoded CertificatePair (contains forward and/or reverse cross certs)

public static final int
CERT_QUERY_CONTENT_CRL

encoded single CRL

public static final int
CERT_QUERY_CONTENT_CTL

encoded single CTL

public static final int
CERT_QUERY_CONTENT_FLAG_ALL

content can be any type

public static final int
CERT_QUERY_CONTENT_FLAG_CERT

encoded single certificate

public static final int
CERT_QUERY_CONTENT_FLAG_CERT_PAIR

an encoded CertificatePair (contains forward and/or reverse cross certs)

public static final int
CERT_QUERY_CONTENT_FLAG_CRL

encoded single CRL

public static final int
CERT_QUERY_CONTENT_FLAG_CTL

encoded single CTL

public static final int
CERT_QUERY_CONTENT_FLAG_PFX

an encoded PFX BLOB

public static final int
CERT_QUERY_CONTENT_FLAG_PFX_AND_LOAD

an encoded PFX BLOB, and we do want to load it (not included in CERT_QUERY_CONTENT_FLAG_ALL

public static final int
public static final int
CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED

an encoded PKCS#7 signed message

public static final int
CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED

the content includes an embedded PKCS7 signed message

public static final int
CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED

an encoded PKCS#7 message.

public static final int
CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT

serialized single certificate

public static final int
public static final int
public static final int
public static final int
CERT_QUERY_CONTENT_PFX

an encoded PFX BLOB

public static final int
CERT_QUERY_CONTENT_PFX_AND_LOAD

an encoded PFX BLOB, which was loaded to phCertStore

public static final int
CERT_QUERY_CONTENT_PKCS10

an encoded PKCS#10

public static final int
CERT_QUERY_CONTENT_PKCS7_SIGNED

a PKCS#7 signed message

public static final int
CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED

a PKCS7 signed message embedded in a file

public static final int
CERT_QUERY_CONTENT_PKCS7_UNSIGNED

a PKCS#7 message, such as enveloped message.

public static final int
CERT_QUERY_CONTENT_SERIALIZED_CERT

serialized single certificate

public static final int
CERT_QUERY_CONTENT_SERIALIZED_CRL

serialized single CRL

public static final int
CERT_QUERY_CONTENT_SERIALIZED_CTL

serialized single CTL

public static final int
public static final int
CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED

the content is ascii hex encoded with "{ASN}" prefix

public static final int
CERT_QUERY_FORMAT_BASE64_ENCODED

the content is base64 encoded

public static final int
CERT_QUERY_FORMAT_BINARY

the content is in binary format

public static final int
CERT_QUERY_FORMAT_FLAG_ALL

the content can be of any format

public static final int
CERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED

the content is ascii hex encoded with "{ASN}" prefix

public static final int
CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED

the content is base64 encoded

public static final int
CERT_QUERY_FORMAT_FLAG_BINARY

the content is in binary format

public static final int
CERT_QUERY_OBJECT_BLOB

The object is stored in a structure in memory.

public static final int
CERT_QUERY_OBJECT_FILE

The object is stored in a file.

public static final int
CERT_SIMPLE_NAME_STR

Certificate name string type.

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
CERT_X500_NAME_STR

Certificate name string type.

public static final int
CERT_XML_NAME_STR

Certificate name string type.

public static final int
CRYPT_ASN_ENCODING

Message Encoding Type.

public static final int
CRYPT_E_ASN1_BADARGS

ASN.1 bad arguments to function call

public static final int
CRYPT_E_ASN1_BADPDU

ASN.1 function not supported for this PDU

public static final int
CRYPT_E_ASN1_BADREAL

ASN.1 bad real value

public static final int
CRYPT_E_ASN1_BADTAG

ASN.1 bad tag value met

public static final int
CRYPT_E_ASN1_CHOICE

ASN.1 bad choice value

public static final int
CRYPT_E_ASN1_CONSTRAINT

ASN.1 constraint violated

public static final int
CRYPT_E_ASN1_CORRUPT

ASN.1 corrupted data

public static final int
CRYPT_E_ASN1_EOD

ASN.1 unexpected end of data

public static final int
CRYPT_E_ASN1_ERROR

ASN.1 Certificate encode/decode return value base

public static final int
CRYPT_E_ASN1_EXTENDED

ASN.1 skipped unknown extensions

public static final int
CRYPT_E_ASN1_INTERNAL

ASN.1 internal encode or decode error

public static final int
CRYPT_E_ASN1_LARGE

ASN.1 value too large

public static final int
CRYPT_E_ASN1_MEMORY

ASN.1 out of memory

public static final int
CRYPT_E_ASN1_NOEOD

ASN.1 end of data expected

public static final int
CRYPT_E_ASN1_NYI

ASN.1 not yet implemented

public static final int
CRYPT_E_ASN1_OVERFLOW

ASN.1 buffer overflow

public static final int
CRYPT_E_ASN1_PDU_TYPE

ASN.1 bad PDU type

public static final int
CRYPT_E_ASN1_RULE

ASN.1 bad encoding rule

public static final int
CRYPT_E_ASN1_UTF8

ASN.1 bad Unicode (UTF8)

public static final int
CRYPT_EXPORTABLE

Imported keys are marked as exportable.

public static final int
CRYPT_MACHINE_KEYSET

The private keys are stored under the local computer and not under the current user.

public static final int
CRYPT_NDR_ENCODING

Message Encoding Type.

public static final int
CRYPT_USER_KEYSET

The private keys are stored under the current user and not under the local computer even if the PFX BLOB specifies that they should go into the local computer.

public static final int
CRYPT_USER_PROTECTED

The user is to be notified through a dialog box or other method when certain attempts to use this key are made.

public static final int
CRYPTPROTECT_AUDIT

Generate an Audit on protect and unprotect operations.

public static final int
CRYPTPROTECT_CRED_REGENERATE

Regenerate the local machine protection.

public static final int
CRYPTPROTECT_CRED_SYNC

Force credential synchronize during CryptProtectData() Synchronize is only operation that occurs during this operation.

public static final int
CRYPTPROTECT_LOCAL_MACHINE

Per machine protected data -- any user on machine where CryptProtectData took place may CryptUnprotectData.

public static final int
CRYPTPROTECT_NO_RECOVERY

Protect data with a non-recoverable key.

public static final int
public static final int
public static final int
CRYPTPROTECT_PROMPT_REQUIRE_STRONG

Require strong variant UI protection (user supplied password currently).

public static final int
CRYPTPROTECT_PROMPT_RESERVED

Reserved, don't use.

public static final int
CRYPTPROTECT_PROMPT_STRONG

Default to strong variant UI protection (user supplied password currently).

public static final int
CRYPTPROTECT_UI_FORBIDDEN

For remote-access situations where ui is not an option, if UI was specified on protect or unprotect operation, the call will fail and GetLastError() will indicate ERROR_PASSWORD_RESTRICTION.

public static final int
CRYPTPROTECT_VERIFY_PROTECTION

Verify the protection of a protected blob.

public static final WinCrypt.HCERTCHAINENGINE
HCCE_CURRENT_USER

Predefined certificate chain engine values.

public static final WinCrypt.HCERTCHAINENGINE
HCCE_LOCAL_MACHINE

Predefined certificate chain engine values.

public static final WinCrypt.HCERTCHAINENGINE
HCCE_SERIAL_LOCAL_MACHINE

Predefined certificate chain engine values.

public static final int
PKCS12_ALLOW_OVERWRITE_KEY

Allow overwrite of the existing key.

public static final int
PKCS12_ALWAYS_CNG_KSP

Indicates that the CNG KSP is always used.

public static final int
PKCS12_INCLUDE_EXTENDED_PROPERTIES

Import all extended properties on the certificate that were saved on the certificate when it was exported.

public static final int
PKCS12_NO_PERSIST_KEY

Do not persist the key.

public static final int
PKCS12_PREFER_CNG_KSP

Indicates that the CNG key storage provider (KSP) is preferred.

public static final int
PKCS_7_ASN_ENCODING

Message Encoding Type.

public static final int
PKCS_7_NDR_ENCODING

Message Encoding Type.

public static final int
PP_CLIENT_HWND

Set the window handle that the provider uses as the parent of any dialog boxes it creates.

public static final String
szOID_RSA_SHA1RSA

Algorithm object identifiers RSA.

public static final int
USAGE_MATCH_TYPE_AND

Determines the kind of issuer matching to be done.

public static final int
USAGE_MATCH_TYPE_OR

Determines the kind of issuer matching to be done.

public static final int
X509_ASN_ENCODING

Message Encoding Type.

public static final int
X509_NDR_ENCODING

Message Encoding Type.