diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-09-03 23:13:48 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-09-03 23:13:48 +0000 |
commit | bd08a2bd0c1078e396c02a1ba11205a0d0a3a2a7 (patch) | |
tree | 66e5c988db7ad992f2697d1d545ed06c55b5e8a0 /crypto/x509 | |
parent | 55ac522068e616d8a4d1bd5590f3b2d08d4ba25c (diff) |
Add 'rsautl' low level RSA utility.
Add DER public key routines.
Add -passin argument to 'ca' utility.
Document sign and verify options to dgst.
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/x509.h | 4 | ||||
-rw-r--r-- | crypto/x509/x_all.c | 22 |
2 files changed, 26 insertions, 0 deletions
diff --git a/crypto/x509/x509.h b/crypto/x509/x509.h index ffa6e01251..7808b6a112 100644 --- a/crypto/x509/x509.h +++ b/crypto/x509/x509.h @@ -744,6 +744,8 @@ int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,PKCS8_PRIV_KEY_INFO *p8inf); int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key); int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey); EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a); +int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey); +EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a); #endif #ifndef NO_BIO @@ -775,6 +777,8 @@ int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,PKCS8_PRIV_KEY_INFO *p8inf); int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key); int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey); EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a); +int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey); +EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a); #endif X509 *X509_dup(X509 *x509); diff --git a/crypto/x509/x_all.c b/crypto/x509/x_all.c index dd5796e205..9bd6e2a39b 100644 --- a/crypto/x509/x_all.c +++ b/crypto/x509/x_all.c @@ -504,6 +504,17 @@ EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a) (char *(*)())d2i_AutoPrivateKey, (fp),(unsigned char **)(a))); } +int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey) + { + return(ASN1_i2d_fp(i2d_PUBKEY,fp,(unsigned char *)pkey)); + } + +EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a) +{ + return((EVP_PKEY *)ASN1_d2i_fp((char *(*)())EVP_PKEY_new, + (char *(*)())d2i_PUBKEY, (fp),(unsigned char **)(a))); +} + #endif PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, @@ -541,3 +552,14 @@ EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a) return((EVP_PKEY *)ASN1_d2i_bio((char *(*)())EVP_PKEY_new, (char *(*)())d2i_AutoPrivateKey, (bp),(unsigned char **)(a))); } + +int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey) + { + return(ASN1_i2d_bio(i2d_PUBKEY,bp,(unsigned char *)pkey)); + } + +EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a) + { + return((EVP_PKEY *)ASN1_d2i_bio((char *(*)())EVP_PKEY_new, + (char *(*)())d2i_PUBKEY, (bp),(unsigned char **)(a))); + } |