Changeset 73749 in vbox for trunk/include/iprt/crypto
- Timestamp:
- Aug 18, 2018 12:25:57 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 124432
- Location:
- trunk/include/iprt/crypto
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/crypto/key.h
r73709 r73749 66 66 PRTERRINFO pErrInfo, const char *pszErrorTag); 67 67 RTDECL(int) RTCrKeyCreateFromPemSection(PRTCRKEY hKey, uint32_t fFlags, struct RTCRPEMSECTION const *pSection, 68 PRTERRINFO pErrInfo, const char *pszErrorTag);68 const char *pszPassword, PRTERRINFO pErrInfo, const char *pszErrorTag); 69 69 RTDECL(int) RTCrKeyCreateFromBuffer(PRTCRKEY hKey, uint32_t fFlags, void const *pvSrc, size_t cbSrc, 70 PRTERRINFO pErrInfo, const char *pszErrorTag); 71 RTDECL(int) RTCrKeyCreateFromFile(PRTCRKEY hKey, uint32_t fFlags, const char *pszFilename, PRTERRINFO pErrInfo); 70 const char *pszPassword, PRTERRINFO pErrInfo, const char *pszErrorTag); 71 RTDECL(int) RTCrKeyCreateFromFile(PRTCRKEY hKey, uint32_t fFlags, const char *pszFilename, 72 const char *pszPassword, PRTERRINFO pErrInfo); 72 73 /** @todo add support for decrypting private keys. */ 73 74 /** @name RTCRKEYFROM_F_XXX -
trunk/include/iprt/crypto/pem.h
r69105 r73749 69 69 /** Pointer to a const PEM marker. */ 70 70 typedef RTCRPEMMARKER const *PCRTCRPEMMARKER; 71 72 73 /** 74 * A PEM field. 75 */ 76 typedef struct RTCRPEMFIELD 77 { 78 /** Pointer to the next field. */ 79 struct RTCRPEMFIELD const *pNext; 80 /** The field value. */ 81 char const *pszValue; 82 /** The field value length. */ 83 size_t cchValue; 84 /** The field name length. */ 85 size_t cchName; 86 /** The field name. */ 87 char szName[RT_FLEXIBLE_ARRAY]; 88 } RTCRPEMFIELD; 89 /** Pointer to a PEM field. */ 90 typedef RTCRPEMFIELD *PRTCRPEMFIELD; 91 /** Pointer to a const PEM field. */ 92 typedef RTCRPEMFIELD const *PCRTCRPEMFIELD; 71 93 72 94 … … 86 108 /** The size of the binary data. */ 87 109 size_t cbData; 88 /** Additional text preceeding the binary data.NULL if none. */89 char *pszPreamble;90 /** The length of the preamble. */91 size_t cchPreamble;110 /** List of fields, NULL if none. */ 111 PCRTCRPEMFIELD pFieldHead; 112 /** Set if RTCRPEMREADFILE_F_SENSITIVE was specified. */ 113 bool fSensitive; 92 114 } RTCRPEMSECTION; 93 115 /** Pointer to a PEM section. */ … … 158 180 /** Only PEM sections, no binary fallback. */ 159 181 #define RTCRPEMREADFILE_F_ONLY_PEM RT_BIT(1) 182 /** Sensitive data, use the safer allocator. */ 183 #define RTCRPEMREADFILE_F_SENSITIVE RT_BIT(2) 160 184 /** Valid flags. */ 161 #define RTCRPEMREADFILE_F_VALID_MASK UINT32_C(0x0000000 3)185 #define RTCRPEMREADFILE_F_VALID_MASK UINT32_C(0x00000007) 162 186 /** @} */ 163 187
Note:
See TracChangeset
for help on using the changeset viewer.