Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 308720 Details for
Bug 449382
openswan segv using RSA PKIX (x.509) mode
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch that caused leftid= behavious change with leftcert=
f789468cee4e8d68645eae87d0a016edba575e45.patch (text/plain), 4.16 KB, created by
Paul Wouters
on 2008-06-09 16:42:36 UTC
(
hide
)
Description:
patch that caused leftid= behavious change with leftcert=
Filename:
MIME Type:
Creator:
Paul Wouters
Created:
2008-06-09 16:42:36 UTC
Size:
4.16 KB
patch
obsolete
>commit f789468cee4e8d68645eae87d0a016edba575e45 >Author: Michael Richardson <mcr@xelerance.com> >Date: Tue Dec 18 19:53:35 2007 -0500 > > permit leftid= to be used even when using leftcert. Do not override > the ID type unless the ID type is none, or %fromcert. > > Signed-off-by: Michael Richardson <mcr@xelerance.com> > >diff --git a/programs/pluto/connections.c b/programs/pluto/connections.c >index d901e0a..8319099 100644 >--- a/programs/pluto/connections.c >+++ b/programs/pluto/connections.c >@@ -796,15 +796,15 @@ load_end_certificate(const char *filename, struct end *dst) > { > DBG(DBG_CONTROL, > DBG_log("certificate is valid") >- ) >- if (cached_cert) >- dst->cert = cert; >- else >- { >- add_x509_public_key(cert.u.x509, valid_until, DAL_LOCAL); >- dst->cert.type = cert.type; >- dst->cert.u.x509 = add_x509cert(cert.u.x509); >- } >+ ); >+ if (cached_cert) >+ dst->cert = cert; >+ else >+ { >+ add_x509_public_key(&dst->id, cert.u.x509, valid_until, DAL_LOCAL); >+ dst->cert.type = cert.type; >+ dst->cert.u.x509 = add_x509cert(cert.u.x509); >+ } > /* if no CA is defined, use issuer as default */ > if (dst->ca.ptr == NULL) > dst->ca = dst->cert.u.x509->issuer; >diff --git a/programs/pluto/keys.c b/programs/pluto/keys.c >index 34ceea6..a7768e2 100644 >--- a/programs/pluto/keys.c >+++ b/programs/pluto/keys.c >@@ -783,10 +783,10 @@ transfer_to_public_keys(struct gw_info *gateways_from_dns > > err_t > add_public_key(const struct id *id >-, enum dns_auth_level dns_auth_level >-, enum pubkey_alg alg >-, const chunk_t *key >-, struct pubkey_list **head) >+ , enum dns_auth_level dns_auth_level >+ , enum pubkey_alg alg >+ , const chunk_t *key >+ , struct pubkey_list **head) > { > struct pubkey *pk = alloc_thing(struct pubkey, "pubkey"); > >diff --git a/programs/pluto/keys.h b/programs/pluto/keys.h >index 5dd1ed8..b9d45b1 100644 >--- a/programs/pluto/keys.h >+++ b/programs/pluto/keys.h >@@ -35,8 +35,9 @@ extern const struct RSA_private_key *get_x509_private_key(/*const*/ x509cert_t * > > extern bool has_private_key(cert_t cert); > extern bool has_private_rawkey(struct pubkey *pk); >-extern void add_x509_public_key(x509cert_t *cert, time_t until >- , enum dns_auth_level dns_auth_level); >+extern void add_x509_public_key(struct id *keyid >+ , x509cert_t *cert, time_t until >+ , enum dns_auth_level dns_auth_level); > extern void add_pgp_public_key(pgpcert_t *cert, time_t until > , enum dns_auth_level dns_auth_level); > extern void remove_x509_public_key(/*const*/ x509cert_t *cert); >diff --git a/programs/pluto/x509.c b/programs/pluto/x509.c >index 27e40c1..5801059 100644 >--- a/programs/pluto/x509.c >+++ b/programs/pluto/x509.c >@@ -290,8 +290,8 @@ store_x509certs(x509cert_t **firstcert, bool strict) > { > DBG(DBG_X509 | DBG_PARSING, > DBG_log("public key validated") >- ) >- add_x509_public_key(cert, valid_until, DAL_SIGNED); >+ ); >+ add_x509_public_key(NULL, cert, valid_until, DAL_SIGNED); > } > else > { >diff --git a/programs/pluto/x509keys.c b/programs/pluto/x509keys.c >index 3a406bc..2388efe 100644 >--- a/programs/pluto/x509keys.c >+++ b/programs/pluto/x509keys.c >@@ -59,8 +59,10 @@ > * insert it into a pubkeyrec > */ > void >-add_x509_public_key(x509cert_t *cert , time_t until >- , enum dns_auth_level dns_auth_level) >+add_x509_public_key(struct id *keyid >+ , x509cert_t *cert >+ , time_t until >+ , enum dns_auth_level dns_auth_level) > { > generalName_t *gn; > struct pubkey *pk; >@@ -99,6 +101,19 @@ add_x509_public_key(x509cert_t *cert , time_t until > } > gn = gn->next; > } >+ >+ if(keyid != NULL && >+ keyid->kind != ID_DER_ASN1_DN && >+ keyid->kind != ID_DER_ASN1_GN) { >+ pk = allocate_RSA_public_key(c); >+ pk->id = *keyid; >+ >+ pk->dns_auth_level = dns_auth_level; >+ pk->until_time = until; >+ pk->issuer = cert->issuer; >+ delete_public_keys(&pluto_pubkeys, &pk->id, pk->alg); >+ install_public_key(pk, &pluto_pubkeys); >+ } > } > > >@@ -159,7 +174,7 @@ decode_cert(struct msg_digest *md) > DBG(DBG_X509 | DBG_PARSING, > DBG_log("Public key validated") > ) >- add_x509_public_key(&cert2, valid_until, DAL_SIGNED); >+ add_x509_public_key(NULL, &cert2, valid_until, DAL_SIGNED); > } > else > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 449382
:
308365
|
308711
|
308714
|
308715
|
308716
|
308717
| 308720 |
308729
|
308732