x509.cpp revision c9e08fdf5fa9ba16094b8e37f257f4267044ad6f
716579c1eaca460b012b046afe7c50107eff7081David Luna * IPRT - X509 functions.
716579c1eaca460b012b046afe7c50107eff7081David Luna * Copyright (C) 2014 Oracle Corporation
716579c1eaca460b012b046afe7c50107eff7081David Luna * This file is part of VirtualBox Open Source Edition (OSE), as
716579c1eaca460b012b046afe7c50107eff7081David Luna * available from http://www.virtualbox.org. This file is free software;
716579c1eaca460b012b046afe7c50107eff7081David Luna * you can redistribute it and/or modify it under the terms of the GNU
716579c1eaca460b012b046afe7c50107eff7081David Luna * General Public License (GPL) as published by the Free Software
716579c1eaca460b012b046afe7c50107eff7081David Luna * Foundation, in version 2 as it comes in the "COPYING" file of the
716579c1eaca460b012b046afe7c50107eff7081David Luna * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
716579c1eaca460b012b046afe7c50107eff7081David Luna * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
716579c1eaca460b012b046afe7c50107eff7081David Luna * The contents of this file may alternatively be used under the terms
716579c1eaca460b012b046afe7c50107eff7081David Luna * of the Common Development and Distribution License Version 1.0
716579c1eaca460b012b046afe7c50107eff7081David Luna * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
716579c1eaca460b012b046afe7c50107eff7081David Luna * VirtualBox OSE distribution, in which case the provisions of the
716579c1eaca460b012b046afe7c50107eff7081David Luna * CDDL are applicable instead of those of the GPL.
716579c1eaca460b012b046afe7c50107eff7081David Luna * You may elect to license modified versions of this file under the
716579c1eaca460b012b046afe7c50107eff7081David Luna * terms and conditions of either the GPL or the CDDL or both.
716579c1eaca460b012b046afe7c50107eff7081David Luna/*******************************************************************************
716579c1eaca460b012b046afe7c50107eff7081David Luna* Header Files *
716579c1eaca460b012b046afe7c50107eff7081David Luna*******************************************************************************/
if(!*out_cert)
return rc;
static int RTX509ConvertCertificateToBinary(void *pvBuf, unsigned char** pOutSignature, unsigned int* lengthOfSignature)
return rc;
unsigned char** pOutDigest,
unsigned int* lengthOfDigest)
return rc;
RTDECL(int) RTRSAVerify(void *pvBuf, unsigned int cbSize, const char* pManifestDigestIn, RTDIGESTTYPE digestType)
unsigned int siglen = 0;
unsigned int diglen = 0;
rsa_key);
if(rsa_key)
if(evp_key)
if(certificate)
if (pManifestDigestOut)
if (pSignatureRSA)
return rc;
static int RTX509GetBasicConstraints(void *pvBuf, unsigned int cbSize, unsigned char** pBasicConstraintsOut)
if(!ext)
if(!extdata)
if(certificate)
return rc;
int ki=0;
if(ki>0)
if(certificate)
if(evp_key)
return rc;
return err;