VirtualBox

Changeset 104745 in vbox for trunk/include


Ignore:
Timestamp:
May 21, 2024 12:52:09 PM (8 months ago)
Author:
vboxsync
Message:

IPRT,Main: Reworked the newly introduced RTCrX509Certificate_Generate function. It's now called RTCrX509Certificate_GenerateSelfSignedRsa and takes a few more parameters. We still can't read the output it creates. Added a create-self-signed-rsa-cert command to RTSignTool for easy testing. bugref:10310

Location:
trunk/include/iprt
Files:
2 edited

Legend:

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

    r104570 r104745  
    12131213
    12141214/**
    1215  * Generates and signs a certificate.
    1216  */
    1217 RTDECL(int) RTCrX509Certificate_Generate(const char *pszServerCertificate, const char *pszServerPrivateKey);
     1215 * Generates a self-signed RSA certificate, storing the result as two file.
     1216 *
     1217 * @note    The private key will be stored unencrypted!
     1218 *
     1219 * @returns IPRT status code.
     1220 * @param   enmDigestType       The digest type to use when signing.
     1221 * @param   cBits               The private key size (in bits).
     1222 * @param   cSecsValidFor       Number of seconds the certificate should be
     1223 *                              valid for (starting now).
     1224 * @param   fKeyUsage           Key usage mask: RTCRX509CERT_KEY_USAGE_F_XXX.
     1225 * @param   fExtKeyUsage        Extended key usage mask: RTCRX509CERT_EKU_F_XXX.
     1226 * @param   pvSubjectTodo       TODO: Subject name.
     1227 * @param   pszCertFile         Where to store the certificate (PEM formatting).
     1228 * @param   pszPrivateKeyFile   Where to store the unencrypted private key (PEM
     1229 *                              formatting).
     1230 * @param   pErrInfo            Where to return extended error information.
     1231 *                              Optional.
     1232 */
     1233RTDECL(int) RTCrX509Certificate_GenerateSelfSignedRsa(RTDIGESTTYPE enmDigestType, uint32_t cBits, uint32_t cSecsValidFor,
     1234                                                      uint32_t fKeyUsage, uint64_t fExtKeyUsage, void *pvSubjectTodo,
     1235                                                      const char *pszCertFile, const char *pszPrivateKeyFile, PRTERRINFO pErrInfo);
    12181236
    12191237RT_C_DECLS_END
  • trunk/include/iprt/mangling.h

    r104570 r104745  
    40914091# define RTCrX509Certificate_VerifySignature            RT_MANGLER(RTCrX509Certificate_VerifySignature)
    40924092# define RTCrX509Certificate_VerifySignatureSelfSigned  RT_MANGLER(RTCrX509Certificate_VerifySignatureSelfSigned)
    4093 # define RTCrX509Certificate_Generate                   RT_MANGLER(RTCrX509Certificate_Generate)
     4093# define RTCrX509Certificate_GenerateSelfSignedRsa      RT_MANGLER(RTCrX509Certificate_GenerateSelfSignedRsa)
    40944094# define RTCrTafCertPathControls_DecodeAsn1             RT_MANGLER(RTCrTafCertPathControls_DecodeAsn1)
    40954095# define RTCrTafTrustAnchorChoice_DecodeAsn1            RT_MANGLER(RTCrTafTrustAnchorChoice_DecodeAsn1)
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