wolfSSL 3.11.1 for TLS1.3 beta
Fork of wolfSSL by
wolfssl/openssl/pem.h@3:6f956bdb3073, 2016-04-28 (annotated)
- Committer:
- wolfSSL
- Date:
- Thu Apr 28 00:56:55 2016 +0000
- Revision:
- 3:6f956bdb3073
wolfSSL 3.9.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wolfSSL | 3:6f956bdb3073 | 1 | /* pem.h for openssl */ |
wolfSSL | 3:6f956bdb3073 | 2 | |
wolfSSL | 3:6f956bdb3073 | 3 | |
wolfSSL | 3:6f956bdb3073 | 4 | #ifndef WOLFSSL_PEM_H_ |
wolfSSL | 3:6f956bdb3073 | 5 | #define WOLFSSL_PEM_H_ |
wolfSSL | 3:6f956bdb3073 | 6 | |
wolfSSL | 3:6f956bdb3073 | 7 | #include <wolfssl/openssl/evp.h> |
wolfSSL | 3:6f956bdb3073 | 8 | #include <wolfssl/openssl/bio.h> |
wolfSSL | 3:6f956bdb3073 | 9 | #include <wolfssl/openssl/rsa.h> |
wolfSSL | 3:6f956bdb3073 | 10 | #include <wolfssl/openssl/dsa.h> |
wolfSSL | 3:6f956bdb3073 | 11 | |
wolfSSL | 3:6f956bdb3073 | 12 | #ifdef __cplusplus |
wolfSSL | 3:6f956bdb3073 | 13 | extern "C" { |
wolfSSL | 3:6f956bdb3073 | 14 | #endif |
wolfSSL | 3:6f956bdb3073 | 15 | |
wolfSSL | 3:6f956bdb3073 | 16 | |
wolfSSL | 3:6f956bdb3073 | 17 | /* RSA */ |
wolfSSL | 3:6f956bdb3073 | 18 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 19 | int wolfSSL_PEM_write_bio_RSAPrivateKey(WOLFSSL_BIO* bio, WOLFSSL_RSA* rsa, |
wolfSSL | 3:6f956bdb3073 | 20 | const EVP_CIPHER* cipher, |
wolfSSL | 3:6f956bdb3073 | 21 | unsigned char* passwd, int len, |
wolfSSL | 3:6f956bdb3073 | 22 | pem_password_cb cb, void* arg); |
wolfSSL | 3:6f956bdb3073 | 23 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 24 | int wolfSSL_PEM_write_mem_RSAPrivateKey(RSA* rsa, const EVP_CIPHER* cipher, |
wolfSSL | 3:6f956bdb3073 | 25 | unsigned char* passwd, int len, |
wolfSSL | 3:6f956bdb3073 | 26 | unsigned char **pem, int *plen); |
wolfSSL | 3:6f956bdb3073 | 27 | #if !defined(NO_FILESYSTEM) |
wolfSSL | 3:6f956bdb3073 | 28 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 29 | int wolfSSL_PEM_write_RSAPrivateKey(FILE *fp, WOLFSSL_RSA *rsa, |
wolfSSL | 3:6f956bdb3073 | 30 | const EVP_CIPHER *enc, |
wolfSSL | 3:6f956bdb3073 | 31 | unsigned char *kstr, int klen, |
wolfSSL | 3:6f956bdb3073 | 32 | pem_password_cb *cb, void *u); |
wolfSSL | 3:6f956bdb3073 | 33 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 34 | WOLFSSL_RSA *wolfSSL_PEM_read_RSAPublicKey(FILE *fp, WOLFSSL_RSA **x, |
wolfSSL | 3:6f956bdb3073 | 35 | pem_password_cb *cb, void *u); |
wolfSSL | 3:6f956bdb3073 | 36 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 37 | int wolfSSL_PEM_write_RSAPublicKey(FILE *fp, WOLFSSL_RSA *x); |
wolfSSL | 3:6f956bdb3073 | 38 | |
wolfSSL | 3:6f956bdb3073 | 39 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 40 | int wolfSSL_PEM_write_RSA_PUBKEY(FILE *fp, WOLFSSL_RSA *x); |
wolfSSL | 3:6f956bdb3073 | 41 | #endif /* NO_FILESYSTEM */ |
wolfSSL | 3:6f956bdb3073 | 42 | |
wolfSSL | 3:6f956bdb3073 | 43 | /* DSA */ |
wolfSSL | 3:6f956bdb3073 | 44 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 45 | int wolfSSL_PEM_write_bio_DSAPrivateKey(WOLFSSL_BIO* bio, |
wolfSSL | 3:6f956bdb3073 | 46 | WOLFSSL_DSA* dsa, |
wolfSSL | 3:6f956bdb3073 | 47 | const EVP_CIPHER* cipher, |
wolfSSL | 3:6f956bdb3073 | 48 | unsigned char* passwd, int len, |
wolfSSL | 3:6f956bdb3073 | 49 | pem_password_cb cb, void* arg); |
wolfSSL | 3:6f956bdb3073 | 50 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 51 | int wolfSSL_PEM_write_mem_DSAPrivateKey(WOLFSSL_DSA* dsa, |
wolfSSL | 3:6f956bdb3073 | 52 | const EVP_CIPHER* cipher, |
wolfSSL | 3:6f956bdb3073 | 53 | unsigned char* passwd, int len, |
wolfSSL | 3:6f956bdb3073 | 54 | unsigned char **pem, int *plen); |
wolfSSL | 3:6f956bdb3073 | 55 | #if !defined(NO_FILESYSTEM) |
wolfSSL | 3:6f956bdb3073 | 56 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 57 | int wolfSSL_PEM_write_DSAPrivateKey(FILE *fp, WOLFSSL_DSA *dsa, |
wolfSSL | 3:6f956bdb3073 | 58 | const EVP_CIPHER *enc, |
wolfSSL | 3:6f956bdb3073 | 59 | unsigned char *kstr, int klen, |
wolfSSL | 3:6f956bdb3073 | 60 | pem_password_cb *cb, void *u); |
wolfSSL | 3:6f956bdb3073 | 61 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 62 | int wolfSSL_PEM_write_DSA_PUBKEY(FILE *fp, WOLFSSL_DSA *x); |
wolfSSL | 3:6f956bdb3073 | 63 | #endif /* NO_FILESYSTEM */ |
wolfSSL | 3:6f956bdb3073 | 64 | |
wolfSSL | 3:6f956bdb3073 | 65 | /* ECC */ |
wolfSSL | 3:6f956bdb3073 | 66 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 67 | int wolfSSL_PEM_write_bio_ECPrivateKey(WOLFSSL_BIO* bio, WOLFSSL_EC_KEY* ec, |
wolfSSL | 3:6f956bdb3073 | 68 | const EVP_CIPHER* cipher, |
wolfSSL | 3:6f956bdb3073 | 69 | unsigned char* passwd, int len, |
wolfSSL | 3:6f956bdb3073 | 70 | pem_password_cb cb, void* arg); |
wolfSSL | 3:6f956bdb3073 | 71 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 72 | int wolfSSL_PEM_write_mem_ECPrivateKey(WOLFSSL_EC_KEY* key, |
wolfSSL | 3:6f956bdb3073 | 73 | const EVP_CIPHER* cipher, |
wolfSSL | 3:6f956bdb3073 | 74 | unsigned char* passwd, int len, |
wolfSSL | 3:6f956bdb3073 | 75 | unsigned char **pem, int *plen); |
wolfSSL | 3:6f956bdb3073 | 76 | #if !defined(NO_FILESYSTEM) |
wolfSSL | 3:6f956bdb3073 | 77 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 78 | int wolfSSL_PEM_write_ECPrivateKey(FILE *fp, WOLFSSL_EC_KEY *key, |
wolfSSL | 3:6f956bdb3073 | 79 | const EVP_CIPHER *enc, |
wolfSSL | 3:6f956bdb3073 | 80 | unsigned char *kstr, int klen, |
wolfSSL | 3:6f956bdb3073 | 81 | pem_password_cb *cb, void *u); |
wolfSSL | 3:6f956bdb3073 | 82 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 83 | int wolfSSL_PEM_write_EC_PUBKEY(FILE *fp, WOLFSSL_EC_KEY *key); |
wolfSSL | 3:6f956bdb3073 | 84 | #endif /* NO_FILESYSTEM */ |
wolfSSL | 3:6f956bdb3073 | 85 | |
wolfSSL | 3:6f956bdb3073 | 86 | /* EVP_KEY */ |
wolfSSL | 3:6f956bdb3073 | 87 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 88 | WOLFSSL_EVP_PKEY* wolfSSL_PEM_read_bio_PrivateKey(WOLFSSL_BIO* bio, |
wolfSSL | 3:6f956bdb3073 | 89 | WOLFSSL_EVP_PKEY**, |
wolfSSL | 3:6f956bdb3073 | 90 | pem_password_cb cb, |
wolfSSL | 3:6f956bdb3073 | 91 | void* arg); |
wolfSSL | 3:6f956bdb3073 | 92 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 93 | int wolfSSL_EVP_PKEY_type(int type); |
wolfSSL | 3:6f956bdb3073 | 94 | |
wolfSSL | 3:6f956bdb3073 | 95 | #if !defined(NO_FILESYSTEM) |
wolfSSL | 3:6f956bdb3073 | 96 | WOLFSSL_API |
wolfSSL | 3:6f956bdb3073 | 97 | WOLFSSL_EVP_PKEY *wolfSSL_PEM_read_PUBKEY(FILE *fp, EVP_PKEY **x, |
wolfSSL | 3:6f956bdb3073 | 98 | pem_password_cb *cb, void *u); |
wolfSSL | 3:6f956bdb3073 | 99 | #endif /* NO_FILESYSTEM */ |
wolfSSL | 3:6f956bdb3073 | 100 | |
wolfSSL | 3:6f956bdb3073 | 101 | /* RSA */ |
wolfSSL | 3:6f956bdb3073 | 102 | #define PEM_write_bio_RSAPrivateKey wolfSSL_PEM_write_bio_RSAPrivateKey |
wolfSSL | 3:6f956bdb3073 | 103 | #define PEM_write_RSAPrivateKey wolfSSL_PEM_write_RSAPrivateKey |
wolfSSL | 3:6f956bdb3073 | 104 | #define PEM_write_RSA_PUBKEY wolfSSL_PEM_write_RSA_PUBKEY |
wolfSSL | 3:6f956bdb3073 | 105 | #define PEM_write_RSAPublicKey wolfSSL_PEM_write_RSAPublicKey |
wolfSSL | 3:6f956bdb3073 | 106 | #define PEM_read_RSAPublicKey wolfSSL_PEM_read_RSAPublicKey |
wolfSSL | 3:6f956bdb3073 | 107 | /* DSA */ |
wolfSSL | 3:6f956bdb3073 | 108 | #define PEM_write_bio_DSAPrivateKey wolfSSL_PEM_write_bio_DSAPrivateKey |
wolfSSL | 3:6f956bdb3073 | 109 | #define PEM_write_DSAPrivateKey wolfSSL_PEM_write_DSAPrivateKey |
wolfSSL | 3:6f956bdb3073 | 110 | #define PEM_write_DSA_PUBKEY wolfSSL_PEM_write_DSA_PUBKEY |
wolfSSL | 3:6f956bdb3073 | 111 | /* ECC */ |
wolfSSL | 3:6f956bdb3073 | 112 | #define PEM_write_bio_ECPrivateKey wolfSSL_PEM_write_bio_ECPrivateKey |
wolfSSL | 3:6f956bdb3073 | 113 | #define PEM_write_EC_PUBKEY wolfSSL_PEM_write_EC_PUBKEY |
wolfSSL | 3:6f956bdb3073 | 114 | #define PEM_write_ECPrivateKey wolfSSL_PEM_write_ECPrivateKey |
wolfSSL | 3:6f956bdb3073 | 115 | /* EVP_KEY */ |
wolfSSL | 3:6f956bdb3073 | 116 | #define PEM_read_bio_PrivateKey wolfSSL_PEM_read_bio_PrivateKey |
wolfSSL | 3:6f956bdb3073 | 117 | #define PEM_read_PUBKEY wolfSSL_PEM_read_PUBKEY |
wolfSSL | 3:6f956bdb3073 | 118 | #define EVP_PKEY_type wolfSSL_EVP_PKEY_type |
wolfSSL | 3:6f956bdb3073 | 119 | |
wolfSSL | 3:6f956bdb3073 | 120 | #ifdef __cplusplus |
wolfSSL | 3:6f956bdb3073 | 121 | } /* extern "C" */ |
wolfSSL | 3:6f956bdb3073 | 122 | #endif |
wolfSSL | 3:6f956bdb3073 | 123 | |
wolfSSL | 3:6f956bdb3073 | 124 | #endif /* WOLFSSL_PEM_H_ */ |
wolfSSL | 3:6f956bdb3073 | 125 | |
wolfSSL | 3:6f956bdb3073 | 126 |