projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for DJGPP.
[openssl.git]
/
crypto
/
asn1
/
i2d_pr.c
diff --git
a/crypto/asn1/i2d_pr.c
b/crypto/asn1/i2d_pr.c
index 5ae6568112a37cd92834d265d2da500e10a8206b..a40c64d3f4991cbe0105f65331151687ede6da6b 100644
(file)
--- a/
crypto/asn1/i2d_pr.c
+++ b/
crypto/asn1/i2d_pr.c
@@
-61,6
+61,15
@@
#include <openssl/bn.h>
#include <openssl/evp.h>
#include <openssl/objects.h>
#include <openssl/bn.h>
#include <openssl/evp.h>
#include <openssl/objects.h>
+#ifndef OPENSSL_NO_RSA
+#include <openssl/rsa.h>
+#endif
+#ifndef OPENSSL_NO_DSA
+#include <openssl/dsa.h>
+#endif
+#ifndef OPENSSL_NO_ECDSA
+#include <openssl/ecdsa.h>
+#endif
int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp)
{
int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp)
{
@@
-77,6
+86,12
@@
int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp)
return(i2d_DSAPrivateKey(a->pkey.dsa,pp));
}
#endif
return(i2d_DSAPrivateKey(a->pkey.dsa,pp));
}
#endif
+#ifndef OPENSSL_NO_ECDSA
+ if (a->type == EVP_PKEY_ECDSA)
+ {
+ return(i2d_ECDSAPrivateKey(a->pkey.ecdsa, pp));
+ }
+#endif
ASN1err(ASN1_F_I2D_PRIVATEKEY,ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE);
return(-1);
ASN1err(ASN1_F_I2D_PRIVATEKEY,ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE);
return(-1);