---
title: "System::Security::Cryptography::X509Certificates::X509Certificate::CreateFromCertFile method"
url: "https://reference.aspose.com/pub/cpp/system.security.cryptography.x509certificates/x509certificate/createfromcertfile/"
product: "Aspose.PUB for C++"
description: "System::Security::Cryptography::X509Certificates::X509Certificate::CreateFromCertFile method. Creates sertificate from the specified PKCS7 file in C++."
---

## X509Certificate::CreateFromCertFile method


Creates sertificate from the specified PKCS7 file.

```cpp
static SharedPtr<X509Certificate> System::Security::Cryptography::X509Certificates::X509Certificate::CreateFromCertFile(const String &filename)
```


| Parameter | Type | Description |
| --- | --- | --- |
| filename | const String\& | Certificate file name. |

### ReturnValue

The newly created certificate.

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [X509Certificate](../)
* Class [String](../../../system/string/)
* Class [X509Certificate](../)
* Namespace [System::Security::Cryptography::X509Certificates](../../)
* Library [Aspose.PUB for C++](../../../)
