projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
correctly encode OIDs near 2^32
[oweals/openssl.git]
/
crypto
/
asn1
/
i2d_pu.c
diff --git
a/crypto/asn1/i2d_pu.c
b/crypto/asn1/i2d_pu.c
index 8f73d37d033b7d63a3ed7b1899baee666d6728f1..34286dbd359f9a7724057c9fb737765b5c2a80fb 100644
(file)
--- a/
crypto/asn1/i2d_pu.c
+++ b/
crypto/asn1/i2d_pu.c
@@
-61,18
+61,31
@@
#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_EC
+#include <openssl/ec.h>
+#endif
int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp)
{
switch (a->type)
{
int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp)
{
switch (a->type)
{
-#ifndef NO_RSA
+#ifndef
OPENSSL_
NO_RSA
case EVP_PKEY_RSA:
return(i2d_RSAPublicKey(a->pkey.rsa,pp));
#endif
case EVP_PKEY_RSA:
return(i2d_RSAPublicKey(a->pkey.rsa,pp));
#endif
-#ifndef NO_DSA
+#ifndef
OPENSSL_
NO_DSA
case EVP_PKEY_DSA:
return(i2d_DSAPublicKey(a->pkey.dsa,pp));
case EVP_PKEY_DSA:
return(i2d_DSAPublicKey(a->pkey.dsa,pp));
+#endif
+#ifndef OPENSSL_NO_EC
+ case EVP_PKEY_EC:
+ return(i2o_ECPublicKey(a->pkey.ec, pp));
#endif
default:
ASN1err(ASN1_F_I2D_PUBLICKEY,ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE);
#endif
default:
ASN1err(ASN1_F_I2D_PUBLICKEY,ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE);