projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix link for ASN1_generate_nconf
[openssl.git]
/
crypto
/
asn1
/
i2d_pr.c
diff --git
a/crypto/asn1/i2d_pr.c
b/crypto/asn1/i2d_pr.c
index 71d6910204a1acc7c32e51554b3322699d87104a..0ca7b70b16c70e98b7bc6d61fb0439fa511227a2 100644
(file)
--- a/
crypto/asn1/i2d_pr.c
+++ b/
crypto/asn1/i2d_pr.c
@@
-58,26
+58,15
@@
#include <stdio.h>
#include "cryptlib.h"
#include <stdio.h>
#include "cryptlib.h"
-#include <openssl/bn.h>
#include <openssl/evp.h>
#include <openssl/evp.h>
-#include
<openssl/objects.h>
+#include
"asn1_locl.h"
int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp)
{
int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp)
{
-#ifndef NO_RSA
- if (a->type == EVP_PKEY_RSA)
+ if (a->ameth && a->ameth->old_priv_encode)
{
{
- return
(i2d_RSAPrivateKey(a->pkey.rsa,pp)
);
+ return
a->ameth->old_priv_encode(a, pp
);
}
}
- else
-#endif
-#ifndef NO_DSA
- if (a->type == EVP_PKEY_DSA)
- {
- return(i2d_DSAPrivateKey(a->pkey.dsa,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);
}