projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove redundant functions
[openssl.git]
/
ssl
/
ssl_rsa.c
diff --git
a/ssl/ssl_rsa.c
b/ssl/ssl_rsa.c
index 80d9f798123cff9a835858141c11cb243a0891f5..03828b66326262034b515d057469bcbcdfb198da 100644
(file)
--- a/
ssl/ssl_rsa.c
+++ b/
ssl/ssl_rsa.c
@@
-57,12
+57,12
@@
*/
#include <stdio.h>
*/
#include <stdio.h>
+#include "ssl_locl.h"
#include <openssl/bio.h>
#include <openssl/objects.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
#include <openssl/pem.h>
#include <openssl/bio.h>
#include <openssl/objects.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
#include <openssl/pem.h>
-#include "ssl_locl.h"
static int ssl_set_cert(CERT *c, X509 *x509);
static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey);
static int ssl_set_cert(CERT *c, X509 *x509);
static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey);
@@
-170,7
+170,7
@@
int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa)
return(0);
}
return(0);
}
-
CRYPTO_add(&rsa->references,1,CRYPTO_LOCK_RSA
);
+
RSA_up_ref(rsa
);
EVP_PKEY_assign_RSA(pkey,rsa);
ret=ssl_set_pkey(ssl->cert,pkey);
EVP_PKEY_assign_RSA(pkey,rsa);
ret=ssl_set_pkey(ssl->cert,pkey);
@@
-582,7
+582,7
@@
int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa)
return(0);
}
return(0);
}
-
CRYPTO_add(&rsa->references,1,CRYPTO_LOCK_RSA
);
+
RSA_up_ref(rsa
);
EVP_PKEY_assign_RSA(pkey,rsa);
ret=ssl_set_pkey(ctx->cert, pkey);
EVP_PKEY_assign_RSA(pkey,rsa);
ret=ssl_set_pkey(ctx->cert, pkey);
@@
-800,9
+800,9
@@
int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file)
* by SSL_CTX_use_certificate). */
}
/* When the while loop ends, it's usually just EOF. */
* by SSL_CTX_use_certificate). */
}
/* When the while loop ends, it's usually just EOF. */
- err = ERR_peek_error();
+ err = ERR_peek_
last_
error();
if (ERR_GET_LIB(err) == ERR_LIB_PEM && ERR_GET_REASON(err) == PEM_R_NO_START_LINE)
if (ERR_GET_LIB(err) == ERR_LIB_PEM && ERR_GET_REASON(err) == PEM_R_NO_START_LINE)
- (void)
ERR_get_error();
+ (void)ERR_get_error();
else
ret = 0; /* some real error */
}
else
ret = 0; /* some real error */
}