VirtualBox

Changeset 57584 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Aug 29, 2015 8:02:02 PM (9 years ago)
Author:
vboxsync
Message:

IPRT: Implemented reading lib/Security/cacerts from JRE.

Location:
trunk/include/iprt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/crypto/store.h

    r57572 r57584  
    144144
    145145/**
    146  * Adds certificates from the specified file.
    147  *
    148  * @returns IPRT status code.  Even when RTCRCERTCTX_F_ADD_CONTINUE_ON_ERROR is
    149  *          used, an error is returned as an error (and not a warning).
    150  *
    151  * @param   hStore              The store to add the certificate(s) to.
    152  * @param   fFlags              RTCRCERTCTX_F_ADD_IF_NOT_FOUND and/or
    153  *                              RTCRCERTCTX_F_ADD_CONTINUE_ON_ERROR.
    154  * @param   pszFilename         The filename.
    155  * @param   pErrInfo            Where to return additional error/warning info.
    156  *                              Optional.
    157  */
    158 RTDECL(int) RTCrStoreCertAddFromFile(RTCRSTORE hStore, uint32_t fFlags, const char *pszFilename, PRTERRINFO pErrInfo);
    159 
    160 /**
    161146 * Adds certificates from files in the specified directory.
    162147 *
     
    176161RTDECL(int) RTCrStoreCertAddFromDir(RTCRSTORE hStore, uint32_t fFlags, const char *pszDir,
    177162                                    PCRTSTRTUPLE paSuffixes, size_t cSuffixes, PRTERRINFO pErrInfo);
     163
     164/**
     165 * Adds certificates from the specified file.
     166 *
     167 * The supported file formats are:
     168 *      - PEM (base 64 blobs wrapped in -----BEGIN / END----).  Support multiple
     169 *        certificates in one file.
     170 *      - Binary DER ASN.1 certificate. Only one per file.
     171 *      - Java key store version 2.
     172 *
     173 * @returns IPRT status code.  Even when RTCRCERTCTX_F_ADD_CONTINUE_ON_ERROR is
     174 *          used, an error is returned as an error (and not a warning).
     175 *
     176 * @param   hStore              The store to add the certificate(s) to.
     177 * @param   fFlags              RTCRCERTCTX_F_ADD_IF_NOT_FOUND and/or
     178 *                              RTCRCERTCTX_F_ADD_CONTINUE_ON_ERROR.
     179 * @param   pszFilename         The filename.
     180 * @param   pErrInfo            Where to return additional error/warning info.
     181 *                              Optional.
     182 */
     183RTDECL(int) RTCrStoreCertAddFromFile(RTCRSTORE hStore, uint32_t fFlags, const char *pszFilename, PRTERRINFO pErrInfo);
     184
     185/**
     186 * Adds certificates from the specified java key store file.
     187 *
     188 * @returns IPRT status code.  Even when RTCRCERTCTX_F_ADD_CONTINUE_ON_ERROR is
     189 *          used, an error is returned as an error (and not a warning).
     190 *
     191 * @param   hStore              The store to add the certificate(s) to.
     192 * @param   fFlags              RTCRCERTCTX_F_ADD_IF_NOT_FOUND and/or
     193 *                              RTCRCERTCTX_F_ADD_CONTINUE_ON_ERROR.
     194 * @param   pszFilename         The path to the JKS file.
     195 * @param   pErrInfo            Where to return additional error/warning info.
     196 *                              Optional.
     197 */
     198RTDECL(int) RTCrStoreCertAddFromJavaKeyStore(RTCRSTORE hStore, uint32_t fFlags, const char *pszFilename, PRTERRINFO pErrInfo);
     199
     200/**
     201 * Adds certificates from an in-memory java key store.
     202 *
     203 * @returns IPRT status code.  Even when RTCRCERTCTX_F_ADD_CONTINUE_ON_ERROR is
     204 *          used, an error is returned as an error (and not a warning).
     205 *
     206 * @param   hStore              The store to add the certificate(s) to.
     207 * @param   fFlags              RTCRCERTCTX_F_ADD_IF_NOT_FOUND and/or
     208 *                              RTCRCERTCTX_F_ADD_CONTINUE_ON_ERROR.
     209 * @param   pvContent           Pointer to the key store bytes.
     210 * @param   cbContent           The size of the key store.
     211 * @param   pszErrorName        The file name or whatever helpful indicator the
     212 *                              caller want in the error messages.
     213 * @param   pErrInfo            Where to return additional error/warning info.
     214 *                              Optional.
     215 */
     216RTDECL(int) RTCrStoreCertAddFromJavaKeyStoreInMem(RTCRSTORE hStore, uint32_t fFlags, void const *pvContent, size_t cbContent,
     217                                                  const char *pszErrorName, PRTERRINFO pErrInfo);
    178218
    179219/**
  • trunk/include/iprt/log.h

    r57004 r57584  
    6565    RTLOGGROUP_TIME,
    6666    RTLOGGROUP_TIMER,
     67    RTLOGGROUP_CRYPTO,
    6768    RTLOGGROUP_ZIP = 31,
    6869    RTLOGGROUP_FIRST_USER = 32
     
    9697    "RT_TIME",      \
    9798    "RT_TIMER",     \
    98     "RT_13", \
     99    "RT_CRYPTO",    \
    99100    "RT_14", \
    100101    "RT_15", \
  • trunk/include/iprt/mangling.h

    r57577 r57584  
    29022902# define RTCrStoreCreateInMem                           RT_MANGLER(RTCrStoreCreateInMem)
    29032903# define RTCrStoreCreateSnapshotById                    RT_MANGLER(RTCrStoreCreateSnapshotById)
     2904# define RTCrStoreCertAddFromDir                        RT_MANGLER(RTCrStoreCertAddFromDir)
    29042905# define RTCrStoreCertAddFromFile                       RT_MANGLER(RTCrStoreCertAddFromFile)
    2905 # define RTCrStoreCertAddFromDir                        RT_MANGLER(RTCrStoreCertAddFromDir)
     2906# define RTCrStoreCertAddFromJavaKeyStore               RT_MANGLER(RTCrStoreCertAddFromJavaKeyStore)
     2907# define RTCrStoreCertAddFromJavaKeyStoreInMem          RT_MANGLER(RTCrStoreCertAddFromJavaKeyStoreInMem)
    29062908# define RTCrStoreCertAddFromStore                      RT_MANGLER(RTCrStoreCertAddFromStore)
    29072909# define RTCrStoreCertExportAsPem                       RT_MANGLER(RTCrStoreCertExportAsPem)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette