View | Details | Raw Unified | Return to bug 229029 | Differences between
and this patch

Collapse All | Expand All

(-)b/ssl.c (-1 / +14 lines)
Lines 3-8 Link Here
3
   Secure sockets abstraction layer
3
   Secure sockets abstraction layer
4
   Copyright (C) Matthew Chapman <matthewc.unsw.edu.au> 1999-2008
4
   Copyright (C) Matthew Chapman <matthewc.unsw.edu.au> 1999-2008
5
   Copyright (C) Jay Sorg <j@american-data.com> 2006-2008
5
   Copyright (C) Jay Sorg <j@american-data.com> 2006-2008
6
   Copyright (C) Henrik Andersson <hean01@cendio.com> 2016
6
7
7
   This program is free software: you can redistribute it and/or modify
8
   This program is free software: you can redistribute it and/or modify
8
   it under the terms of the GNU General Public License as published by
9
   it under the terms of the GNU General Public License as published by
Lines 140-145 rdssl_cert_to_rkey(RDSSL_CERT * cert, uint32 * key_len) Link Here
140
	EVP_PKEY *epk = NULL;
141
	EVP_PKEY *epk = NULL;
141
	RDSSL_RKEY *lkey;
142
	RDSSL_RKEY *lkey;
142
	int nid;
143
	int nid;
144
	int ret;
143
145
144
	/* By some reason, Microsoft sets the OID of the Public RSA key to
146
	/* By some reason, Microsoft sets the OID of the Public RSA key to
145
	   the oid for "MD5 with RSA Encryption" instead of "RSA Encryption"
147
	   the oid for "MD5 with RSA Encryption" instead of "RSA Encryption"
Lines 151-157 rdssl_cert_to_rkey(RDSSL_CERT * cert, uint32 * key_len) Link Here
151
	X509_ALGOR *algor = NULL;
153
	X509_ALGOR *algor = NULL;
152
154
153
	key = X509_get_X509_PUBKEY(cert);
155
	key = X509_get_X509_PUBKEY(cert);
154
	algor = X509_PUBKEY_get0_param(NULL, NULL, 0, &algor, key);
156
	if (key == NULL)
157
	{
158
		error("Failed to get public key from certificate.\n");
159
		return NULL;
160
	}
161
162
	ret = X509_PUBKEY_get0_param(NULL, NULL, 0, &algor, key);
163
	if (ret != 1)
164
	{
165
		error("Faild to get algorithm used for public key.\n");
166
		return NULL;
167
	}
155
168
156
	nid = OBJ_obj2nid(algor->algorithm);
169
	nid = OBJ_obj2nid(algor->algorithm);
157
170

Return to bug 229029