PKCS12\_ADD\_CSPNAME\_ASC(3ossl) OpenSSL PKCS12\_ADD\_CSPNAME\_ASC(3ossl)

# [NAME](#NAME)

PKCS12\_add\_CSPName\_asc - Add a Microsoft CSP Name attribute to a PKCS#12 safeBag

# [SYNOPSIS](#SYNOPSIS)

```
 #include <openssl/pkcs12.h>
 int PKCS12_add_CSPName_asc(PKCS12_SAFEBAG *bag, const char *name, int namelen);
```

# [DESCRIPTION](#DESCRIPTION)

**PKCS12\_add\_CSPName\_asc()** adds an ASCII string representation of the Microsoft CSP Name attribute to a PKCS#12 safeBag.

*bag* is the **PKCS12\_SAFEBAG** to add the attribute to.

# [RETURN VALUES](#RETURN_VALUES)

Returns 1 for success or 0 for failure.

# [SEE ALSO](#SEE_ALSO)

[**PKCS12\_add\_friendlyname\_asc**(3)](/man/os/openssl-4.0/PKCS12_add_friendlyname_asc.3)

# [COPYRIGHT](#COPYRIGHT)

Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at &lt;https://www.openssl.org/source/license.html&gt;.

2026-09-29 4.0.3

---

Document: PKCS12_add_CSPName_asc(3ossl) from openssl-4.0 4.0.3-r1 (Chainguard OS)
