mirror of https://github.com/acidanthera/audk.git
CryptoPkg/BaseCryptLib.h: Add new API to get organization name
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1401 Add a prototype declaration of the new API X509GetOrganizationName in the header file. Signed-off-by: Zhichao Gao <zhichao.gao@intel.com> Cc: Ting Ye <ting.ye@intel.com> Cc: Gang Wei <gang.wei@intel.com> Cc: Wang Jian J <jian.j.wang@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Turner <Michael.Turner@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
This commit is contained in:
parent
07accfe398
commit
e2a673b853
|
@ -2200,6 +2200,41 @@ X509GetCommonName (
|
|||
IN OUT UINTN *CommonNameSize
|
||||
);
|
||||
|
||||
/**
|
||||
Retrieve the organization name (O) string from one X.509 certificate.
|
||||
|
||||
@param[in] Cert Pointer to the DER-encoded X509 certificate.
|
||||
@param[in] CertSize Size of the X509 certificate in bytes.
|
||||
@param[out] NameBuffer Buffer to contain the retrieved certificate organization
|
||||
name string. At most NameBufferSize bytes will be
|
||||
written and the string will be null terminated. May be
|
||||
NULL in order to determine the size buffer needed.
|
||||
@param[in,out] NameBufferSize The size in bytes of the Name buffer on input,
|
||||
and the size of buffer returned Name on output.
|
||||
If NameBuffer is NULL then the amount of space needed
|
||||
in buffer (including the final null) is returned.
|
||||
|
||||
@retval RETURN_SUCCESS The certificate Organization Name retrieved successfully.
|
||||
@retval RETURN_INVALID_PARAMETER If Cert is NULL.
|
||||
If NameBufferSize is NULL.
|
||||
If NameBuffer is not NULL and *CommonNameSize is 0.
|
||||
If Certificate is invalid.
|
||||
@retval RETURN_NOT_FOUND If no Organization Name entry exists.
|
||||
@retval RETURN_BUFFER_TOO_SMALL If the NameBuffer is NULL. The required buffer size
|
||||
(including the final null) is returned in the
|
||||
CommonNameSize parameter.
|
||||
@retval RETURN_UNSUPPORTED The operation is not supported.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
X509GetOrganizationName (
|
||||
IN CONST UINT8 *Cert,
|
||||
IN UINTN CertSize,
|
||||
OUT CHAR8 *NameBuffer, OPTIONAL
|
||||
IN OUT UINTN *NameBufferSize
|
||||
);
|
||||
|
||||
/**
|
||||
Verify one X509 certificate was issued by the trusted CA.
|
||||
|
||||
|
|
Loading…
Reference in New Issue