My Project
Loading...
Searching...
No Matches
asn_public.h
1
22WOLFSSL_API int wc_InitCert(Cert*);
23
67WOLFSSL_API int wc_MakeCert(Cert*, byte* derBuffer, word32 derSz, RsaKey*,
68 ecc_key*, WC_RNG*);
69
114WOLFSSL_API int wc_MakeCertReq(Cert*, byte* derBuffer, word32 derSz,
115 RsaKey*, ecc_key*);
116
167WOLFSSL_API int wc_SignCert(int requestSz, int sigType, byte* derBuffer,
168 word32 derSz, RsaKey*, ecc_key*, WC_RNG*);
169
213WOLFSSL_API int wc_MakeSelfCert(Cert*, byte* derBuffer, word32 derSz, RsaKey*,
214 WC_RNG*);
215
277WOLFSSL_API int wc_SetIssuer(Cert*, const char*);
278
336WOLFSSL_API int wc_SetSubject(Cert*, const char*);
337
338
403WOLFSSL_API int wc_SetSubjectRaw(Cert* cert, const byte* der, int derSz);
404
431WOLFSSL_API int wc_GetSubjectRaw(byte **subjectRaw, Cert *cert);
432
492WOLFSSL_API int wc_SetAltNames(Cert*, const char*);
493
558WOLFSSL_API int wc_SetIssuerBuffer(Cert*, const byte*, int);
559
624WOLFSSL_API int wc_SetIssuerRaw(Cert* cert, const byte* der, int derSz);
625
689WOLFSSL_API int wc_SetSubjectBuffer(Cert*, const byte*, int);
690
757WOLFSSL_API int wc_SetAltNamesBuffer(Cert*, const byte*, int);
758
822WOLFSSL_API int wc_SetDatesBuffer(Cert*, const byte*, int);
823
856WOLFSSL_API int wc_SetAuthKeyIdFromPublicKey(Cert *cert, RsaKey *rsakey,
857 ecc_key *eckey);
858
887WOLFSSL_API int wc_SetAuthKeyIdFromCert(Cert *cert, const byte *der, int derSz);
888
916WOLFSSL_API int wc_SetAuthKeyId(Cert *cert, const char* file);
917
948WOLFSSL_API int wc_SetSubjectKeyIdFromPublicKey(Cert *cert, RsaKey *rsakey,
949 ecc_key *eckey);
950
980WOLFSSL_API int wc_SetSubjectKeyId(Cert *cert, const char* file);
981
1012WOLFSSL_API int wc_SetSubjectKeyIdFromNtruPublicKey(Cert *cert, byte *ntruKey,
1013 word16 ntruKeySz);
1014
1047WOLFSSL_API int wc_SetKeyUsage(Cert *cert, const char *value);
1048
1096WOLFSSL_API int wc_MakeNtruCert(Cert*, byte* derBuffer, word32 derSz,
1097 const byte* ntruKey, word16 keySz,
1098 WC_RNG*);
1099
1128WOLFSSL_API int wc_PemPubKeyToDer(const char* fileName,
1129 unsigned char* derBuf, int derSz);
1130
1160WOLFSSL_API int wc_PubKeyPemToDer(const unsigned char*, int,
1161 unsigned char*, int);
1162
1195WOLFSSL_API
1196int wc_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz);
1197
1238WOLFSSL_API int wc_DerToPem(const byte* der, word32 derSz, byte* output,
1239 word32 outputSz, int type);
1240
1283WOLFSSL_API int wc_DerToPemEx(const byte* der, word32 derSz, byte* output,
1284 word32 outputSz, byte *cipherIno, int type);
1285
1321WOLFSSL_API int wc_KeyPemToDer(const unsigned char*, int,
1322 unsigned char*, int, const char*);
1323
1353WOLFSSL_API int wc_CertPemToDer(const unsigned char*, int,
1354 unsigned char*, int, int);
1355
1413WOLFSSL_API int wc_EccPrivateKeyDecode(const byte*, word32*,
1414 ecc_key*, word32);
1415
1458WOLFSSL_API int wc_EccKeyToDer(ecc_key*, byte* output, word32 inLen);
1459
1492WOLFSSL_API int wc_EccPublicKeyDecode(const byte*, word32*,
1493 ecc_key*, word32);
1494
1533WOLFSSL_API int wc_EccPublicKeyToDer(ecc_key*, byte* output,
1534 word32 inLen, int with_AlgCurve);
1535
1569WOLFSSL_API word32 wc_EncodeSignature(byte* out, const byte* digest,
1570 word32 digSz, int hashOID);
1571
1599WOLFSSL_API int wc_GetCTC_HashOID(int type);
1600
1630WOLFSSL_API void wc_SetCert_Free(Cert* cert);
1631
WOLFSSL_API int wc_DerToPemEx(const byte *der, word32 derSz, byte *output, word32 outputSz, byte *cipherIno, int type)
This function converts a der formatted input certificate, contained in the der buffer,...
Definition asn.c:10173
WOLFSSL_API int wc_MakeCert(Cert *, byte *derBuffer, word32 derSz, RsaKey *, ecc_key *, WC_RNG *)
Used to make CA signed certs. Called after the subject information has been entered....
Definition asn.c:13430
WOLFSSL_API int wc_SetIssuerRaw(Cert *cert, const byte *der, int derSz)
This function sets the raw issuer for a certificate from the issuer in the provided der buffer....
Definition asn.c:14865
WOLFSSL_API int wc_SetSubjectBuffer(Cert *, const byte *, int)
This function sets the subject for a certificate from the subject in the provided der buffer....
Definition asn.c:14807
WOLFSSL_API int wc_GetCTC_HashOID(int type)
This function returns the hash OID that corresponds to a hashing type. For example,...
Definition asn.c:6874
WOLFSSL_API int wc_SetIssuer(Cert *, const char *)
This function sets the issuer for a certificate to the issuer in the provided pem issuerFile....
Definition asn.c:14701
WOLFSSL_API int wc_EccPrivateKeyDecode(const byte *, word32 *, ecc_key *, word32)
This function reads in an ECC private key from the input buffer, input, parses the private key,...
Definition asn.c:15166
WOLFSSL_API int wc_SignCert(int requestSz, int sigType, byte *derBuffer, word32 derSz, RsaKey *, ecc_key *, WC_RNG *)
This function signs buffer and adds the signature to the end of buffer. It takes in a signature type....
Definition asn.c:13918
WOLFSSL_API int wc_EccPublicKeyToDer(ecc_key *, byte *output, word32 inLen, int with_AlgCurve)
This function converts the ECC public key to DER format. It returns the size of buffer used....
Definition asn.c:11565
WOLFSSL_API word32 wc_EncodeSignature(byte *out, const byte *digest, word32 digSz, int hashOID)
This function encodes a digital signature into the output buffer, and returns the size of the encoded...
Definition asn.c:6852
WOLFSSL_API int wc_SetAltNames(Cert *, const char *)
This function sets the alternate names for a certificate to the alternate names in the provided pem f...
Definition asn.c:14752
WOLFSSL_API int wc_PemPubKeyToDer(const char *fileName, unsigned char *derBuf, int derSz)
Loads a PEM key from a file and converts to a DER encoded buffer.
Definition asn.c:10856
WOLFSSL_API int wc_MakeNtruCert(Cert *, byte *derBuffer, word32 derSz, const byte *ntruKey, word16 keySz, WC_RNG *)
Used to make CA signed certs. Called after the subject information has been entered....
Definition asn.c:13440
WOLFSSL_API int wc_SetSubjectKeyId(Cert *cert, const char *file)
Set SKID from public key file in PEM format. Both arguments are required.
Definition asn.c:14097
WOLFSSL_API int wc_SetSubject(Cert *, const char *)
This function sets the subject for a certificate to the subject in the provided pem subjectFile....
Definition asn.c:14726
WOLFSSL_API int wc_SetSubjectKeyIdFromPublicKey(Cert *cert, RsaKey *rsakey, ecc_key *eckey)
Set SKID from RSA or ECC public key.
Definition asn.c:14050
WOLFSSL_API int wc_SetIssuerBuffer(Cert *, const byte *, int)
This function sets the issuer for a certificate from the issuer in the provided der buffer....
Definition asn.c:14779
WOLFSSL_API int wc_SetAuthKeyId(Cert *cert, const char *file)
Set AKID from certificate file in PEM format.
Definition asn.c:14250
WOLFSSL_API int wc_EccKeyToDer(ecc_key *, byte *output, word32 inLen)
This function writes a private ECC key to der format.
Definition asn.c:15685
WOLFSSL_API int wc_GetSubjectRaw(byte **subjectRaw, Cert *cert)
This function gets the raw subject from the certificate structure.
Definition asn.c:13943
WOLFSSL_API int wc_SetAuthKeyIdFromCert(Cert *cert, const byte *der, int derSz)
Set AKID from from DER encoded certificate.
Definition asn.c:14221
WOLFSSL_API int wc_PubKeyPemToDer(const unsigned char *, int, unsigned char *, int)
Convert a PEM encoded public key to DER. Returns the number of bytes written to the buffer or a negat...
Definition asn.c:10738
WOLFSSL_API int wc_DerToPem(const byte *der, word32 derSz, byte *output, word32 outputSz, int type)
This function converts a der formatted input certificate, contained in the der buffer,...
Definition asn.c:10165
WOLFSSL_API int wc_MakeCertReq(Cert *, byte *derBuffer, word32 derSz, RsaKey *, ecc_key *)
This function makes a certificate signing request using the input certificate and writes the output t...
Definition asn.c:13810
WOLFSSL_API int wc_EccPublicKeyDecode(const byte *, word32 *, ecc_key *, word32)
Decodes an ECC public key from an input buffer. It will parse an ASN sequence to retrieve the ECC key...
Definition asn.c:15369
WOLFSSL_API int wc_MakeSelfCert(Cert *, byte *derBuffer, word32 derSz, RsaKey *, WC_RNG *)
This function is a combination of the previous two functions, wc_MakeCert and wc_SignCert for self si...
Definition asn.c:13925
WOLFSSL_API int wc_SetSubjectKeyIdFromNtruPublicKey(Cert *cert, byte *ntruKey, word16 ntruKeySz)
Set SKID from NTRU public key.
Definition asn.c:14058
WOLFSSL_API void wc_SetCert_Free(Cert *cert)
This function cleans up memory and resources used by the certificate structure's decoded cert cache....
WOLFSSL_API int wc_SetAltNamesBuffer(Cert *, const byte *, int)
This function sets the alternate names for a certificate from the alternate names in the provided der...
Definition asn.c:14899
WOLFSSL_API int wc_SetSubjectRaw(Cert *cert, const byte *der, int derSz)
This function sets the raw subject for a certificate from the subject in the provided der buffer....
Definition asn.c:14833
WOLFSSL_API int wc_SetDatesBuffer(Cert *, const byte *, int)
This function sets the dates for a certificate from the date range in the provided der buffer....
Definition asn.c:14925
WOLFSSL_API int wc_PemCertToDer(const char *fileName, unsigned char *derBuf, int derSz)
This function converts a pem certificate to a der certificate, and places the resulting certificate i...
Definition asn.c:10776
WOLFSSL_API int wc_InitCert(Cert *)
This function initializes a default cert, with the default options: version = 3 (0x2),...
Definition asn.c:11273
WOLFSSL_API int wc_SetAuthKeyIdFromPublicKey(Cert *cert, RsaKey *rsakey, ecc_key *eckey)
Set AKID from either an RSA or ECC public key. note: Only set one of rsakey or eckey,...
Definition asn.c:14087
WOLFSSL_API int wc_CertPemToDer(const unsigned char *, int, unsigned char *, int, int)
This function converts a PEM formatted certificate to DER format. Calls OpenSSL function PemToDer.
Definition asn.c:10692
WOLFSSL_API int wc_KeyPemToDer(const unsigned char *, int, unsigned char *, int, const char *)
Converts a key in PEM format to DER format.
Definition asn.c:10636
WOLFSSL_API int wc_SetKeyUsage(Cert *cert, const char *value)
This function allows you to set the key usage using a comma delimited string of tokens....
Definition asn.c:14281
Definition asn_public.h:293
Definition user_rsa.h:60
Definition random.h:153
Definition ecc.h:357