PageRenderTime 56ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/unmaintained/cryptlib/libcl/libcl.factor

http://github.com/abeaumont/factor
Unknown | 1052 lines | 956 code | 96 blank | 0 comment | 0 complexity | 4dc46bc158b95efc691dc5a5b2c71918 MD5 | raw file
  1. ! Copyright (C) 2007 Elie CHAFTARI
  2. ! See http://factorcode.org/license.txt for BSD license.
  3. ! libs/cryptlib/libcl.factor
  4. ! Adapted from cryptlib.h
  5. ! Tested with cryptlib 3.3.1.0
  6. ! export LD_LIBRARY_PATH=/opt/local/lib
  7. USING: alien kernel system combinators alien.syntax ;
  8. IN: cryptlib.libcl
  9. << "libcl" {
  10. { [ win32? ] [ "cl32.dll" stdcall ] }
  11. { [ macosx? ] [ "libcl.dylib" cdecl ] }
  12. { [ unix? ] [ "libcl.so" cdecl ] }
  13. } cond add-library >>
  14. ! ===============================================
  15. ! Machine-dependant types
  16. ! ===============================================
  17. TYPEDEF: int C_RET
  18. ! ===============================================
  19. ! Algorithm and Object Types
  20. ! ===============================================
  21. ! Algorithm and mode types
  22. ! CRYPT_ALGO_TYPE
  23. : CRYPT_ALGO_NONE 0 ; inline ! No encryption
  24. : CRYPT_ALGO_DES 1 ; inline ! DES
  25. : CRYPT_ALGO_3DES 2 ; inline ! Triple DES
  26. : CRYPT_ALGO_IDEA 3 ; inline ! IDEA
  27. : CRYPT_ALGO_CAST 4 ; inline ! CAST-128
  28. : CRYPT_ALGO_RC2 5 ; inline ! RC2
  29. : CRYPT_ALGO_RC4 6 ; inline ! RC4
  30. : CRYPT_ALGO_RC5 7 ; inline ! RC5
  31. : CRYPT_ALGO_AES 8 ; inline ! AES
  32. : CRYPT_ALGO_BLOWFISH 9 ; inline ! Blowfish
  33. : CRYPT_ALGO_SKIPJACK 10 ; inline ! Skipjack
  34. : CRYPT_ALGO_DH 100 ; inline ! Diffie-Hellman
  35. : CRYPT_ALGO_RSA 101 ; inline ! RSA
  36. : CRYPT_ALGO_DSA 102 ; inline ! DSA
  37. : CRYPT_ALGO_ELGAMAL 103 ; inline ! ElGamal
  38. : CRYPT_ALGO_KEA 104 ; inline ! KEA
  39. : CRYPT_ALGO_ECDSA 105 ; inline ! ECDSA
  40. : CRYPT_ALGO_MD2 200 ; inline ! MD2
  41. : CRYPT_ALGO_MD4 201 ; inline ! MD4
  42. : CRYPT_ALGO_MD5 202 ; inline ! MD5
  43. : CRYPT_ALGO_SHA 203 ; inline ! SHA/SHA1
  44. : CRYPT_ALGO_RIPEMD160 204 ; inline ! RIPE-MD 160
  45. : CRYPT_ALGO_SHA2 205 ; inline ! SHA2 (SHA-256/384/512)
  46. : CRYPT_ALGO_HMAC_MD5 300 ; inline ! HMAC-MD5
  47. : CRYPT_ALGO_HMAC_SHA1 301 ; inline ! HMAC-SHA
  48. : CRYPT_ALGO_HMAC_SHA 301 ; inline ! Older form
  49. : CRYPT_ALGO_HMAC_RIPEMD160 302 ; inline ! HMAC-RIPEMD-160
  50. : CRYPT_ALGO_LAST 303 ; inline ! Last possible crypt algo value
  51. : CRYPT_ALGO_FIRST_CONVENTIONAL 1 ; inline
  52. : CRYPT_ALGO_LAST_CONVENTIONAL 99 ; inline
  53. : CRYPT_ALGO_FIRST_PKC 100 ; inline
  54. : CRYPT_ALGO_LAST_PKC 199 ; inline
  55. : CRYPT_ALGO_FIRST_HASH 200 ; inline
  56. : CRYPT_ALGO_LAST_HASH 299 ; inline
  57. : CRYPT_ALGO_FIRST_MAC 300 ; inline
  58. : CRYPT_ALGO_LAST_MAC 399 ; inline ! End of mac algo.range
  59. TYPEDEF: int CRYPT_ALGO_TYPE
  60. ! CRYPT_MODE_TYPE
  61. : CRYPT_MODE_NONE 0 ; inline ! No encryption mode
  62. : CRYPT_MODE_ECB 1 ; inline ! ECB
  63. : CRYPT_MODE_CBC 2 ; inline ! CBC
  64. : CRYPT_MODE_CFB 3 ; inline ! CFB
  65. : CRYPT_MODE_OFB 4 ; inline ! OFB
  66. : CRYPT_MODE_LAST 5 ; inline ! Last possible crypt mode value
  67. ! Keyset subtypes
  68. ! CRYPT_KEYSET_TYPE
  69. : CRYPT_KEYSET_NONE 0 ; inline ! No keyset type
  70. : CRYPT_KEYSET_FILE 1 ; inline ! Generic flat file keyset
  71. : CRYPT_KEYSET_HTTP 2 ; inline ! Web page containing cert/CRL
  72. : CRYPT_KEYSET_LDAP 3 ; inline ! LDAP directory service
  73. : CRYPT_KEYSET_ODBC 4 ; inline ! Generic ODBC interface
  74. : CRYPT_KEYSET_DATABASE 5 ; inline ! Generic RDBMS interface
  75. : CRYPT_KEYSET_PLUGIN 6 ; inline ! Generic database plugin
  76. : CRYPT_KEYSET_ODBC_STORE 7 ; inline ! ODBC certificate store
  77. : CRYPT_KEYSET_DATABASE_STORE 8 ; inline ! Database certificate store
  78. : CRYPT_KEYSET_PLUGIN_STORE 9 ; inline ! Database plugin certificate store
  79. : CRYPT_KEYSET_LAST 10 ; inline ! Last possible keyset type
  80. TYPEDEF: int CRYPT_KEYSET_TYPE
  81. ! Device subtypes
  82. ! CRYPT_DEVICE_TYPE
  83. : CRYPT_DEVICE_NONE 0 ; inline ! No crypto device
  84. : CRYPT_DEVICE_FORTEZZA 1 ; inline ! Fortezza card
  85. : CRYPT_DEVICE_PKCS11 2 ; inline ! PKCS #11 crypto token
  86. : CRYPT_DEVICE_CRYPTOAPI 3 ; inline ! Microsoft CryptoAPI
  87. : CRYPT_DEVICE_LAST 4 ; inline ! Last possible crypto device type
  88. ! Certificate subtypes
  89. ! CRYPT_CERTTYPE_TYPE
  90. : CRYPT_CERTTYPE_NONE 0 ; inline ! No certificate type
  91. : CRYPT_CERTTYPE_CERTIFICATE 1 ; inline ! Certificate
  92. : CRYPT_CERTTYPE_ATTRIBUTE_CERT 2 ; inline ! Attribute certificate
  93. : CRYPT_CERTTYPE_CERTCHAIN 3 ; inline ! PKCS #7 certificate chain
  94. : CRYPT_CERTTYPE_CERTREQUEST 4 ; inline ! PKCS #10 certification request
  95. : CRYPT_CERTTYPE_REQUEST_CERT 5 ; inline ! CRMF certification request
  96. : CRYPT_CERTTYPE_REQUEST_REVOCATION 6 ; inline ! CRMF revocation request
  97. : CRYPT_CERTTYPE_CRL 7 ; inline ! CRL
  98. : CRYPT_CERTTYPE_CMS_ATTRIBUTES 8 ; inline ! CMS attributes
  99. : CRYPT_CERTTYPE_RTCS_REQUEST 9 ; inline ! RTCS request
  100. : CRYPT_CERTTYPE_RTCS_RESPONSE 10 ; inline ! RTCS response
  101. : CRYPT_CERTTYPE_OCSP_REQUEST 11 ; inline ! OCSP request
  102. : CRYPT_CERTTYPE_OCSP_RESPONSE 12 ; inline ! OCSP response
  103. : CRYPT_CERTTYPE_PKIUSER 13 ; inline ! PKI user information
  104. : CRYPT_CERTTYPE_LAST 14 ; inline ! Last possible cert.type
  105. TYPEDEF: int CRYPT_CERTTYPE_TYPE
  106. ! Envelope/data format subtypes
  107. ! CRYPT_FORMAT_TYPE
  108. : CRYPT_FORMAT_NONE 0 ; inline ! No format type
  109. : CRYPT_FORMAT_AUTO 1 ; inline ! Deenv, auto-determine type
  110. : CRYPT_FORMAT_CRYPTLIB 2 ; inline ! cryptlib native format
  111. : CRYPT_FORMAT_CMS 3 ; inline ! PKCS #7 / CMS / S/MIME fmt.
  112. : CRYPT_FORMAT_PKCS7 3 ; inline
  113. : CRYPT_FORMAT_SMIME 4 ; inline ! As CMS with MSG-style behaviour
  114. : CRYPT_FORMAT_PGP 5 ; inline ! PGP format
  115. : CRYPT_FORMAT_LAST 6 ; inline ! Last possible format type
  116. TYPEDEF: int CRYPT_FORMAT_TYPE
  117. ! Session subtypes
  118. ! CRYPT_SESSION_TYPE
  119. : CRYPT_SESSION_NONE 0 ; inline ! No session type
  120. : CRYPT_SESSION_SSH 1 ; inline ! SSH
  121. : CRYPT_SESSION_SSH_SERVER 2 ; inline ! SSH server
  122. : CRYPT_SESSION_SSL 3 ; inline ! SSL/TLS
  123. : CRYPT_SESSION_SSL_SERVER 4 ; inline ! SSL/TLS server
  124. : CRYPT_SESSION_RTCS 5 ; inline ! RTCS
  125. : CRYPT_SESSION_RTCS_SERVER 6 ; inline ! RTCS server
  126. : CRYPT_SESSION_OCSP 7 ; inline ! OCSP
  127. : CRYPT_SESSION_OCSP_SERVER 8 ; inline ! OCSP server
  128. : CRYPT_SESSION_TSP 9 ; inline ! TSP
  129. : CRYPT_SESSION_TSP_SERVER 10 ; inline ! TSP server
  130. : CRYPT_SESSION_CMP 11 ; inline ! CMP
  131. : CRYPT_SESSION_CMP_SERVER 12 ; inline ! CMP server
  132. : CRYPT_SESSION_SCEP 13 ; inline ! SCEP
  133. : CRYPT_SESSION_SCEP_SERVER 14 ; inline ! SCEP server
  134. : CRYPT_SESSION_CERTSTORE_SERVER 15 ; inline ! HTTP cert store interface
  135. : CRYPT_SESSION_LAST 16 ; inline ! Last possible session type
  136. TYPEDEF: int CRYPT_SESSION_TYPE
  137. ! User subtypes
  138. ! CRYPT_USER_TYPE
  139. : CRYPT_USER_NONE 0 ; inline ! No user type
  140. : CRYPT_USER_NORMAL 1 ; inline ! Normal user
  141. : CRYPT_USER_SO 2 ; inline ! Security officer
  142. : CRYPT_USER_CA 3 ; inline ! CA user
  143. : CRYPT_USER_LAST 4 ; inline ! Last possible user type
  144. ! ===============================================
  145. ! Attribute Types
  146. ! ===============================================
  147. ! Attribute types. These are arranged in the following order:
  148. !
  149. ! PROPERTY - Object property
  150. ! ATTRIBUTE - Generic attributes
  151. ! OPTION - Global or object-specific config.option
  152. ! CTXINFO - Context-specific attribute
  153. ! CERTINFO - Certificate-specific attribute
  154. ! KEYINFO - Keyset-specific attribute
  155. ! DEVINFO - Device-specific attribute
  156. ! ENVINFO - Envelope-specific attribute
  157. ! SESSINFO - Session-specific attribute
  158. ! USERINFO - User-specific attribute
  159. ! CRYPT_ATTRIBUTE_TYPE
  160. : CRYPT_ATTRIBUTE_NONE 0 ; inline ! Non-value
  161. : CRYPT_PROPERTY_FIRST 1 ; inline ! *******************
  162. : CRYPT_PROPERTY_HIGHSECURITY 2 ; inline ! Owned+non-forwardcount+locked
  163. : CRYPT_PROPERTY_OWNER 3 ; inline ! Object owner
  164. : CRYPT_PROPERTY_FORWARDCOUNT 4 ; inline ! No.of times object can be forwarded
  165. : CRYPT_PROPERTY_LOCKED 5 ; inline ! Whether properties can be chged/read
  166. : CRYPT_PROPERTY_USAGECOUNT 6 ; inline ! Usage count before object expires
  167. : CRYPT_PROPERTY_NONEXPORTABLE 7 ; inline ! Whether key is nonexp.from context
  168. : CRYPT_PROPERTY_LAST 8 ; inline
  169. : CRYPT_GENERIC_FIRST 9 ; inline ! Extended error information
  170. : CRYPT_ATTRIBUTE_ERRORTYPE 10 ; inline ! Type of last error
  171. : CRYPT_ATTRIBUTE_ERRORLOCUS 11 ; inline ! Locus of last error
  172. : CRYPT_ATTRIBUTE_INT_ERRORCODE 12 ; inline ! Low-level software-specific
  173. : CRYPT_ATTRIBUTE_INT_ERRORMESSAGE 13 ; inline ! error code and message
  174. : CRYPT_ATTRIBUTE_CURRENT_GROUP 14 ; inline ! Cursor mgt: Group in attribute list
  175. : CRYPT_ATTRIBUTE_CURRENT 15 ; inline ! Cursor mgt: Entry in attribute list
  176. : CRYPT_ATTRIBUTE_CURRENT_INSTANCE 16 ; inline ! Cursor mgt: Instance in attribute list
  177. : CRYPT_ATTRIBUTE_BUFFERSIZE 17 ; inline ! Internal data buffer size
  178. : CRYPT_GENERIC_LAST 18 ; inline
  179. : CRYPT_OPTION_FIRST 100 ; inline ! **************************
  180. : CRYPT_OPTION_INFO_DESCRIPTION 101 ; inline ! Text description
  181. : CRYPT_OPTION_INFO_COPYRIGHT 102 ; inline ! Copyright notice
  182. : CRYPT_OPTION_INFO_MAJORVERSION 103 ; inline ! Major release version
  183. : CRYPT_OPTION_INFO_MINORVERSION 104 ; inline ! Minor release version
  184. : CRYPT_OPTION_INFO_STEPPING 105 ; inline ! Release stepping
  185. : CRYPT_OPTION_ENCR_ALGO 106 ; inline ! Encryption algorithm
  186. : CRYPT_OPTION_ENCR_HASH 107 ; inline ! Hash algorithm
  187. : CRYPT_OPTION_ENCR_MAC 108 ; inline ! MAC algorithm
  188. : CRYPT_OPTION_PKC_ALGO 109 ; inline ! Public-key encryption algorithm
  189. : CRYPT_OPTION_PKC_KEYSIZE 110 ; inline ! Public-key encryption key size
  190. : CRYPT_OPTION_SIG_ALGO 111 ; inline ! Signature algorithm
  191. : CRYPT_OPTION_SIG_KEYSIZE 112 ; inline ! Signature keysize
  192. : CRYPT_OPTION_KEYING_ALGO 113 ; inline ! Key processing algorithm
  193. : CRYPT_OPTION_KEYING_ITERATIONS 114 ; inline ! Key processing iterations
  194. : CRYPT_OPTION_CERT_SIGNUNRECOGNISEDATTRIBUTES 115 ; inline ! Whether to sign unrecog.attrs
  195. : CRYPT_OPTION_CERT_VALIDITY 116 ; inline ! Certificate validity period
  196. : CRYPT_OPTION_CERT_UPDATEINTERVAL 117 ; inline ! CRL update interval
  197. : CRYPT_OPTION_CERT_COMPLIANCELEVEL 118 ; inline ! PKIX compliance level for cert chks.
  198. : CRYPT_OPTION_CERT_REQUIREPOLICY 119 ; inline ! Whether explicit policy req'd for certs
  199. : CRYPT_OPTION_CMS_DEFAULTATTRIBUTES 120 ; inline ! Add default CMS attributes
  200. : CRYPT_OPTION_SMIME_DEFAULTATTRIBUTES 120 ; inline ! LDAP keyset options
  201. : CRYPT_OPTION_KEYS_LDAP_OBJECTCLASS 121 ; inline ! Object class
  202. : CRYPT_OPTION_KEYS_LDAP_OBJECTTYPE 122 ; inline ! Object type to fetch
  203. : CRYPT_OPTION_KEYS_LDAP_FILTER 123 ; inline ! Query filter
  204. : CRYPT_OPTION_KEYS_LDAP_CACERTNAME 124 ; inline ! CA certificate attribute name
  205. : CRYPT_OPTION_KEYS_LDAP_CERTNAME 125 ; inline ! Certificate attribute name
  206. : CRYPT_OPTION_KEYS_LDAP_CRLNAME 126 ; inline ! CRL attribute name
  207. : CRYPT_OPTION_KEYS_LDAP_EMAILNAME 127 ; inline ! Email attribute name
  208. : CRYPT_OPTION_DEVICE_PKCS11_DVR01 128 ; inline ! Name of first PKCS #11 driver
  209. : CRYPT_OPTION_DEVICE_PKCS11_DVR02 129 ; inline ! Name of second PKCS #11 driver
  210. : CRYPT_OPTION_DEVICE_PKCS11_DVR03 130 ; inline ! Name of third PKCS #11 driver
  211. : CRYPT_OPTION_DEVICE_PKCS11_DVR04 131 ; inline ! Name of fourth PKCS #11 driver
  212. : CRYPT_OPTION_DEVICE_PKCS11_DVR05 132 ; inline ! Name of fifth PKCS #11 driver
  213. : CRYPT_OPTION_DEVICE_PKCS11_HARDWAREONLY 133 ; inline ! Use only hardware mechanisms
  214. : CRYPT_OPTION_NET_SOCKS_SERVER 134 ; inline ! Socks server name
  215. : CRYPT_OPTION_NET_SOCKS_USERNAME 135 ; inline ! Socks user name
  216. : CRYPT_OPTION_NET_HTTP_PROXY 136 ; inline ! Web proxy server
  217. : CRYPT_OPTION_NET_CONNECTTIMEOUT 137 ; inline ! Timeout for network connection setup
  218. : CRYPT_OPTION_NET_READTIMEOUT 138 ; inline ! Timeout for network reads
  219. : CRYPT_OPTION_NET_WRITETIMEOUT 139 ; inline ! Timeout for network writes
  220. : CRYPT_OPTION_MISC_ASYNCINIT 140 ; inline ! Whether to init cryptlib async'ly
  221. : CRYPT_OPTION_MISC_SIDECHANNELPROTECTION 141 ; inline ! Protect against side-channel attacks
  222. : CRYPT_OPTION_CONFIGCHANGED 142 ; inline ! Whether in-mem.opts match on-disk ones
  223. : CRYPT_OPTION_SELFTESTOK 143 ; inline ! Whether self-test was completed and OK
  224. : CRYPT_OPTION_LAST 144 ; inline
  225. : CRYPT_CTXINFO_FIRST 1000 ; inline ! ********************
  226. : CRYPT_CTXINFO_ALGO 1001 ; inline ! Algorithm
  227. : CRYPT_CTXINFO_MODE 1002 ; inline ! Mode
  228. : CRYPT_CTXINFO_NAME_ALGO 1003 ; inline ! Algorithm name
  229. : CRYPT_CTXINFO_NAME_MODE 1004 ; inline ! Mode name
  230. : CRYPT_CTXINFO_KEYSIZE 1005 ; inline ! Key size in bytes
  231. : CRYPT_CTXINFO_BLOCKSIZE 1006 ; inline ! Block size
  232. : CRYPT_CTXINFO_IVSIZE 1007 ; inline ! IV size
  233. : CRYPT_CTXINFO_KEYING_ALGO 1008 ; inline ! Key processing algorithm
  234. : CRYPT_CTXINFO_KEYING_ITERATIONS 1009 ; inline ! Key processing iterations
  235. : CRYPT_CTXINFO_KEYING_SALT 1010 ; inline ! Key processing salt
  236. : CRYPT_CTXINFO_KEYING_VALUE 1011 ; inline ! Value used to derive key
  237. : CRYPT_CTXINFO_KEY 1012 ; inline ! Key
  238. : CRYPT_CTXINFO_KEY_COMPONENTS 1013 ; inline ! Public-key components
  239. : CRYPT_CTXINFO_IV 1014 ; inline ! IV
  240. : CRYPT_CTXINFO_HASHVALUE 1015 ; inline ! Hash value
  241. : CRYPT_CTXINFO_LABEL 1016 ; inline ! Label for private/secret key
  242. : CRYPT_CTXINFO_PERSISTENT 1017 ; inline ! Obj.is backed by device or keyset
  243. : CRYPT_CTXINFO_LAST 1018 ; inline
  244. : CRYPT_CERTINFO_FIRST 2000 ; inline ! ************************
  245. : CRYPT_CERTINFO_SELFSIGNED 2001 ; inline ! Cert is self-signed
  246. : CRYPT_CERTINFO_IMMUTABLE 2002 ; inline ! Cert is signed and immutable
  247. : CRYPT_CERTINFO_XYZZY 2003 ; inline ! Cert is a magic just-works cert
  248. : CRYPT_CERTINFO_CERTTYPE 2004 ; inline ! Certificate object type
  249. : CRYPT_CERTINFO_FINGERPRINT 2005 ; inline ! Certificate fingerprints
  250. : CRYPT_CERTINFO_FINGERPRINT_MD5 2005 ; inline
  251. : CRYPT_CERTINFO_FINGERPRINT_SHA 2006 ; inline
  252. : CRYPT_CERTINFO_CURRENT_CERTIFICATE 2007 ; inline ! Cursor mgt: Rel.pos in chain/CRL/OCSP
  253. : CRYPT_CERTINFO_TRUSTED_USAGE 2008 ; inline ! Usage that cert is trusted for
  254. : CRYPT_CERTINFO_TRUSTED_IMPLICIT 2009 ; inline ! Whether cert is implicitly trusted
  255. : CRYPT_CERTINFO_SIGNATURELEVEL 2010 ; inline ! Amount of detail to include in sigs.
  256. : CRYPT_CERTINFO_VERSION 2011 ; inline ! Cert.format version
  257. : CRYPT_CERTINFO_SERIALNUMBER 2012 ; inline ! Serial number
  258. : CRYPT_CERTINFO_SUBJECTPUBLICKEYINFO 2013 ; inline ! Public key
  259. : CRYPT_CERTINFO_CERTIFICATE 2014 ; inline ! User certificate
  260. : CRYPT_CERTINFO_USERCERTIFICATE 2014 ; inline
  261. : CRYPT_CERTINFO_CACERTIFICATE 2015 ; inline ! CA certificate
  262. : CRYPT_CERTINFO_ISSUERNAME 2016 ; inline ! Issuer DN
  263. : CRYPT_CERTINFO_VALIDFROM 2017 ; inline ! Cert valid-from time
  264. : CRYPT_CERTINFO_VALIDTO 2018 ; inline ! Cert valid-to time
  265. : CRYPT_CERTINFO_SUBJECTNAME 2019 ; inline ! Subject DN
  266. : CRYPT_CERTINFO_ISSUERUNIQUEID 2020 ; inline ! Issuer unique ID
  267. : CRYPT_CERTINFO_SUBJECTUNIQUEID 2021 ; inline ! Subject unique ID
  268. : CRYPT_CERTINFO_CERTREQUEST 2022 ; inline ! Cert.request (DN + public key)
  269. : CRYPT_CERTINFO_THISUPDATE 2023 ; inline ! CRL/OCSP current-update time
  270. : CRYPT_CERTINFO_NEXTUPDATE 2024 ; inline ! CRL/OCSP next-update time
  271. : CRYPT_CERTINFO_REVOCATIONDATE 2025 ; inline ! CRL/OCSP cert-revocation time
  272. : CRYPT_CERTINFO_REVOCATIONSTATUS 2026 ; inline ! OCSP revocation status
  273. : CRYPT_CERTINFO_CERTSTATUS 2027 ; inline ! RTCS certificate status
  274. : CRYPT_CERTINFO_DN 2028 ; inline ! Currently selected DN in string form
  275. : CRYPT_CERTINFO_PKIUSER_ID 2029 ; inline ! PKI user ID
  276. : CRYPT_CERTINFO_PKIUSER_ISSUEPASSWORD 2030 ; inline ! PKI user issue password
  277. : CRYPT_CERTINFO_PKIUSER_REVPASSWORD 2031 ; inline ! PKI user revocation password
  278. : CRYPT_CERTINFO_COUNTRYNAME 2100 ; inline ! countryName
  279. : CRYPT_CERTINFO_STATEORPROVINCENAME 2101 ; inline ! stateOrProvinceName
  280. : CRYPT_CERTINFO_LOCALITYNAME 2102 ; inline ! localityName
  281. : CRYPT_CERTINFO_ORGANIZATIONNAME 2103 ; inline ! organizationName
  282. : CRYPT_CERTINFO_ORGANISATIONNAME 2103 ; inline
  283. : CRYPT_CERTINFO_ORGANIZATIONALUNITNAME 2104 ; inline ! organizationalUnitName
  284. : CRYPT_CERTINFO_ORGANISATIONALUNITNAME 2104 ; inline
  285. : CRYPT_CERTINFO_COMMONNAME 2105 ; inline ! commonName
  286. : CRYPT_CERTINFO_OTHERNAME_TYPEID 2106 ; inline ! otherName.typeID
  287. : CRYPT_CERTINFO_OTHERNAME_VALUE 2107 ; inline ! otherName.value
  288. : CRYPT_CERTINFO_RFC822NAME 2108 ; inline ! rfc822Name
  289. : CRYPT_CERTINFO_EMAIL 2108 ; inline
  290. : CRYPT_CERTINFO_DNSNAME 2109 ; inline ! dNSName
  291. : CRYPT_CERTINFO_DIRECTORYNAME 2110 ; inline ! directoryName
  292. : CRYPT_CERTINFO_EDIPARTYNAME_NAMEASSIGNER 2111 ; inline ! ediPartyName.nameAssigner
  293. : CRYPT_CERTINFO_EDIPARTYNAME_PARTYNAME 2112 ; inline ! ediPartyName.partyName
  294. : CRYPT_CERTINFO_UNIFORMRESOURCEIDENTIFIER 2113 ; inline ! uniformResourceIdentifier
  295. : CRYPT_CERTINFO_IPADDRESS 2114 ; inline ! iPAddress
  296. : CRYPT_CERTINFO_REGISTEREDID 2115 ; inline ! registeredID
  297. : CRYPT_CERTINFO_CHALLENGEPASSWORD 2200 ; inline ! 1 3 6 1 4 1 3029 3 1 4 cRLExtReason
  298. : CRYPT_CERTINFO_CRLEXTREASON 2201 ; inline ! 1 3 6 1 4 1 3029 3 1 5 keyFeatures
  299. : CRYPT_CERTINFO_KEYFEATURES 2202 ; inline ! 1 3 6 1 5 5 7 1 1 authorityInfoAccess
  300. : CRYPT_CERTINFO_AUTHORITYINFOACCESS 2203 ; inline
  301. : CRYPT_CERTINFO_AUTHORITYINFO_RTCS 2204 ; inline ! accessDescription.accessLocation
  302. : CRYPT_CERTINFO_AUTHORITYINFO_OCSP 2205 ; inline ! accessDescription.accessLocation
  303. : CRYPT_CERTINFO_AUTHORITYINFO_CAISSUERS 2206 ; inline ! accessDescription.accessLocation
  304. : CRYPT_CERTINFO_AUTHORITYINFO_CERTSTORE 2207 ; inline ! accessDescription.accessLocation
  305. : CRYPT_CERTINFO_AUTHORITYINFO_CRLS 2208 ; inline ! accessDescription.accessLocation
  306. : CRYPT_CERTINFO_BIOMETRICINFO 2209 ; inline
  307. : CRYPT_CERTINFO_BIOMETRICINFO_TYPE 2210 ; inline ! biometricData.typeOfData
  308. : CRYPT_CERTINFO_BIOMETRICINFO_HASHALGO 2211 ; inline ! biometricData.hashAlgorithm
  309. : CRYPT_CERTINFO_BIOMETRICINFO_HASH 2212 ; inline ! biometricData.dataHash
  310. : CRYPT_CERTINFO_BIOMETRICINFO_URL 2213 ; inline ! biometricData.sourceDataUri
  311. : CRYPT_CERTINFO_QCSTATEMENT 2214 ; inline
  312. : CRYPT_CERTINFO_QCSTATEMENT_SEMANTICS 2215 ; inline ! qcStatement.statementInfo.semanticsIdentifier
  313. : CRYPT_CERTINFO_QCSTATEMENT_REGISTRATIONAUTHORITY 2216 ; inline ! qcStatement.statementInfo.nameRegistrationAuthorities
  314. : CRYPT_CERTINFO_OCSP_NONCE 2217 ; inline ! nonce
  315. : CRYPT_CERTINFO_OCSP_RESPONSE 2218 ; inline
  316. : CRYPT_CERTINFO_OCSP_RESPONSE_OCSP 2219 ; inline ! OCSP standard response
  317. : CRYPT_CERTINFO_OCSP_NOCHECK 2220 ; inline ! 1 3 6 1 5 5 7 48 1 6 ocspArchiveCutoff
  318. : CRYPT_CERTINFO_OCSP_ARCHIVECUTOFF 2221 ; inline ! 1 3 6 1 5 5 7 48 1 11 subjectInfoAccess
  319. : CRYPT_CERTINFO_SUBJECTINFOACCESS 2222 ; inline
  320. : CRYPT_CERTINFO_SUBJECTINFO_CAREPOSITORY 2223 ; inline ! accessDescription.accessLocation
  321. : CRYPT_CERTINFO_SUBJECTINFO_TIMESTAMPING 2224 ; inline ! accessDescription.accessLocation
  322. : CRYPT_CERTINFO_SIGG_DATEOFCERTGEN 2225 ; inline ! 1 3 36 8 3 2 siggProcuration
  323. : CRYPT_CERTINFO_SIGG_PROCURATION 2226 ; inline
  324. : CRYPT_CERTINFO_SIGG_PROCURE_COUNTRY 2227 ; inline ! country
  325. : CRYPT_CERTINFO_SIGG_PROCURE_TYPEOFSUBSTITUTION 2228 ; inline ! typeOfSubstitution
  326. : CRYPT_CERTINFO_SIGG_PROCURE_SIGNINGFOR 2229 ; inline ! signingFor.thirdPerson
  327. : CRYPT_CERTINFO_SIGG_MONETARYLIMIT 2230 ; inline
  328. : CRYPT_CERTINFO_SIGG_MONETARY_CURRENCY 2231 ; inline ! currency
  329. : CRYPT_CERTINFO_SIGG_MONETARY_AMOUNT 2232 ; inline ! amount
  330. : CRYPT_CERTINFO_SIGG_MONETARY_EXPONENT 2233 ; inline ! exponent
  331. : CRYPT_CERTINFO_SIGG_RESTRICTION 2234 ; inline ! 1 3 101 1 4 1 strongExtranet
  332. : CRYPT_CERTINFO_STRONGEXTRANET 2235 ; inline
  333. : CRYPT_CERTINFO_STRONGEXTRANET_ZONE 2236 ; inline ! sxNetIDList.sxNetID.zone
  334. : CRYPT_CERTINFO_STRONGEXTRANET_ID 2237 ; inline ! sxNetIDList.sxNetID.id
  335. : CRYPT_CERTINFO_SUBJECTDIRECTORYATTRIBUTES 2238 ; inline
  336. : CRYPT_CERTINFO_SUBJECTDIR_TYPE 2239 ; inline ! attribute.type
  337. : CRYPT_CERTINFO_SUBJECTDIR_VALUES 2240 ; inline ! attribute.values
  338. : CRYPT_CERTINFO_SUBJECTKEYIDENTIFIER 2241 ; inline ! 2 5 29 15 keyUsage
  339. : CRYPT_CERTINFO_KEYUSAGE 2242 ; inline ! 2 5 29 16 privateKeyUsagePeriod
  340. : CRYPT_CERTINFO_PRIVATEKEYUSAGEPERIOD 2243 ; inline
  341. : CRYPT_CERTINFO_PRIVATEKEY_NOTBEFORE 2244 ; inline ! notBefore
  342. : CRYPT_CERTINFO_PRIVATEKEY_NOTAFTER 2245 ; inline ! notAfter
  343. : CRYPT_CERTINFO_SUBJECTALTNAME 2246 ; inline ! 2 5 29 18 issuerAltName
  344. : CRYPT_CERTINFO_ISSUERALTNAME 2247 ; inline ! 2 5 29 19 basicConstraints
  345. : CRYPT_CERTINFO_BASICCONSTRAINTS 2248 ; inline
  346. : CRYPT_CERTINFO_CA 2249 ; inline ! cA
  347. : CRYPT_CERTINFO_AUTHORITY 2249 ; inline
  348. : CRYPT_CERTINFO_PATHLENCONSTRAINT 2250 ; inline ! pathLenConstraint
  349. : CRYPT_CERTINFO_CRLNUMBER 2251 ; inline ! 2 5 29 21 cRLReason
  350. : CRYPT_CERTINFO_CRLREASON 2252 ; inline ! 2 5 29 23 holdInstructionCode
  351. : CRYPT_CERTINFO_HOLDINSTRUCTIONCODE 2253 ; inline ! 2 5 29 24 invalidityDate
  352. : CRYPT_CERTINFO_INVALIDITYDATE 2254 ; inline ! 2 5 29 27 deltaCRLIndicator
  353. : CRYPT_CERTINFO_DELTACRLINDICATOR 2255 ; inline ! 2 5 29 28 issuingDistributionPoint
  354. : CRYPT_CERTINFO_ISSUINGDISTRIBUTIONPOINT 2256 ; inline
  355. : CRYPT_CERTINFO_ISSUINGDIST_FULLNAME 2257 ; inline ! distributionPointName.fullName
  356. : CRYPT_CERTINFO_ISSUINGDIST_USERCERTSONLY 2258 ; inline ! onlyContainsUserCerts
  357. : CRYPT_CERTINFO_ISSUINGDIST_CACERTSONLY 2259 ; inline ! onlyContainsCACerts
  358. : CRYPT_CERTINFO_ISSUINGDIST_SOMEREASONSONLY 2260 ; inline ! onlySomeReasons
  359. : CRYPT_CERTINFO_ISSUINGDIST_INDIRECTCRL 2261 ; inline ! indirectCRL
  360. : CRYPT_CERTINFO_CERTIFICATEISSUER 2262 ; inline ! 2 5 29 30 nameConstraints
  361. : CRYPT_CERTINFO_NAMECONSTRAINTS 2263 ; inline
  362. : CRYPT_CERTINFO_PERMITTEDSUBTREES 2264 ; inline ! permittedSubtrees
  363. : CRYPT_CERTINFO_EXCLUDEDSUBTREES 2265 ; inline ! excludedSubtrees
  364. : CRYPT_CERTINFO_CRLDISTRIBUTIONPOINT 2266 ; inline
  365. : CRYPT_CERTINFO_CRLDIST_FULLNAME 2267 ; inline ! distributionPointName.fullName
  366. : CRYPT_CERTINFO_CRLDIST_REASONS 2268 ; inline ! reasons
  367. : CRYPT_CERTINFO_CRLDIST_CRLISSUER 2269 ; inline ! cRLIssuer
  368. : CRYPT_CERTINFO_CERTIFICATEPOLICIES 2270 ; inline
  369. : CRYPT_CERTINFO_CERTPOLICYID 2271 ; inline ! policyInformation.policyIdentifier
  370. : CRYPT_CERTINFO_CERTPOLICY_CPSURI 2272 ; inline ! policyInformation.policyQualifiers.qualifier.cPSuri
  371. : CRYPT_CERTINFO_CERTPOLICY_ORGANIZATION 2273 ; inline ! policyInformation.policyQualifiers.qualifier.userNotice.noticeRef.organization
  372. : CRYPT_CERTINFO_CERTPOLICY_NOTICENUMBERS 2274 ; inline ! policyInformation.policyQualifiers.qualifier.userNotice.noticeRef.noticeNumbers
  373. : CRYPT_CERTINFO_CERTPOLICY_EXPLICITTEXT 2275 ; inline ! policyInformation.policyQualifiers.qualifier.userNotice.explicitText
  374. : CRYPT_CERTINFO_POLICYMAPPINGS 2276 ; inline
  375. : CRYPT_CERTINFO_ISSUERDOMAINPOLICY 2277 ; inline ! policyMappings.issuerDomainPolicy
  376. : CRYPT_CERTINFO_SUBJECTDOMAINPOLICY 2278 ; inline ! policyMappings.subjectDomainPolicy
  377. : CRYPT_CERTINFO_AUTHORITYKEYIDENTIFIER 2279 ; inline
  378. : CRYPT_CERTINFO_AUTHORITY_KEYIDENTIFIER 2280 ; inline ! keyIdentifier
  379. : CRYPT_CERTINFO_AUTHORITY_CERTISSUER 2281 ; inline ! authorityCertIssuer
  380. : CRYPT_CERTINFO_AUTHORITY_CERTSERIALNUMBER 2282 ; inline ! authorityCertSerialNumber
  381. : CRYPT_CERTINFO_POLICYCONSTRAINTS 2283 ; inline
  382. : CRYPT_CERTINFO_REQUIREEXPLICITPOLICY 2284 ; inline ! policyConstraints.requireExplicitPolicy
  383. : CRYPT_CERTINFO_INHIBITPOLICYMAPPING 2285 ; inline ! policyConstraints.inhibitPolicyMapping
  384. : CRYPT_CERTINFO_EXTKEYUSAGE 2286 ; inline
  385. : CRYPT_CERTINFO_EXTKEY_MS_INDIVIDUALCODESIGNING 2287 ; inline ! individualCodeSigning
  386. : CRYPT_CERTINFO_EXTKEY_MS_COMMERCIALCODESIGNING 2288 ; inline ! commercialCodeSigning
  387. : CRYPT_CERTINFO_EXTKEY_MS_CERTTRUSTLISTSIGNING 2289 ; inline ! certTrustListSigning
  388. : CRYPT_CERTINFO_EXTKEY_MS_TIMESTAMPSIGNING 2290 ; inline ! timeStampSigning
  389. : CRYPT_CERTINFO_EXTKEY_MS_SERVERGATEDCRYPTO 2291 ; inline ! serverGatedCrypto
  390. : CRYPT_CERTINFO_EXTKEY_MS_ENCRYPTEDFILESYSTEM 2292 ; inline ! encrypedFileSystem
  391. : CRYPT_CERTINFO_EXTKEY_SERVERAUTH 2293 ; inline ! serverAuth
  392. : CRYPT_CERTINFO_EXTKEY_CLIENTAUTH 2294 ; inline ! clientAuth
  393. : CRYPT_CERTINFO_EXTKEY_CODESIGNING 2295 ; inline ! codeSigning
  394. : CRYPT_CERTINFO_EXTKEY_EMAILPROTECTION 2296 ; inline ! emailProtection
  395. : CRYPT_CERTINFO_EXTKEY_IPSECENDSYSTEM 2297 ; inline ! ipsecEndSystem
  396. : CRYPT_CERTINFO_EXTKEY_IPSECTUNNEL 2298 ; inline ! ipsecTunnel
  397. : CRYPT_CERTINFO_EXTKEY_IPSECUSER 2299 ; inline ! ipsecUser
  398. : CRYPT_CERTINFO_EXTKEY_TIMESTAMPING 2300 ; inline ! timeStamping
  399. : CRYPT_CERTINFO_EXTKEY_OCSPSIGNING 2301 ; inline ! ocspSigning
  400. : CRYPT_CERTINFO_EXTKEY_DIRECTORYSERVICE 2302 ; inline ! directoryService
  401. : CRYPT_CERTINFO_EXTKEY_ANYKEYUSAGE 2303 ; inline ! anyExtendedKeyUsage
  402. : CRYPT_CERTINFO_EXTKEY_NS_SERVERGATEDCRYPTO 2304 ; inline ! serverGatedCrypto
  403. : CRYPT_CERTINFO_EXTKEY_VS_SERVERGATEDCRYPTO_CA 2305 ; inline ! serverGatedCrypto CA
  404. : CRYPT_CERTINFO_FRESHESTCRL 2306 ; inline
  405. : CRYPT_CERTINFO_FRESHESTCRL_FULLNAME 2307 ; inline ! distributionPointName.fullName
  406. : CRYPT_CERTINFO_FRESHESTCRL_REASONS 2308 ; inline ! reasons
  407. : CRYPT_CERTINFO_FRESHESTCRL_CRLISSUER 2309 ; inline ! cRLIssuer
  408. : CRYPT_CERTINFO_INHIBITANYPOLICY 2310 ; inline ! 2 16 840 1 113730 1 x Netscape extensions
  409. : CRYPT_CERTINFO_NS_CERTTYPE 2311 ; inline ! netscape-cert-type
  410. : CRYPT_CERTINFO_NS_BASEURL 2312 ; inline ! netscape-base-url
  411. : CRYPT_CERTINFO_NS_REVOCATIONURL 2313 ; inline ! netscape-revocation-url
  412. : CRYPT_CERTINFO_NS_CAREVOCATIONURL 2314 ; inline ! netscape-ca-revocation-url
  413. : CRYPT_CERTINFO_NS_CERTRENEWALURL 2315 ; inline ! netscape-cert-renewal-url
  414. : CRYPT_CERTINFO_NS_CAPOLICYURL 2316 ; inline ! netscape-ca-policy-url
  415. : CRYPT_CERTINFO_NS_SSLSERVERNAME 2317 ; inline ! netscape-ssl-server-name
  416. : CRYPT_CERTINFO_NS_COMMENT 2318 ; inline ! netscape-comment
  417. : CRYPT_CERTINFO_SET_HASHEDROOTKEY 2319 ; inline
  418. : CRYPT_CERTINFO_SET_ROOTKEYTHUMBPRINT 2320 ; inline ! rootKeyThumbPrint
  419. : CRYPT_CERTINFO_SET_CERTIFICATETYPE 2321 ; inline ! 2 23 42 7 2 SET merchantData
  420. : CRYPT_CERTINFO_SET_MERCHANTDATA 2322 ; inline
  421. : CRYPT_CERTINFO_SET_MERID 2323 ; inline ! merID
  422. : CRYPT_CERTINFO_SET_MERACQUIRERBIN 2324 ; inline ! merAcquirerBIN
  423. : CRYPT_CERTINFO_SET_MERCHANTLANGUAGE 2325 ; inline ! merNames.language
  424. : CRYPT_CERTINFO_SET_MERCHANTNAME 2326 ; inline ! merNames.name
  425. : CRYPT_CERTINFO_SET_MERCHANTCITY 2327 ; inline ! merNames.city
  426. : CRYPT_CERTINFO_SET_MERCHANTSTATEPROVINCE 2328 ; inline ! merNames.stateProvince
  427. : CRYPT_CERTINFO_SET_MERCHANTPOSTALCODE 2329 ; inline ! merNames.postalCode
  428. : CRYPT_CERTINFO_SET_MERCHANTCOUNTRYNAME 2330 ; inline ! merNames.countryName
  429. : CRYPT_CERTINFO_SET_MERCOUNTRY 2331 ; inline ! merCountry
  430. : CRYPT_CERTINFO_SET_MERAUTHFLAG 2332 ; inline ! merAuthFlag
  431. : CRYPT_CERTINFO_SET_CERTCARDREQUIRED 2333 ; inline ! 2 23 42 7 4 SET tunneling
  432. : CRYPT_CERTINFO_SET_TUNNELING 2334 ; inline
  433. : CRYPT_CERTINFO_SET_TUNNELLING 2334 ; inline
  434. : CRYPT_CERTINFO_SET_TUNNELINGFLAG 2335 ; inline ! tunneling
  435. : CRYPT_CERTINFO_SET_TUNNELLINGFLAG 2335 ; inline
  436. : CRYPT_CERTINFO_SET_TUNNELINGALGID 2336 ; inline ! tunnelingAlgID
  437. : CRYPT_CERTINFO_SET_TUNNELLINGALGID 2336 ; inline ! S/MIME attributes
  438. : CRYPT_CERTINFO_CMS_CONTENTTYPE 2500 ; inline ! 1 2 840 113549 1 9 4 messageDigest
  439. : CRYPT_CERTINFO_CMS_MESSAGEDIGEST 2501 ; inline ! 1 2 840 113549 1 9 5 signingTime
  440. : CRYPT_CERTINFO_CMS_SIGNINGTIME 2502 ; inline ! 1 2 840 113549 1 9 6 counterSignature
  441. : CRYPT_CERTINFO_CMS_COUNTERSIGNATURE 2503 ; inline ! counterSignature
  442. : CRYPT_CERTINFO_CMS_SIGNINGDESCRIPTION 2504 ; inline ! 1 2 840 113549 1 9 15 sMIMECapabilities
  443. : CRYPT_CERTINFO_CMS_SMIMECAPABILITIES 2505 ; inline
  444. : CRYPT_CERTINFO_CMS_SMIMECAP_3DES 2506 ; inline ! 3DES encryption
  445. : CRYPT_CERTINFO_CMS_SMIMECAP_AES 2507 ; inline ! AES encryption
  446. : CRYPT_CERTINFO_CMS_SMIMECAP_CAST128 2508 ; inline ! CAST-128 encryption
  447. : CRYPT_CERTINFO_CMS_SMIMECAP_IDEA 2509 ; inline ! IDEA encryption
  448. : CRYPT_CERTINFO_CMS_SMIMECAP_RC2 2510 ; inline ! RC2 encryption (w.128 key)
  449. : CRYPT_CERTINFO_CMS_SMIMECAP_RC5 2511 ; inline ! RC5 encryption (w.128 key)
  450. : CRYPT_CERTINFO_CMS_SMIMECAP_SKIPJACK 2512 ; inline ! Skipjack encryption
  451. : CRYPT_CERTINFO_CMS_SMIMECAP_DES 2513 ; inline ! DES encryption
  452. : CRYPT_CERTINFO_CMS_SMIMECAP_PREFERSIGNEDDATA 2514 ; inline ! preferSignedData
  453. : CRYPT_CERTINFO_CMS_SMIMECAP_CANNOTDECRYPTANY 2515 ; inline ! canNotDecryptAny
  454. : CRYPT_CERTINFO_CMS_RECEIPTREQUEST 2516 ; inline
  455. : CRYPT_CERTINFO_CMS_RECEIPT_CONTENTIDENTIFIER 2517 ; inline ! contentIdentifier
  456. : CRYPT_CERTINFO_CMS_RECEIPT_FROM 2518 ; inline ! receiptsFrom
  457. : CRYPT_CERTINFO_CMS_RECEIPT_TO 2519 ; inline ! receiptsTo
  458. : CRYPT_CERTINFO_CMS_SECURITYLABEL 2520 ; inline
  459. : CRYPT_CERTINFO_CMS_SECLABEL_POLICY 2521 ; inline ! securityPolicyIdentifier
  460. : CRYPT_CERTINFO_CMS_SECLABEL_CLASSIFICATION 2522 ; inline ! securityClassification
  461. : CRYPT_CERTINFO_CMS_SECLABEL_PRIVACYMARK 2523 ; inline ! privacyMark
  462. : CRYPT_CERTINFO_CMS_SECLABEL_CATTYPE 2524 ; inline ! securityCategories.securityCategory.type
  463. : CRYPT_CERTINFO_CMS_SECLABEL_CATVALUE 2525 ; inline ! securityCategories.securityCategory.value
  464. : CRYPT_CERTINFO_CMS_MLEXPANSIONHISTORY 2526 ; inline
  465. : CRYPT_CERTINFO_CMS_MLEXP_ENTITYIDENTIFIER 2527 ; inline ! mlData.mailListIdentifier.issuerAndSerialNumber
  466. : CRYPT_CERTINFO_CMS_MLEXP_TIME 2528 ; inline ! mlData.expansionTime
  467. : CRYPT_CERTINFO_CMS_MLEXP_NONE 2529 ; inline ! mlData.mlReceiptPolicy.none
  468. : CRYPT_CERTINFO_CMS_MLEXP_INSTEADOF 2530 ; inline ! mlData.mlReceiptPolicy.insteadOf.generalNames.generalName
  469. : CRYPT_CERTINFO_CMS_MLEXP_INADDITIONTO 2531 ; inline ! mlData.mlReceiptPolicy.inAdditionTo.generalNames.generalName
  470. : CRYPT_CERTINFO_CMS_CONTENTHINTS 2532 ; inline
  471. : CRYPT_CERTINFO_CMS_CONTENTHINT_DESCRIPTION 2533 ; inline ! contentDescription
  472. : CRYPT_CERTINFO_CMS_CONTENTHINT_TYPE 2534 ; inline ! contentType
  473. : CRYPT_CERTINFO_CMS_EQUIVALENTLABEL 2535 ; inline
  474. : CRYPT_CERTINFO_CMS_EQVLABEL_POLICY 2536 ; inline ! securityPolicyIdentifier
  475. : CRYPT_CERTINFO_CMS_EQVLABEL_CLASSIFICATION 2537 ; inline ! securityClassification
  476. : CRYPT_CERTINFO_CMS_EQVLABEL_PRIVACYMARK 2538 ; inline ! privacyMark
  477. : CRYPT_CERTINFO_CMS_EQVLABEL_CATTYPE 2539 ; inline ! securityCategories.securityCategory.type
  478. : CRYPT_CERTINFO_CMS_EQVLABEL_CATVALUE 2540 ; inline ! securityCategories.securityCategory.value
  479. : CRYPT_CERTINFO_CMS_SIGNINGCERTIFICATE 2541 ; inline
  480. : CRYPT_CERTINFO_CMS_SIGNINGCERT_ESSCERTID 2542 ; inline ! certs.essCertID
  481. : CRYPT_CERTINFO_CMS_SIGNINGCERT_POLICIES 2543 ; inline ! policies.policyInformation.policyIdentifier
  482. : CRYPT_CERTINFO_CMS_SIGNATUREPOLICYID 2544 ; inline
  483. : CRYPT_CERTINFO_CMS_SIGPOLICYID 2545 ; inline ! sigPolicyID
  484. : CRYPT_CERTINFO_CMS_SIGPOLICYHASH 2546 ; inline ! sigPolicyHash
  485. : CRYPT_CERTINFO_CMS_SIGPOLICY_CPSURI 2547 ; inline ! sigPolicyQualifiers.sigPolicyQualifier.cPSuri
  486. : CRYPT_CERTINFO_CMS_SIGPOLICY_ORGANIZATION 2548 ; inline ! sigPolicyQualifiers.sigPolicyQualifier.userNotice.noticeRef.organization
  487. : CRYPT_CERTINFO_CMS_SIGPOLICY_NOTICENUMBERS 2549 ; inline ! sigPolicyQualifiers.sigPolicyQualifier.userNotice.noticeRef.noticeNumbers
  488. : CRYPT_CERTINFO_CMS_SIGPOLICY_EXPLICITTEXT 2550 ; inline ! sigPolicyQualifiers.sigPolicyQualifier.userNotice.explicitText
  489. : CRYPT_CERTINFO_CMS_SIGTYPEIDENTIFIER 2551 ; inline
  490. : CRYPT_CERTINFO_CMS_SIGTYPEID_ORIGINATORSIG 2552 ; inline ! originatorSig
  491. : CRYPT_CERTINFO_CMS_SIGTYPEID_DOMAINSIG 2553 ; inline ! domainSig
  492. : CRYPT_CERTINFO_CMS_SIGTYPEID_ADDITIONALATTRIBUTES 2554 ; inline ! additionalAttributesSig
  493. : CRYPT_CERTINFO_CMS_SIGTYPEID_REVIEWSIG 2555 ; inline ! reviewSig
  494. : CRYPT_CERTINFO_CMS_NONCE 2556 ; inline ! randomNonce
  495. : CRYPT_CERTINFO_SCEP_MESSAGETYPE 2557 ; inline ! messageType
  496. : CRYPT_CERTINFO_SCEP_PKISTATUS 2558 ; inline ! pkiStatus
  497. : CRYPT_CERTINFO_SCEP_FAILINFO 2559 ; inline ! failInfo
  498. : CRYPT_CERTINFO_SCEP_SENDERNONCE 2560 ; inline ! senderNonce
  499. : CRYPT_CERTINFO_SCEP_RECIPIENTNONCE 2561 ; inline ! recipientNonce
  500. : CRYPT_CERTINFO_SCEP_TRANSACTIONID 2562 ; inline ! transID
  501. : CRYPT_CERTINFO_CMS_SPCAGENCYINFO 2563 ; inline
  502. : CRYPT_CERTINFO_CMS_SPCAGENCYURL 2564 ; inline ! spcAgencyInfo.url
  503. : CRYPT_CERTINFO_CMS_SPCSTATEMENTTYPE 2565 ; inline
  504. : CRYPT_CERTINFO_CMS_SPCSTMT_INDIVIDUALCODESIGNING 2566 ; inline ! individualCodeSigning
  505. : CRYPT_CERTINFO_CMS_SPCSTMT_COMMERCIALCODESIGNING 2567 ; inline ! commercialCodeSigning
  506. : CRYPT_CERTINFO_CMS_SPCOPUSINFO 2568 ; inline
  507. : CRYPT_CERTINFO_CMS_SPCOPUSINFO_NAME 2569 ; inline ! spcOpusInfo.name
  508. : CRYPT_CERTINFO_CMS_SPCOPUSINFO_URL 2570 ; inline ! spcOpusInfo.url
  509. : CRYPT_CERTINFO_LAST 2571 ; inline
  510. : CRYPT_KEYINFO_FIRST 3000 ; inline ! *******************
  511. : CRYPT_KEYINFO_QUERY 3001 ; inline ! Keyset query
  512. : CRYPT_KEYINFO_QUERY_REQUESTS 3002 ; inline ! Query of requests in cert store
  513. : CRYPT_KEYINFO_LAST 3003 ; inline
  514. : CRYPT_DEVINFO_FIRST 4000 ; inline ! *******************
  515. : CRYPT_DEVINFO_INITIALISE 4001 ; inline ! Initialise device for use
  516. : CRYPT_DEVINFO_INITIALIZE 4001 ; inline
  517. : CRYPT_DEVINFO_AUTHENT_USER 4002 ; inline ! Authenticate user to device
  518. : CRYPT_DEVINFO_AUTHENT_SUPERVISOR 4003 ; inline ! Authenticate supervisor to dev.
  519. : CRYPT_DEVINFO_SET_AUTHENT_USER 4004 ; inline ! Set user authent.value
  520. : CRYPT_DEVINFO_SET_AUTHENT_SUPERVISOR 4005 ; inline ! Set supervisor auth.val.
  521. : CRYPT_DEVINFO_ZEROISE 4006 ; inline ! Zeroise device
  522. : CRYPT_DEVINFO_ZEROIZE 4006 ; inline
  523. : CRYPT_DEVINFO_LOGGEDIN 4007 ; inline ! Whether user is logged in
  524. : CRYPT_DEVINFO_LABEL 4008 ; inline ! Device/token label
  525. : CRYPT_DEVINFO_LAST 4009 ; inline
  526. : CRYPT_ENVINFO_FIRST 5000 ; inline ! *********************
  527. : CRYPT_ENVINFO_DATASIZE 5001 ; inline ! Data size information
  528. : CRYPT_ENVINFO_COMPRESSION 5002 ; inline ! Compression information
  529. : CRYPT_ENVINFO_CONTENTTYPE 5003 ; inline ! Inner CMS content type
  530. : CRYPT_ENVINFO_DETACHEDSIGNATURE 5004 ; inline ! Generate CMS detached signature
  531. : CRYPT_ENVINFO_SIGNATURE_RESULT 5005 ; inline ! Signature check result
  532. : CRYPT_ENVINFO_MAC 5006 ; inline ! Use MAC instead of encrypting
  533. : CRYPT_ENVINFO_PASSWORD 5007 ; inline ! User password
  534. : CRYPT_ENVINFO_KEY 5008 ; inline ! Conventional encryption key
  535. : CRYPT_ENVINFO_SIGNATURE 5009 ; inline ! Signature/signature check key
  536. : CRYPT_ENVINFO_SIGNATURE_EXTRADATA 5010 ; inline ! Extra information added to CMS sigs
  537. : CRYPT_ENVINFO_RECIPIENT 5011 ; inline ! Recipient email address
  538. : CRYPT_ENVINFO_PUBLICKEY 5012 ; inline ! PKC encryption key
  539. : CRYPT_ENVINFO_PRIVATEKEY 5013 ; inline ! PKC decryption key
  540. : CRYPT_ENVINFO_PRIVATEKEY_LABEL 5014 ; inline ! Label of PKC decryption key
  541. : CRYPT_ENVINFO_ORIGINATOR 5015 ; inline ! Originator info/key
  542. : CRYPT_ENVINFO_SESSIONKEY 5016 ; inline ! Session key
  543. : CRYPT_ENVINFO_HASH 5017 ; inline ! Hash value
  544. : CRYPT_ENVINFO_TIMESTAMP 5018 ; inline ! Timestamp information
  545. : CRYPT_ENVINFO_KEYSET_SIGCHECK 5019 ; inline ! Signature check keyset
  546. : CRYPT_ENVINFO_KEYSET_ENCRYPT 5020 ; inline ! PKC encryption keyset
  547. : CRYPT_ENVINFO_KEYSET_DECRYPT 5021 ; inline ! PKC decryption keyset
  548. : CRYPT_ENVINFO_LAST 5022 ; inline
  549. : CRYPT_SESSINFO_FIRST 6000 ; inline ! ********************
  550. : CRYPT_SESSINFO_ACTIVE 6001 ; inline ! Whether session is active
  551. : CRYPT_SESSINFO_CONNECTIONACTIVE 6002 ; inline ! Whether network connection is active
  552. : CRYPT_SESSINFO_USERNAME 6003 ; inline ! User name
  553. : CRYPT_SESSINFO_PASSWORD 6004 ; inline ! Password
  554. : CRYPT_SESSINFO_PRIVATEKEY 6005 ; inline ! Server/client private key
  555. : CRYPT_SESSINFO_KEYSET 6006 ; inline ! Certificate store
  556. : CRYPT_SESSINFO_AUTHRESPONSE 6007 ; inline ! Session authorisation OK
  557. : CRYPT_SESSINFO_SERVER_NAME 6008 ; inline ! Server name
  558. : CRYPT_SESSINFO_SERVER_PORT 6009 ; inline ! Server port number
  559. : CRYPT_SESSINFO_SERVER_FINGERPRINT 6010 ; inline ! Server key fingerprint
  560. : CRYPT_SESSINFO_CLIENT_NAME 6011 ; inline ! Client name
  561. : CRYPT_SESSINFO_CLIENT_PORT 6012 ; inline ! Client port number
  562. : CRYPT_SESSINFO_SESSION 6013 ; inline ! Transport mechanism
  563. : CRYPT_SESSINFO_NETWORKSOCKET 6014 ; inline ! User-supplied network socket
  564. : CRYPT_SESSINFO_VERSION 6015 ; inline ! Protocol version
  565. : CRYPT_SESSINFO_REQUEST 6016 ; inline ! Cert.request object
  566. : CRYPT_SESSINFO_RESPONSE 6017 ; inline ! Cert.response object
  567. : CRYPT_SESSINFO_CACERTIFICATE 6018 ; inline ! Issuing CA certificate
  568. : CRYPT_SESSINFO_TSP_MSGIMPRINT 6019 ; inline ! TSP message imprint
  569. : CRYPT_SESSINFO_CMP_REQUESTTYPE 6020 ; inline ! Request type
  570. : CRYPT_SESSINFO_CMP_PKIBOOT 6021 ; inline ! Enable PKIBoot facility
  571. : CRYPT_SESSINFO_CMP_PRIVKEYSET 6022 ; inline ! Private-key keyset
  572. : CRYPT_SESSINFO_SSH_CHANNEL 6023 ; inline ! SSH current channel
  573. : CRYPT_SESSINFO_SSH_CHANNEL_TYPE 6024 ; inline ! SSH channel type
  574. : CRYPT_SESSINFO_SSH_CHANNEL_ARG1 6025 ; inline ! SSH channel argument 1
  575. : CRYPT_SESSINFO_SSH_CHANNEL_ARG2 6026 ; inline ! SSH channel argument 2
  576. : CRYPT_SESSINFO_SSH_CHANNEL_ACTIVE 6027 ; inline ! SSH channel active
  577. : CRYPT_SESSINFO_LAST 6028 ; inline
  578. : CRYPT_USERINFO_FIRST 7000 ; inline ! ********************
  579. : CRYPT_USERINFO_PASSWORD 7001 ; inline ! Password
  580. : CRYPT_USERINFO_CAKEY_CERTSIGN 7002 ; inline ! CA cert signing key
  581. : CRYPT_USERINFO_CAKEY_CRLSIGN 7003 ; inline ! CA CRL signing key
  582. : CRYPT_USERINFO_CAKEY_RTCSSIGN 7004 ; inline ! CA RTCS signing key
  583. : CRYPT_USERINFO_CAKEY_OCSPSIGN 7005 ; inline ! CA OCSP signing key
  584. : CRYPT_USERINFO_LAST 7006 ; inline
  585. : CRYPT_ATTRIBUTE_LAST 7006 ; inline
  586. TYPEDEF: int CRYPT_ATTRIBUTE_TYPE
  587. ! ===============================================
  588. ! Attribute Subtypes and Related Values
  589. ! ===============================================
  590. ! Flags for the X.509 keyUsage extension
  591. : CRYPT_KEYUSAGE_NONE 0x000 ; inline
  592. : CRYPT_KEYUSAGE_DIGITALSIGNATURE 0x001 ; inline
  593. : CRYPT_KEYUSAGE_NONREPUDIATION 0x002 ; inline
  594. : CRYPT_KEYUSAGE_KEYENCIPHERMENT 0x004 ; inline
  595. : CRYPT_KEYUSAGE_DATAENCIPHERMENT 0x008 ; inline
  596. : CRYPT_KEYUSAGE_KEYAGREEMENT 0x010 ; inline
  597. : CRYPT_KEYUSAGE_KEYCERTSIGN 0x020 ; inline
  598. : CRYPT_KEYUSAGE_CRLSIGN 0x040 ; inline
  599. : CRYPT_KEYUSAGE_ENCIPHERONLY 0x080 ; inline
  600. : CRYPT_KEYUSAGE_DECIPHERONLY 0x100 ; inline
  601. : CRYPT_KEYUSAGE_LAST 0x200 ; inline ! Last possible value
  602. ! X.509 cRLReason and cryptlib cRLExtReason codes
  603. : CRYPT_CRLREASON_UNSPECIFIED 0 ; inline
  604. : CRYPT_CRLREASON_KEYCOMPROMISE 1 ; inline
  605. : CRYPT_CRLREASON_CACOMPROMISE 2 ; inline
  606. : CRYPT_CRLREASON_AFFILIATIONCHANGED 3 ; inline
  607. : CRYPT_CRLREASON_SUPERSEDED 4 ; inline
  608. : CRYPT_CRLREASON_CESSATIONOFOPERATION 5 ; inline
  609. : CRYPT_CRLREASON_CERTIFICATEHOLD 6 ; inline
  610. : CRYPT_CRLREASON_REMOVEFROMCRL 8 ; inline
  611. : CRYPT_CRLREASON_PRIVILEGEWITHDRAWN 9 ; inline
  612. : CRYPT_CRLREASON_AACOMPROMISE 10 ; inline
  613. : CRYPT_CRLREASON_LAST 11 ; inline ! End of standard CRL reasons
  614. : CRYPT_CRLREASON_NEVERVALID 20 ; inline
  615. : CRYPT_CRLEXTREASON_LAST 21 ; inline
  616. ! X.509 CRL reason flags. These identify the same thing as the cRLReason
  617. ! codes but allow for multiple reasons to be specified. Note that these
  618. ! don't follow the X.509 naming since in that scheme the enumerated types
  619. ! and bitflags have the same names
  620. : CRYPT_CRLREASONFLAG_UNUSED 0x001 ; inline
  621. : CRYPT_CRLREASONFLAG_KEYCOMPROMISE 0x002 ; inline
  622. : CRYPT_CRLREASONFLAG_CACOMPROMISE 0x004 ; inline
  623. : CRYPT_CRLREASONFLAG_AFFILIATIONCHANGED 0x008 ; inline
  624. : CRYPT_CRLREASONFLAG_SUPERSEDED 0x010 ; inline
  625. : CRYPT_CRLREASONFLAG_CESSATIONOFOPERATION 0x020 ; inline
  626. : CRYPT_CRLREASONFLAG_CERTIFICATEHOLD 0x040 ; inline
  627. : CRYPT_CRLREASONFLAG_LAST 0x080 ; inline ! Last poss.value
  628. ! X.509 CRL holdInstruction codes
  629. : CRYPT_HOLDINSTRUCTION_NONE 0 ; inline
  630. : CRYPT_HOLDINSTRUCTION_CALLISSUER 1 ; inline
  631. : CRYPT_HOLDINSTRUCTION_REJECT 2 ; inline
  632. : CRYPT_HOLDINSTRUCTION_PICKUPTOKEN 3 ; inline
  633. : CRYPT_HOLDINSTRUCTION_LAST 4 ; inline
  634. ! Certificate checking compliance levels
  635. : CRYPT_COMPLIANCELEVEL_OBLIVIOUS 0 ; inline
  636. : CRYPT_COMPLIANCELEVEL_REDUCED 1 ; inline
  637. : CRYPT_COMPLIANCELEVEL_STANDARD 2 ; inline
  638. : CRYPT_COMPLIANCELEVEL_PKIX_PARTIAL 3 ; inline
  639. : CRYPT_COMPLIANCELEVEL_PKIX_FULL 4 ; inline
  640. : CRYPT_COMPLIANCELEVEL_LAST 5 ; inline
  641. ! Flags for the Netscape netscape-cert-type extension
  642. : CRYPT_NS_CERTTYPE_SSLCLIENT 0x001 ; inline
  643. : CRYPT_NS_CERTTYPE_SSLSERVER 0x002 ; inline
  644. : CRYPT_NS_CERTTYPE_SMIME 0x004 ; inline
  645. : CRYPT_NS_CERTTYPE_OBJECTSIGNING 0x008 ; inline
  646. : CRYPT_NS_CERTTYPE_RESERVED 0x010 ; inline
  647. : CRYPT_NS_CERTTYPE_SSLCA 0x020 ; inline
  648. : CRYPT_NS_CERTTYPE_SMIMECA 0x040 ; inline
  649. : CRYPT_NS_CERTTYPE_OBJECTSIGNINGCA 0x080 ; inline
  650. : CRYPT_NS_CERTTYPE_LAST 0x100 ; inline ! Last possible value
  651. ! Flags for the SET certificate-type extension
  652. : CRYPT_SET_CERTTYPE_CARD 0x001 ; inline
  653. : CRYPT_SET_CERTTYPE_MER 0x002 ; inline
  654. : CRYPT_SET_CERTTYPE_PGWY 0x004 ; inline
  655. : CRYPT_SET_CERTTYPE_CCA 0x008 ; inline
  656. : CRYPT_SET_CERTTYPE_MCA 0x010 ; inline
  657. : CRYPT_SET_CERTTYPE_PCA 0x020 ; inline
  658. : CRYPT_SET_CERTTYPE_GCA 0x040 ; inline
  659. : CRYPT_SET_CERTTYPE_BCA 0x080 ; inline
  660. : CRYPT_SET_CERTTYPE_RCA 0x100 ; inline
  661. : CRYPT_SET_CERTTYPE_ACQ 0x200 ; inline
  662. : CRYPT_SET_CERTTYPE_LAST 0x400 ; inline ! Last possible value
  663. ! CMS contentType values
  664. ! CRYPT_CONTENT_TYPE
  665. : CRYPT_CONTENT_NONE 0 ; inline
  666. : CRYPT_CONTENT_DATA 1 ; inline
  667. : CRYPT_CONTENT_SIGNEDDATA 2 ; inline
  668. : CRYPT_CONTENT_ENVELOPEDDATA 3 ; inline
  669. : CRYPT_CONTENT_SIGNEDANDENVELOPEDDATA 4 ; inline
  670. : CRYPT_CONTENT_DIGESTEDDATA 5 ; inline
  671. : CRYPT_CONTENT_ENCRYPTEDDATA 6 ; inline
  672. : CRYPT_CONTENT_COMPRESSEDDATA 7 ; inline
  673. : CRYPT_CONTENT_TSTINFO 8 ; inline
  674. : CRYPT_CONTENT_SPCINDIRECTDATACONTEXT 9 ; inline
  675. : CRYPT_CONTENT_RTCSREQUEST 10 ; inline
  676. : CRYPT_CONTENT_RTCSRESPONSE 11 ; inline
  677. : CRYPT_CONTENT_RTCSRESPONSE_EXT 12 ; inline
  678. : CRYPT_CONTENT_LAST 13 ; inline
  679. ! ESS securityClassification codes
  680. : CRYPT_CLASSIFICATION_UNMARKED 0 ; inline
  681. : CRYPT_CLASSIFICATION_UNCLASSIFIED 1 ; inline
  682. : CRYPT_CLASSIFICATION_RESTRICTED 2 ; inline
  683. : CRYPT_CLASSIFICATION_CONFIDENTIAL 3 ; inline
  684. : CRYPT_CLASSIFICATION_SECRET 4 ; inline
  685. : CRYPT_CLASSIFICATION_TOP_SECRET 5 ; inline
  686. : CRYPT_CLASSIFICATION_LAST 255 ; inline
  687. ! RTCS certificate status
  688. : CRYPT_CERTSTATUS_VALID 0 ; inline
  689. : CRYPT_CERTSTATUS_NOTVALID 1 ; inline
  690. : CRYPT_CERTSTATUS_NONAUTHORITATIVE 2 ; inline
  691. : CRYPT_CERTSTATUS_UNKNOWN 3 ; inline
  692. ! OCSP revocation status
  693. : CRYPT_OCSPSTATUS_NOTREVOKED 0 ; inline
  694. : CRYPT_OCSPSTATUS_REVOKED 1 ; inline
  695. : CRYPT_OCSPSTATUS_UNKNOWN 2 ; inline
  696. ! The amount of detail to include in signatures when signing certificate
  697. ! objects
  698. ! CRYPT_SIGNATURELEVEL_TYPE
  699. : CRYPT_SIGNATURELEVEL_NONE 0 ; inline ! Include only signature
  700. : CRYPT_SIGNATURELEVEL_SIGNERCERT 1 ; inline ! Include signer cert
  701. : CRYPT_SIGNATURELEVEL_ALL 2 ; inline ! Include all relevant info
  702. : CRYPT_SIGNATURELEVEL_LAST 3 ; inline ! Last possible sig.level type
  703. ! The certificate export format type, which defines the format in which a
  704. ! certificate object is exported
  705. ! CRYPT_CERTFORMAT_TYPE
  706. : CRYPT_CERTFORMAT_NONE 0 ; inline ! No certificate format
  707. : CRYPT_CERTFORMAT_CERTIFICATE 1 ; inline ! DER-encoded certificate
  708. : CRYPT_CERTFORMAT_CERTCHAIN 2 ; inline ! PKCS #7 certificate chain
  709. : CRYPT_CERTFORMAT_TEXT_CERTIFICATE 3 ; inline ! base-64 wrapped cert
  710. : CRYPT_CERTFORMAT_TEXT_CERTCHAIN 4 ; inline ! base-64 wrapped cert chain
  711. : CRYPT_CERTFORMAT_XML_CERTIFICATE 5 ; inline ! XML wrapped cert
  712. : CRYPT_CERTFORMAT_XML_CERTCHAIN 6 ; inline ! XML wrapped cert chain
  713. : CRYPT_CERTFORMAT_LAST 7 ; inline ! Last possible cert.format type
  714. TYPEDEF: int CRYPT_CERTFORMAT_TYPE
  715. ! CMP request types
  716. ! CRYPT_REQUESTTYPE_TYPE
  717. : CRYPT_REQUESTTYPE_NONE 0 ; inline ! No request type
  718. : CRYPT_REQUESTTYPE_INITIALISATION 1 ; inline ! Initialisation request
  719. : CRYPT_REQUESTTYPE_INITIALIZATION 1 ; inline
  720. : CRYPT_REQUESTTYPE_CERTIFICATE 2 ; inline ! Certification request
  721. : CRYPT_REQUESTTYPE_KEYUPDATE 3 ; inline ! Key update request
  722. : CRYPT_REQUESTTYPE_REVOCATION 4 ; inline ! Cert revocation request
  723. : CRYPT_REQUESTTYPE_PKIBOOT 5 ; inline ! PKIBoot request
  724. : CRYPT_REQUESTTYPE_LAST 6 ; inline ! Last possible request type
  725. ! Key ID types
  726. ! CRYPT_KEYID_TYPE
  727. : CRYPT_KEYID_NONE 0 ; inline ! No key ID type
  728. : CRYPT_KEYID_NAME 1 ; inline ! Key owner name
  729. : CRYPT_KEYID_URI 2 ; inline ! Key owner URI
  730. : CRYPT_KEYID_EMAIL 2 ; inline ! Synonym: owner email addr.
  731. : CRYPT_KEYID_LAST 3 ; inline ! Last possible key ID type
  732. TYPEDEF: int CRYPT_KEYID_TYPE
  733. ! The encryption object types
  734. ! CRYPT_OBJECT_TYPE
  735. : CRYPT_OBJECT_NONE 0 ; inline ! No object type
  736. : CRYPT_OBJECT_ENCRYPTED_KEY 1 ; inline ! Conventionally encrypted key
  737. : CRYPT_OBJECT_PKCENCRYPTED_KEY 2 ; inline ! PKC-encrypted key
  738. : CRYPT_OBJECT_KEYAGREEMENT 3 ; inline ! Key agreement information
  739. : CRYPT_OBJECT_SIGNATURE 4 ; inline ! Signature
  740. : CRYPT_OBJECT_LAST 5 ; inline ! Last possible object type
  741. ! Object/attribute error type information
  742. ! CRYPT_ERRTYPE_TYPE
  743. : CRYPT_ERRTYPE_NONE 0 ; inline ! No error information
  744. : CRYPT_ERRTYPE_ATTR_SIZE 1 ; inline ! Attribute data too small or large
  745. : CRYPT_ERRTYPE_ATTR_VALUE 2 ; inline ! Attribute value is invalid
  746. : CRYPT_ERRTYPE_ATTR_ABSENT 3 ; inline ! Required attribute missing
  747. : CRYPT_ERRTYPE_ATTR_PRESENT 4 ; inline ! Non-allowed attribute present
  748. : CRYPT_ERRTYPE_CONSTRAINT 5 ; inline ! Cert: Constraint violation in object
  749. : CRYPT_ERRTYPE_ISSUERCONSTRAINT 6 ; inline ! Cert: Constraint viol.in issuing cert
  750. : CRYPT_ERRTYPE_LAST 7 ; inline ! Last possible error info type
  751. ! Cert store management action type
  752. ! CRYPT_CERTACTION_TYPE
  753. : CRYPT_CERTACTION_NONE 0 ; inline ! No cert management action
  754. : CRYPT_CERTACTION_CREATE 1 ; inline ! Create cert store
  755. : CRYPT_CERTACTION_CONNECT 2 ; inline ! Connect to cert store
  756. : CRYPT_CERTACTION_DISCONNECT 3 ; inline ! Disconnect from cert store
  757. : CRYPT_CERTACTION_ERROR 4 ; inline ! Error information
  758. : CRYPT_CERTACTION_ADDUSER 5 ; inline ! Add PKI user
  759. : CRYPT_CERTACTION_DELETEUSER 6 ; inline ! Delete PKI user
  760. : CRYPT_CERTACTION_REQUEST_CERT 7 ; inline ! Cert request
  761. : CRYPT_CERTACTION_REQUEST_RENEWAL 8 ; inline ! Cert renewal request
  762. : CRYPT_CERTACTION_REQUEST_REVOCATION 9 ; inline ! Cert revocation request
  763. : CRYPT_CERTACTION_CERT_CREATION 10 ; inline ! Cert creation
  764. : CRYPT_CERTACTION_CERT_CREATION_COMPLETE 11 ; inline ! Confirmation of cert creation
  765. : CRYPT_CERTACTION_CERT_CREATION_DROP 12 ; inline ! Cancellation of cert creation
  766. : CRYPT_CERTACTION_CERT_CREATION_REVERSE 13 ; inline ! Cancel of creation w.revocation
  767. : CRYPT_CERTACTION_RESTART_CLEANUP 14 ; inline ! Delete reqs after restart
  768. : CRYPT_CERTACTION_RESTART_REVOKE_CERT 15 ; inline ! Complete revocation after restart
  769. : CRYPT_CERTACTION_ISSUE_CERT 16 ; inline ! Cert issue
  770. : CRYPT_CERTACTION_ISSUE_CRL 17 ; inline ! CRL issue
  771. : CRYPT_CERTACTION_REVOKE_CERT 18 ; inline ! Cert revocation
  772. : CRYPT_CERTACTION_EXPIRE_CERT 19 ; inline ! Cert expiry
  773. : CRYPT_CERTACTION_CLEANUP 20 ; inline ! Clean up on restart
  774. : CRYPT_CERTACTION_LAST 21 ; inline ! Last possible cert store log action
  775. ! ===============================================
  776. ! General Constants
  777. ! ===============================================
  778. ! The maximum user key size - 2048 bits
  779. : CRYPT_MAX_KEYSIZE 256 ; inline
  780. ! The maximum IV size - 256 bits
  781. : CRYPT_MAX_IVSIZE 32 ; inline
  782. ! The maximum public-key component size - 4096 bits, and maximum component
  783. ! size for ECCs - 256 bits
  784. : CRYPT_MAX_PKCSIZE 512 ; inline
  785. : CRYPT_MAX_PKCSIZE_ECC 32 ; inline
  786. ! The maximum hash size - 256 bits
  787. : CRYPT_MAX_HASHSIZE 32 ; inline
  788. ! The maximum size of a text string (e.g.key owner name)
  789. : CRYPT_MAX_TEXTSIZE 64 ; inline
  790. ! A magic value indicating that the default setting for this parameter
  791. ! should be used
  792. : CRYPT_USE_DEFAULT -100 ; inline
  793. ! A magic value for unused parameters
  794. : CRYPT_UNUSED -101 ; inline
  795. ! Cursor positioning codes for certificate/CRL extensions
  796. : CRYPT_CURSOR_FIRST -200 ; inline
  797. : CRYPT_CURSOR_PREVIOUS -201 ; inline
  798. : CRYPT_CURSOR_NEXT -202 ; inline
  799. : CRYPT_CURSOR_LAST -203 ; inline
  800. ! The type of information polling to perform to get random seed
  801. ! information. These values have to be negative because they're used
  802. ! as magic length values for cryptAddRandom()
  803. : CRYPT_RANDOM_FASTPOLL -300 ; inline
  804. : CRYPT_RANDOM_SLOWPOLL -301 ; inline
  805. ! Whether the PKC key is a public or private key
  806. : CRYPT_KEYTYPE_PRIVATE 0 ; inline
  807. : CRYPT_KEYTYPE_PUBLIC 1 ; inline
  808. ! Keyset open options
  809. ! CRYPT_KEYOPT_TYPE
  810. ! (No options, Open keyset in read-only mode, Create a new keyset)
  811. ! Internal keyset options
  812. ! (As _NONE but open for exclusive access, _CRYPT_DEFINED
  813. ! Last possible key option type, _CRYPT_DEFINED Last external keyset option)
  814. CONSTANT: CRYPT_KEYOPT_NONE 0
  815. CONSTANT: CRYPT_KEYOPT_READONLY 1
  816. CONSTANT: CRYPT_KEYOPT_CREATE 2
  817. CONSTANT: CRYPT_IKEYOPT_EXCLUSIVEACCESS 3
  818. CONSTANT: CRYPT_KEYOPT_LAST 4
  819. : CRYPT_KEYOPT_LAST_EXTERNAL 3 ; inline ! = CRYPT_KEYOPT_CREATE + 1
  820. TYPEDEF: int CRYPT_KEYOPT_TYPE
  821. ! The various cryptlib objects - these are just integer handles
  822. TYPEDEF: int CRYPT_CERTIFICATE
  823. TYPEDEF: int CRYPT_CONTEXT
  824. TYPEDEF: int CRYPT_DEVICE
  825. TYPEDEF: int CRYPT_ENVELOPE
  826. TYPEDEF: int CRYPT_KEYSET
  827. TYPEDEF: int CRYPT_SESSION
  828. TYPEDEF: int CRYPT_USER
  829. ! Sometimes we don't know the exact type of a cryptlib object, so we use a
  830. ! generic handle type to identify it
  831. TYPEDEF: int CRYPT_HANDLE
  832. ! ===============================================
  833. ! Status Codes
  834. ! ===============================================
  835. ! No error in function call
  836. : CRYPT_OK 0 ; inline ! No error
  837. ! Error in parameters passed to function
  838. : CRYPT_ERROR_PARAM1 -1 ; inline ! Bad argument, parameter 1
  839. : CRYPT_ERROR_PARAM2 -2 ; inline ! Bad argument, parameter 2
  840. : CRYPT_ERROR_PARAM3 -3 ; inline ! Bad argument, parameter 3
  841. : CRYPT_ERROR_PARAM4 -4 ; inline ! Bad argument, parameter 4
  842. : CRYPT_ERROR_PARAM5 -5 ; inline ! Bad argument, parameter 5
  843. : CRYPT_ERROR_PARAM6 -6 ; inline ! Bad argument, parameter 6
  844. : CRYPT_ERROR_PARAM7 -7 ; inline ! Bad argument, parameter 7
  845. ! Errors due to insufficient resources
  846. : CRYPT_ERROR_MEMORY -10 ; inline ! Out of memory
  847. : CRYPT_ERROR_NOTINITED -11 ; inline ! Data has not been initialised
  848. : CRYPT_ERROR_INITED -12 ; inline ! Data has already been init'd
  849. : CRYPT_ERROR_NOSECURE -13 ; inline ! Opn.not avail.at requested sec.level
  850. : CRYPT_ERROR_RANDOM -14 ; inline ! No reliable random data available
  851. : CRYPT_ERROR_FAILED -15 ; inline ! Operation failed
  852. : CRYPT_ERROR_INTERNAL -16 ; inline ! Internal consistency check failed
  853. ! Security violations
  854. : CRYPT_ERROR_NOTAVAIL -20 ; inline ! This type of opn.not available
  855. : CRYPT_ERROR_PERMISSION -21 ; inline ! No permiss.to perform this operation
  856. : CRYPT_ERROR_WRONGKEY -22 ; inline ! Incorrect key used to decrypt data
  857. : CRYPT_ERROR_INCOMPLETE -23 ; inline ! Operation incomplete/still in progress
  858. : CRYPT_ERROR_COMPLETE -24 ; inline ! Operation complete/can't continue
  859. : CRYPT_ERROR_TIMEOUT -25 ; inline ! Operation timed out before completion
  860. : CRYPT_ERROR_INVALID -26 ; inline ! Invalid/inconsistent information
  861. : CRYPT_ERROR_SIGNALLED -27 ; inline ! Resource destroyed by extnl.event
  862. ! High-level function errors
  863. : CRYPT_ERROR_OVERFLOW -30 ; inline ! Resources/space exhausted
  864. : CRYPT_ERROR_UNDERFLOW -31 ; inline ! Not enough data available
  865. : CRYPT_ERROR_BADDATA -32 ; inline ! Bad/unrecognised data format
  866. : CRYPT_ERROR_SIGNATURE -33 ; inline ! Signature/integrity check failed
  867. ! Data access function errors
  868. : CRYPT_ERROR_OPEN -40 ; inline ! Cannot open object
  869. : CRYPT_ERROR_READ -41 ; inline ! Cannot read item from object
  870. : CRYPT_ERROR_WRITE -42 ; inline ! Cannot write item to object
  871. : CRYPT_ERROR_NOTFOUND -43 ; inline ! Requested item not found in object
  872. : CRYPT_ERROR_DUPLICATE -44 ; inline ! Item already present in object
  873. ! Data enveloping errors
  874. : CRYPT_ENVELOPE_RESOURCE -50 ; inline ! Need resource to proceed
  875. ! Error messages sequence
  876. : error-messages ( -- seq ) {
  877. { -1 "Bad argument, parameter 1" }
  878. { -2 "Bad argument, parameter 2" }
  879. { -3 "Bad argument, parameter 3" }
  880. { -4 "Bad argument, parameter 4" }
  881. { -5 "Bad argument, parameter 5" }
  882. { -6 "Bad argument, parameter 6" }
  883. { -7 "Bad argument, parameter 7" }
  884. { -10 "Out of memory" }
  885. { -11 "Data has not been initialised" }
  886. { -12 "Data has already been init'd" }
  887. { -13 "Opn.not avail.at requested sec.level" }
  888. { -14 "No reliable random data available" }
  889. { -15 "Operation failed" }
  890. { -16 "Internal consistency check failed" }
  891. { -20 "This type of opn.not available" }
  892. { -21 "No permiss.to perform this operation" }
  893. { -22 "Incorrect key used to decrypt data" }
  894. { -23 "Operation incomplete/still in progress" }
  895. { -24 "Operation complete/can't continue" }
  896. { -25 "Operation timed out before completion" }
  897. { -26 "Invalid/inconsistent information" }
  898. { -27 "Resource destroyed by extnl.event" }
  899. { -30 "Resources/space exhausted" }
  900. { -31 "Not enough data available" }
  901. { -32 "Bad/unrecognised data format" }
  902. { -33 "Signature/integrity check failed" }
  903. { -40 "Cannot open object" }
  904. { -41 "Cannot read item from object" }
  905. { -42 "Cannot write item to object" }
  906. { -43 "Requested item not found in object" }
  907. { -44 "Item already present in object" }
  908. { -50 "Need resource to proceed" }
  909. } ;
  910. LIBRARY: libcl
  911. ! ===============================================
  912. ! cryptlib.h
  913. ! ===============================================
  914. ! Initialise and shut down cryptlib
  915. FUNCTION: C_RET cryptInit ( ) ;
  916. FUNCTION: C_RET cryptEnd ( ) ;
  917. ! Create and destroy an encryption context
  918. FUNCTION: C_RET cryptCreateContext ( CRYPT_CONTEXT* cryptContext, CRYPT_USER cryptUser, CRYPT_ALGO_TYPE cryptAlgo ) ;
  919. FUNCTION: C_RET cryptDestroyContext ( CRYPT_CONTEXT cryptContext ) ;
  920. ! Create/destroy an envelope
  921. FUNCTION: C_RET cryptCreateEnvelope ( CRYPT_ENVELOPE* envelope, CRYPT_USER cryptUser, CRYPT_FORMAT_TYPE formatType ) ;
  922. FUNCTION: C_RET cryptDestroyEnvelope ( CRYPT_ENVELOPE envelope ) ;
  923. ! Add/remove data to/from and envelope or session
  924. FUNCTION: C_RET cryptPushData ( CRYPT_HANDLE envelope, void* buffer, int length, int* bytesCopied ) ;
  925. FUNCTION: C_RET cryptFlushData ( CRYPT_HANDLE envelope ) ;
  926. FUNCTION: C_RET cryptPopData ( CRYPT_HANDLE envelope, void* buffer, int length, int* bytesCopied ) ;
  927. ! Get/set/delete attribute functions
  928. FUNCTION: C_RET cryptSetAttribute ( CRYPT_HANDLE cryptHandle, CRYPT_ATTRIBUTE_TYPE attributeType, int value ) ;
  929. FUNCTION: C_RET cryptSetAttributeString ( CRYPT_HANDLE cryptHandle, CRYPT_ATTRIBUTE_TYPE attributeType, void* value, int valueLength ) ;
  930. ! Generate a key into a context
  931. FUNCTION: C_RET cryptGenerateKey ( CRYPT_CONTEXT cryptContext ) ;
  932. ! Open and close a keyset
  933. FUNCTION: C_RET cryptKeysetOpen ( CRYPT_KEYSET* keyset, CRYPT_USER cryptUser, CRYPT_KEYSET_TYPE keysetType,
  934. char* name, CRYPT_KEYOPT_TYPE options ) ;
  935. FUNCTION: C_RET cryptKeysetClose ( CRYPT_KEYSET keyset ) ;
  936. ! Add/delete a key to/from a keyset or device
  937. FUNCTION: C_RET cryptAddPublicKey ( CRYPT_KEYSET keyset, CRYPT_CERTIFICATE certificate ) ;
  938. FUNCTION: C_RET cryptAddPrivateKey ( CRYPT_KEYSET keyset, CRYPT_HANDLE cryptKey, char* password ) ;
  939. FUNCTION: C_RET cryptDeleteKey ( CRYPT_KEYSET keyset, CRYPT_KEYID_TYPE keyIDtype, char* keyID ) ;
  940. ! Create/destroy a certificate
  941. FUNCTION: C_RET cryptCreateCert ( CRYPT_CERTIFICATE* certificate, CRYPT_USER cryptUser, CRYPT_CERTTYPE_TYPE certType ) ;
  942. FUNCTION: C_RET cryptDestroyCert ( CRYPT_CERTIFICATE certificate ) ;
  943. ! Sign/sig.check a certificate/certification request
  944. FUNCTION: C_RET cryptSignCert ( CRYPT_CERTIFICATE certificate, CRYPT_CONTEXT signContext ) ;
  945. FUNCTION: C_RET cryptCheckCert ( CRYPT_CERTIFICATE certificate, CRYPT_HANDLE sigCheckKey ) ;
  946. ! Import/export a certificate/certification request
  947. FUNCTION: C_RET cryptImportCert ( void* certObject, int certObjectLength, CRYPT_USER cryptUser, CRYPT_CERTIFICATE* certificate ) ;
  948. FUNCTION: C_RET cryptExportCert ( void* certObject, int certObjectMaxLength, int* certObjectLength,
  949. CRYPT_CERTFORMAT_TYPE certFormatType, CRYPT_CERTIFICATE certificate ) ;
  950. ! Get a key from a keyset or device
  951. FUNCTION: C_RET cryptGetPublicKey ( CRYPT_KEYSET keyset, CRYPT_CONTEXT* cryptContext, CRYPT_KEYID_TYPE keyIDtype, char* keyID ) ;
  952. FUNCTION: C_RET cryptGetPrivateKey ( CRYPT_KEYSET keyset, CRYPT_CONTEXT* cryptContext, CRYPT_KEYID_TYPE keyIDtype, char* keyID, char* password ) ;
  953. FUNCTION: C_RET cryptGetKey ( CRYPT_KEYSET keyset, CRYPT_CONTEXT* cryptContext, CRYPT_KEYID_TYPE keyIDtype, char* keyID, char* password ) ;
  954. ! Create/destroy a session
  955. FUNCTION: C_RET cryptCreateSession ( CRYPT_SESSION* session, CRYPT_USER cryptUser, CRYPT_SESSION_TYPE formatType ) ;
  956. FUNCTION: C_RET cryptDestroySession ( CRYPT_SESSION session ) ;