projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
EVP_PKEY_CTX utility functions.
[oweals/openssl.git]
/
crypto
/
x509
/
x509_req.c
diff --git
a/crypto/x509/x509_req.c
b/crypto/x509/x509_req.c
index a8b838cff9811651d406e140c914217c775f70b0..c67f609f07ecabbfb41dd076d5a6ce3cfd94a601 100644
(file)
--- a/
crypto/x509/x509_req.c
+++ b/
crypto/x509/x509_req.c
@@
-1,4
+1,3
@@
-/* crypto/x509/x509_req.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@
-92,11
+91,10
@@
X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md)
if (!X509_REQ_set_subject_name(ret, X509_get_subject_name(x)))
goto err;
if (!X509_REQ_set_subject_name(ret, X509_get_subject_name(x)))
goto err;
- pktmp = X509_get_pubkey(x);
+ pktmp = X509_get
0
_pubkey(x);
if (pktmp == NULL)
goto err;
i = X509_REQ_set_pubkey(ret, pktmp);
if (pktmp == NULL)
goto err;
i = X509_REQ_set_pubkey(ret, pktmp);
- EVP_PKEY_free(pktmp);
if (!i)
goto err;
if (!i)
goto err;
@@
-117,6
+115,11
@@
EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req)
return (X509_PUBKEY_get(req->req_info.pubkey));
}
return (X509_PUBKEY_get(req->req_info.pubkey));
}
+X509_PUBKEY *X509_REQ_get_X509_PUBKEY(X509_REQ *req)
+{
+ return req->req_info.pubkey;
+}
+
int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
{
EVP_PKEY *xk = NULL;
int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
{
EVP_PKEY *xk = NULL;
@@
-136,13
+139,13
@@
int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
break;
case -2:
#ifndef OPENSSL_NO_EC
break;
case -2:
#ifndef OPENSSL_NO_EC
- if (
k->type
== EVP_PKEY_EC) {
+ if (
EVP_PKEY_id(k)
== EVP_PKEY_EC) {
X509err(X509_F_X509_REQ_CHECK_PRIVATE_KEY, ERR_R_EC_LIB);
break;
}
#endif
#ifndef OPENSSL_NO_DH
X509err(X509_F_X509_REQ_CHECK_PRIVATE_KEY, ERR_R_EC_LIB);
break;
}
#endif
#ifndef OPENSSL_NO_DH
- if (
k->type
== EVP_PKEY_DH) {
+ if (
EVP_PKEY_id(k)
== EVP_PKEY_DH) {
/* No idea */
X509err(X509_F_X509_REQ_CHECK_PRIVATE_KEY,
X509_R_CANT_CHECK_DH_KEY);
/* No idea */
X509err(X509_F_X509_REQ_CHECK_PRIVATE_KEY,
X509_R_CANT_CHECK_DH_KEY);