]> git.proxmox.com Git - mirror_edk2.git/blob - CryptoPkg/Library/BaseCryptLibNull/Pk/CryptX509Null.c
CryptoPkg: add new X509 function.
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLibNull / Pk / CryptX509Null.c
1 /** @file
2 X.509 Certificate Handler Wrapper Implementation which does not provide
3 real capabilities.
4
5 Copyright (c) 2012 - 2020, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #include "InternalCryptLib.h"
11
12 /**
13 Construct a X509 object from DER-encoded certificate data.
14
15 Return FALSE to indicate this interface is not supported.
16
17 @param[in] Cert Pointer to the DER-encoded certificate data.
18 @param[in] CertSize The size of certificate data in bytes.
19 @param[out] SingleX509Cert The generated X509 object.
20
21 @retval FALSE This interface is not supported.
22
23 **/
24 BOOLEAN
25 EFIAPI
26 X509ConstructCertificate (
27 IN CONST UINT8 *Cert,
28 IN UINTN CertSize,
29 OUT UINT8 **SingleX509Cert
30 )
31 {
32 ASSERT (FALSE);
33 return FALSE;
34 }
35
36 /**
37 Construct a X509 stack object from a list of DER-encoded certificate data.
38
39 If X509Stack is NULL, then return FALSE.
40 If this interface is not supported, then return FALSE.
41
42 @param[in, out] X509Stack On input, pointer to an existing or NULL X509 stack object.
43 On output, pointer to the X509 stack object with new
44 inserted X509 certificate.
45 @param[in] Args VA_LIST marker for the variable argument list.
46 A list of DER-encoded single certificate data followed
47 by certificate size. A NULL terminates the list. The
48 pairs are the arguments to X509ConstructCertificate().
49
50 @retval TRUE The X509 stack construction succeeded.
51 @retval FALSE The construction operation failed.
52 @retval FALSE This interface is not supported.
53
54 **/
55 BOOLEAN
56 EFIAPI
57 X509ConstructCertificateStackV (
58 IN OUT UINT8 **X509Stack,
59 IN VA_LIST Args
60 )
61 {
62 ASSERT (FALSE);
63 return FALSE;
64 }
65
66 /**
67 Construct a X509 stack object from a list of DER-encoded certificate data.
68
69 Return FALSE to indicate this interface is not supported.
70
71 @param[in, out] X509Stack On input, pointer to an existing or NULL X509 stack object.
72 On output, pointer to the X509 stack object with new
73 inserted X509 certificate.
74 @param ... A list of DER-encoded single certificate data followed
75 by certificate size. A NULL terminates the list. The
76 pairs are the arguments to X509ConstructCertificate().
77
78 @retval FALSE This interface is not supported.
79
80 **/
81 BOOLEAN
82 EFIAPI
83 X509ConstructCertificateStack (
84 IN OUT UINT8 **X509Stack,
85 ...
86 )
87 {
88 ASSERT (FALSE);
89 return FALSE;
90 }
91
92 /**
93 Release the specified X509 object.
94
95 If the interface is not supported, then ASSERT().
96
97 @param[in] X509Cert Pointer to the X509 object to be released.
98
99 **/
100 VOID
101 EFIAPI
102 X509Free (
103 IN VOID *X509Cert
104 )
105 {
106 ASSERT (FALSE);
107 }
108
109 /**
110 Release the specified X509 stack object.
111
112 If the interface is not supported, then ASSERT().
113
114 @param[in] X509Stack Pointer to the X509 stack object to be released.
115
116 **/
117 VOID
118 EFIAPI
119 X509StackFree (
120 IN VOID *X509Stack
121 )
122 {
123 ASSERT (FALSE);
124 }
125
126 /**
127 Retrieve the subject bytes from one X.509 certificate.
128
129 Return FALSE to indicate this interface is not supported.
130
131 @param[in] Cert Pointer to the DER-encoded X509 certificate.
132 @param[in] CertSize Size of the X509 certificate in bytes.
133 @param[out] CertSubject Pointer to the retrieved certificate subject bytes.
134 @param[in, out] SubjectSize The size in bytes of the CertSubject buffer on input,
135 and the size of buffer returned CertSubject on output.
136
137
138 @retval FALSE This interface is not supported.
139
140 **/
141 BOOLEAN
142 EFIAPI
143 X509GetSubjectName (
144 IN CONST UINT8 *Cert,
145 IN UINTN CertSize,
146 OUT UINT8 *CertSubject,
147 IN OUT UINTN *SubjectSize
148 )
149 {
150 ASSERT (FALSE);
151 return FALSE;
152 }
153
154 /**
155 Retrieve the common name (CN) string from one X.509 certificate.
156
157 Return RETURN_UNSUPPORTED to indicate this interface is not supported.
158
159 @param[in] Cert Pointer to the DER-encoded X509 certificate.
160 @param[in] CertSize Size of the X509 certificate in bytes.
161 @param[out] CommonName Buffer to contain the retrieved certificate common
162 name string (UTF8). At most CommonNameSize bytes will be
163 written and the string will be null terminated. May be
164 NULL in order to determine the size buffer needed.
165 @param[in,out] CommonNameSize The size in bytes of the CommonName buffer on input,
166 and the size of buffer returned CommonName on output.
167 If CommonName is NULL then the amount of space needed
168 in buffer (including the final null) is returned.
169
170 @retval RETURN_UNSUPPORTED The operation is not supported.
171
172 **/
173 RETURN_STATUS
174 EFIAPI
175 X509GetCommonName (
176 IN CONST UINT8 *Cert,
177 IN UINTN CertSize,
178 OUT CHAR8 *CommonName OPTIONAL,
179 IN OUT UINTN *CommonNameSize
180 )
181 {
182 ASSERT (FALSE);
183 return RETURN_UNSUPPORTED;
184 }
185
186 /**
187 Retrieve the organization name (ON) string from one X.509 certificate.
188
189 Return RETURN_UNSUPPORTED to indicate this interface is not supported.
190
191 @param[in] Cert Pointer to the DER-encoded X509 certificate.
192 @param[in] CertSize Size of the X509 certificate in bytes.
193 @param[out] NameBuffer Buffer to contain the retrieved certificate organization
194 name string. At most NameBufferSize bytes will be
195 written and the string will be null terminated. May be
196 NULL in order to determine the size buffer needed.
197 @param[in,out] NameBufferSize The size in bytes of the Name buffer on input,
198 and the size of buffer returned Name on output.
199 If NameBuffer is NULL then the amount of space needed
200 in buffer (including the final null) is returned.
201
202 @retval RETURN_UNSUPPORTED The operation is not supported.
203
204 **/
205 RETURN_STATUS
206 EFIAPI
207 X509GetOrganizationName (
208 IN CONST UINT8 *Cert,
209 IN UINTN CertSize,
210 OUT CHAR8 *NameBuffer OPTIONAL,
211 IN OUT UINTN *NameBufferSize
212 )
213 {
214 ASSERT (FALSE);
215 return RETURN_UNSUPPORTED;
216 }
217
218 /**
219 Retrieve the RSA Public Key from one DER-encoded X509 certificate.
220
221 Return FALSE to indicate this interface is not supported.
222
223 @param[in] Cert Pointer to the DER-encoded X509 certificate.
224 @param[in] CertSize Size of the X509 certificate in bytes.
225 @param[out] RsaContext Pointer to new-generated RSA context which contain the retrieved
226 RSA public key component. Use RsaFree() function to free the
227 resource.
228
229 @retval FALSE This interface is not supported.
230
231 **/
232 BOOLEAN
233 EFIAPI
234 RsaGetPublicKeyFromX509 (
235 IN CONST UINT8 *Cert,
236 IN UINTN CertSize,
237 OUT VOID **RsaContext
238 )
239 {
240 ASSERT (FALSE);
241 return FALSE;
242 }
243
244 /**
245 Verify one X509 certificate was issued by the trusted CA.
246
247 Return FALSE to indicate this interface is not supported.
248
249 @param[in] Cert Pointer to the DER-encoded X509 certificate to be verified.
250 @param[in] CertSize Size of the X509 certificate in bytes.
251 @param[in] CACert Pointer to the DER-encoded trusted CA certificate.
252 @param[in] CACertSize Size of the CA Certificate in bytes.
253
254 @retval FALSE This interface is not supported.
255
256 **/
257 BOOLEAN
258 EFIAPI
259 X509VerifyCert (
260 IN CONST UINT8 *Cert,
261 IN UINTN CertSize,
262 IN CONST UINT8 *CACert,
263 IN UINTN CACertSize
264 )
265 {
266 ASSERT (FALSE);
267 return FALSE;
268 }
269
270 /**
271 Retrieve the TBSCertificate from one given X.509 certificate.
272
273 Return FALSE to indicate this interface is not supported.
274
275 @param[in] Cert Pointer to the given DER-encoded X509 certificate.
276 @param[in] CertSize Size of the X509 certificate in bytes.
277 @param[out] TBSCert DER-Encoded To-Be-Signed certificate.
278 @param[out] TBSCertSize Size of the TBS certificate in bytes.
279
280 @retval FALSE This interface is not supported.
281
282 **/
283 BOOLEAN
284 EFIAPI
285 X509GetTBSCert (
286 IN CONST UINT8 *Cert,
287 IN UINTN CertSize,
288 OUT UINT8 **TBSCert,
289 OUT UINTN *TBSCertSize
290 )
291 {
292 ASSERT (FALSE);
293 return FALSE;
294 }
295
296 /**
297 Retrieve the EC Public Key from one DER-encoded X509 certificate.
298
299 @param[in] Cert Pointer to the DER-encoded X509 certificate.
300 @param[in] CertSize Size of the X509 certificate in bytes.
301 @param[out] EcContext Pointer to new-generated EC DSA context which contain the retrieved
302 EC public key component. Use EcFree() function to free the
303 resource.
304
305 If Cert is NULL, then return FALSE.
306 If EcContext is NULL, then return FALSE.
307
308 @retval TRUE EC Public Key was retrieved successfully.
309 @retval FALSE Fail to retrieve EC public key from X509 certificate.
310
311 **/
312 BOOLEAN
313 EFIAPI
314 EcGetPublicKeyFromX509 (
315 IN CONST UINT8 *Cert,
316 IN UINTN CertSize,
317 OUT VOID **EcContext
318 )
319 {
320 ASSERT (FALSE);
321 return FALSE;
322 }
323
324 /**
325 Retrieve the version from one X.509 certificate.
326
327 If Cert is NULL, then return FALSE.
328 If CertSize is 0, then return FALSE.
329 If this interface is not supported, then return FALSE.
330
331 @param[in] Cert Pointer to the DER-encoded X509 certificate.
332 @param[in] CertSize Size of the X509 certificate in bytes.
333 @param[out] Version Pointer to the retrieved version integer.
334
335 @retval TRUE The certificate version retrieved successfully.
336 @retval FALSE If Cert is NULL or CertSize is Zero.
337 @retval FALSE The operation is not supported.
338
339 **/
340 BOOLEAN
341 EFIAPI
342 X509GetVersion (
343 IN CONST UINT8 *Cert,
344 IN UINTN CertSize,
345 OUT UINTN *Version
346 )
347 {
348 ASSERT (FALSE);
349 return FALSE;
350 }
351
352 /**
353 Retrieve the serialNumber from one X.509 certificate.
354
355 If Cert is NULL, then return FALSE.
356 If CertSize is 0, then return FALSE.
357 If this interface is not supported, then return FALSE.
358
359 @param[in] Cert Pointer to the DER-encoded X509 certificate.
360 @param[in] CertSize Size of the X509 certificate in bytes.
361 @param[out] SerialNumber Pointer to the retrieved certificate SerialNumber bytes.
362 @param[in, out] SerialNumberSize The size in bytes of the SerialNumber buffer on input,
363 and the size of buffer returned SerialNumber on output.
364
365 @retval TRUE The certificate serialNumber retrieved successfully.
366 @retval FALSE If Cert is NULL or CertSize is Zero.
367 If SerialNumberSize is NULL.
368 If Certificate is invalid.
369 @retval FALSE If no SerialNumber exists.
370 @retval FALSE If the SerialNumber is NULL. The required buffer size
371 (including the final null) is returned in the
372 SerialNumberSize parameter.
373 @retval FALSE The operation is not supported.
374 **/
375 BOOLEAN
376 EFIAPI
377 X509GetSerialNumber (
378 IN CONST UINT8 *Cert,
379 IN UINTN CertSize,
380 OUT UINT8 *SerialNumber, OPTIONAL
381 IN OUT UINTN *SerialNumberSize
382 )
383 {
384 ASSERT (FALSE);
385 return FALSE;
386 }
387
388 /**
389 Retrieve the issuer bytes from one X.509 certificate.
390
391 If Cert is NULL, then return FALSE.
392 If CertIssuerSize is NULL, then return FALSE.
393 If this interface is not supported, then return FALSE.
394
395 @param[in] Cert Pointer to the DER-encoded X509 certificate.
396 @param[in] CertSize Size of the X509 certificate in bytes.
397 @param[out] CertIssuer Pointer to the retrieved certificate subject bytes.
398 @param[in, out] CertIssuerSize The size in bytes of the CertIssuer buffer on input,
399 and the size of buffer returned CertSubject on output.
400
401 @retval TRUE The certificate issuer retrieved successfully.
402 @retval FALSE Invalid certificate, or the CertIssuerSize is too small for the result.
403 The CertIssuerSize will be updated with the required size.
404 @retval FALSE This interface is not supported.
405
406 **/
407 BOOLEAN
408 EFIAPI
409 X509GetIssuerName (
410 IN CONST UINT8 *Cert,
411 IN UINTN CertSize,
412 OUT UINT8 *CertIssuer,
413 IN OUT UINTN *CertIssuerSize
414 )
415 {
416 ASSERT (FALSE);
417 return FALSE;
418 }
419
420 /**
421 Retrieve the Signature Algorithm from one X.509 certificate.
422
423 @param[in] Cert Pointer to the DER-encoded X509 certificate.
424 @param[in] CertSize Size of the X509 certificate in bytes.
425 @param[out] Oid Signature Algorithm Object identifier buffer.
426 @param[in,out] OidSize Signature Algorithm Object identifier buffer size
427
428 @retval TRUE The certificate Extension data retrieved successfully.
429 @retval FALSE If Cert is NULL.
430 If OidSize is NULL.
431 If Oid is not NULL and *OidSize is 0.
432 If Certificate is invalid.
433 @retval FALSE If no SignatureType.
434 @retval FALSE If the Oid is NULL. The required buffer size
435 is returned in the OidSize.
436 @retval FALSE The operation is not supported.
437 **/
438 BOOLEAN
439 EFIAPI
440 X509GetSignatureAlgorithm (
441 IN CONST UINT8 *Cert,
442 IN UINTN CertSize,
443 OUT UINT8 *Oid, OPTIONAL
444 IN OUT UINTN *OidSize
445 )
446 {
447 ASSERT (FALSE);
448 return FALSE;
449 }
450
451 /**
452 Retrieve Extension data from one X.509 certificate.
453
454 @param[in] Cert Pointer to the DER-encoded X509 certificate.
455 @param[in] CertSize Size of the X509 certificate in bytes.
456 @param[in] Oid Object identifier buffer
457 @param[in] OidSize Object identifier buffer size
458 @param[out] ExtensionData Extension bytes.
459 @param[in, out] ExtensionDataSize Extension bytes size.
460
461 @retval TRUE The certificate Extension data retrieved successfully.
462 @retval FALSE If Cert is NULL.
463 If ExtensionDataSize is NULL.
464 If ExtensionData is not NULL and *ExtensionDataSize is 0.
465 If Certificate is invalid.
466 @retval FALSE If no Extension entry match Oid.
467 @retval FALSE If the ExtensionData is NULL. The required buffer size
468 is returned in the ExtensionDataSize parameter.
469 @retval FALSE The operation is not supported.
470 **/
471 BOOLEAN
472 EFIAPI
473 X509GetExtensionData (
474 IN CONST UINT8 *Cert,
475 IN UINTN CertSize,
476 IN CONST UINT8 *Oid,
477 IN UINTN OidSize,
478 OUT UINT8 *ExtensionData,
479 IN OUT UINTN *ExtensionDataSize
480 )
481 {
482 ASSERT (FALSE);
483 return FALSE;
484 }
485
486 /**
487 Retrieve the Extended Key Usage from one X.509 certificate.
488
489 @param[in] Cert Pointer to the DER-encoded X509 certificate.
490 @param[in] CertSize Size of the X509 certificate in bytes.
491 @param[out] Usage Key Usage bytes.
492 @param[in, out] UsageSize Key Usage buffer sizs in bytes.
493
494 @retval TRUE The Usage bytes retrieve successfully.
495 @retval FALSE If Cert is NULL.
496 If CertSize is NULL.
497 If Usage is not NULL and *UsageSize is 0.
498 If Cert is invalid.
499 @retval FALSE If the Usage is NULL. The required buffer size
500 is returned in the UsageSize parameter.
501 @retval FALSE The operation is not supported.
502 **/
503 BOOLEAN
504 EFIAPI
505 X509GetExtendedKeyUsage (
506 IN CONST UINT8 *Cert,
507 IN UINTN CertSize,
508 OUT UINT8 *Usage,
509 IN OUT UINTN *UsageSize
510 )
511 {
512 ASSERT (FALSE);
513 return FALSE;
514 }
515
516 /**
517 Retrieve the Validity from one X.509 certificate
518
519 If Cert is NULL, then return FALSE.
520 If CertIssuerSize is NULL, then return FALSE.
521 If this interface is not supported, then return FALSE.
522
523 @param[in] Cert Pointer to the DER-encoded X509 certificate.
524 @param[in] CertSize Size of the X509 certificate in bytes.
525 @param[in] From notBefore Pointer to DateTime object.
526 @param[in,out] FromSize notBefore DateTime object size.
527 @param[in] To notAfter Pointer to DateTime object.
528 @param[in,out] ToSize notAfter DateTime object size.
529
530 Note: X509CompareDateTime to compare DateTime oject
531 x509SetDateTime to get a DateTime object from a DateTimeStr
532
533 @retval TRUE The certificate Validity retrieved successfully.
534 @retval FALSE Invalid certificate, or Validity retrieve failed.
535 @retval FALSE This interface is not supported.
536 **/
537 BOOLEAN
538 EFIAPI
539 X509GetValidity (
540 IN CONST UINT8 *Cert,
541 IN UINTN CertSize,
542 IN UINT8 *From,
543 IN OUT UINTN *FromSize,
544 IN UINT8 *To,
545 IN OUT UINTN *ToSize
546 )
547 {
548 ASSERT (FALSE);
549 return FALSE;
550 }
551
552 /**
553 Format a DateTimeStr to DataTime object in DataTime Buffer
554
555 If DateTimeStr is NULL, then return FALSE.
556 If DateTimeSize is NULL, then return FALSE.
557 If this interface is not supported, then return FALSE.
558
559 @param[in] DateTimeStr DateTime string like YYYYMMDDhhmmssZ
560 Ref: https://www.w3.org/TR/NOTE-datetime
561 Z stand for UTC time
562 @param[out] DateTime Pointer to a DateTime object.
563 @param[in,out] DateTimeSize DateTime object buffer size.
564
565 @retval TRUE The DateTime object create successfully.
566 @retval FALSE If DateTimeStr is NULL.
567 If DateTimeSize is NULL.
568 If DateTime is not NULL and *DateTimeSize is 0.
569 If Year Month Day Hour Minute Second combination is invalid datetime.
570 @retval FALSE If the DateTime is NULL. The required buffer size
571 (including the final null) is returned in the
572 DateTimeSize parameter.
573 @retval FALSE The operation is not supported.
574 **/
575 BOOLEAN
576 EFIAPI
577 X509FormatDateTime (
578 IN CONST CHAR8 *DateTimeStr,
579 OUT VOID *DateTime,
580 IN OUT UINTN *DateTimeSize
581 )
582 {
583 ASSERT (FALSE);
584 return FALSE;
585 }
586
587 /**
588 Compare DateTime1 object and DateTime2 object.
589
590 If DateTime1 is NULL, then return -2.
591 If DateTime2 is NULL, then return -2.
592 If DateTime1 == DateTime2, then return 0
593 If DateTime1 > DateTime2, then return 1
594 If DateTime1 < DateTime2, then return -1
595
596 @param[in] DateTime1 Pointer to a DateTime Ojbect
597 @param[in] DateTime2 Pointer to a DateTime Object
598
599 @retval 0 If DateTime1 == DateTime2
600 @retval 1 If DateTime1 > DateTime2
601 @retval -1 If DateTime1 < DateTime2
602 **/
603 INT32
604 EFIAPI
605 X509CompareDateTime (
606 IN CONST VOID *DateTime1,
607 IN CONST VOID *DateTime2
608 )
609 {
610 ASSERT (FALSE);
611 return -3;
612 }
613
614 /**
615 Retrieve the Key Usage from one X.509 certificate.
616
617 @param[in] Cert Pointer to the DER-encoded X509 certificate.
618 @param[in] CertSize Size of the X509 certificate in bytes.
619 @param[out] Usage Key Usage (CRYPTO_X509_KU_*)
620
621 @retval TRUE The certificate Key Usage retrieved successfully.
622 @retval FALSE Invalid certificate, or Usage is NULL
623 @retval FALSE This interface is not supported.
624 **/
625 BOOLEAN
626 EFIAPI
627 X509GetKeyUsage (
628 IN CONST UINT8 *Cert,
629 IN UINTN CertSize,
630 OUT UINTN *Usage
631 )
632 {
633 ASSERT (FALSE);
634 return FALSE;
635 }
636
637 /**
638 Verify one X509 certificate was issued by the trusted CA.
639 @param[in] RootCert Trusted Root Certificate buffer
640
641 @param[in] RootCertLength Trusted Root Certificate buffer length
642 @param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
643 where the first certificate is signed by the Root
644 Certificate or is the Root Cerificate itself. and
645 subsequent cerificate is signed by the preceding
646 cerificate.
647 @param[in] CertChainLength Total length of the certificate chain, in bytes.
648
649 @retval TRUE All cerificates was issued by the first certificate in X509Certchain.
650 @retval FALSE Invalid certificate or the certificate was not issued by the given
651 trusted CA.
652 **/
653 BOOLEAN
654 EFIAPI
655 X509VerifyCertChain (
656 IN CONST UINT8 *RootCert,
657 IN UINTN RootCertLength,
658 IN CONST UINT8 *CertChain,
659 IN UINTN CertChainLength
660 )
661 {
662 ASSERT (FALSE);
663 return FALSE;
664 }
665
666 /**
667 Get one X509 certificate from CertChain.
668
669 @param[in] CertChain One or more ASN.1 DER-encoded X.509 certificates
670 where the first certificate is signed by the Root
671 Certificate or is the Root Cerificate itself. and
672 subsequent cerificate is signed by the preceding
673 cerificate.
674 @param[in] CertChainLength Total length of the certificate chain, in bytes.
675
676 @param[in] CertIndex Index of certificate.
677
678 @param[out] Cert The certificate at the index of CertChain.
679 @param[out] CertLength The length certificate at the index of CertChain.
680
681 @retval TRUE Success.
682 @retval FALSE Failed to get certificate from certificate chain.
683 **/
684 BOOLEAN
685 EFIAPI
686 X509GetCertFromCertChain (
687 IN CONST UINT8 *CertChain,
688 IN UINTN CertChainLength,
689 IN CONST INT32 CertIndex,
690 OUT CONST UINT8 **Cert,
691 OUT UINTN *CertLength
692 )
693 {
694 ASSERT (FALSE);
695 return FALSE;
696 }
697
698 /**
699 Retrieve the tag and length of the tag.
700
701 @param Ptr The position in the ASN.1 data
702 @param End End of data
703 @param Length The variable that will receive the length
704 @param Tag The expected tag
705
706 @retval TRUE Get tag successful
707 @retval FALSe Failed to get tag or tag not match
708 **/
709 BOOLEAN
710 EFIAPI
711 Asn1GetTag (
712 IN OUT UINT8 **Ptr,
713 IN CONST UINT8 *End,
714 OUT UINTN *Length,
715 IN UINT32 Tag
716 )
717 {
718 ASSERT (FALSE);
719 return FALSE;
720 }
721
722 /**
723 Retrieve the basic constraints from one X.509 certificate.
724
725 @param[in] Cert Pointer to the DER-encoded X509 certificate.
726 @param[in] CertSize size of the X509 certificate in bytes.
727 @param[out] BasicConstraints basic constraints bytes.
728 @param[in, out] BasicConstraintsSize basic constraints buffer sizs in bytes.
729
730 @retval TRUE The basic constraints retrieve successfully.
731 @retval FALSE If cert is NULL.
732 If cert_size is NULL.
733 If basic_constraints is not NULL and *basic_constraints_size is 0.
734 If cert is invalid.
735 @retval FALSE The required buffer size is small.
736 The return buffer size is basic_constraints_size parameter.
737 @retval FALSE If no Extension entry match oid.
738 @retval FALSE The operation is not supported.
739 **/
740 BOOLEAN
741 EFIAPI
742 X509GetExtendedBasicConstraints (
743 CONST UINT8 *Cert,
744 UINTN CertSize,
745 UINT8 *BasicConstraints,
746 UINTN *BasicConstraintsSize
747 )
748 {
749 ASSERT (FALSE);
750 return FALSE;
751 }