提交 224551f7 编写于 作者: B Bodo Möller

Some tiny clean-ups related to the cert_st / sess_cert_st change.

上级 b56bce4f
...@@ -139,14 +139,6 @@ CERT *ssl_cert_new(void) ...@@ -139,14 +139,6 @@ CERT *ssl_cert_new(void)
return(NULL); return(NULL);
} }
memset(ret,0,sizeof(CERT)); memset(ret,0,sizeof(CERT));
/*
ret->valid=0;
ret->mask=0;
ret->export_mask=0;
ret->cert_type=0;
ret->key->x509=NULL;
ret->key->publickey=NULL;
ret->key->privatekey=NULL; */
ret->key= &(ret->pkeys[SSL_PKEY_RSA_ENC]); ret->key= &(ret->pkeys[SSL_PKEY_RSA_ENC]);
ret->references=1; ret->references=1;
...@@ -168,8 +160,6 @@ CERT *ssl_cert_dup(CERT *cert) ...@@ -168,8 +160,6 @@ CERT *ssl_cert_dup(CERT *cert)
memset(ret, 0, sizeof(CERT)); memset(ret, 0, sizeof(CERT));
ret->cert_type = cert->cert_type;
ret->key = &ret->pkeys[cert->key - &cert->pkeys[0]]; ret->key = &ret->pkeys[cert->key - &cert->pkeys[0]];
/* or ret->key = ret->pkeys + (cert->key - cert->pkeys), /* or ret->key = ret->pkeys + (cert->key - cert->pkeys),
* if you find that more readable */ * if you find that more readable */
...@@ -246,11 +236,6 @@ CERT *ssl_cert_dup(CERT *cert) ...@@ -246,11 +236,6 @@ CERT *ssl_cert_dup(CERT *cert)
} }
} }
/* ret->cert_chain should not exist: that's pure per-connection data.
* Anyway, we never use this function when it is non-NULL,
* so we just don't look at it. */
/* ret->extra_certs *should* exist, but currently the own certificate /* ret->extra_certs *should* exist, but currently the own certificate
* chain is held inside SSL_CTX */ * chain is held inside SSL_CTX */
......
...@@ -252,8 +252,6 @@ typedef struct cert_pkey_st ...@@ -252,8 +252,6 @@ typedef struct cert_pkey_st
typedef struct cert_st typedef struct cert_st
{ {
int cert_type;
/* Current active set */ /* Current active set */
CERT_PKEY *key; /* ALWAYS points to an element of the pkeys array CERT_PKEY *key; /* ALWAYS points to an element of the pkeys array
* Probably it would make more sense to store * Probably it would make more sense to store
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册