diff options
-rw-r--r-- | src/lib/libcrypto/ocsp/ocsp_ext.c | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/src/lib/libcrypto/ocsp/ocsp_ext.c b/src/lib/libcrypto/ocsp/ocsp_ext.c index edcf5bcca8..1f2563ca8a 100644 --- a/src/lib/libcrypto/ocsp/ocsp_ext.c +++ b/src/lib/libcrypto/ocsp/ocsp_ext.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ocsp_ext.c,v 1.14 2015/07/19 18:29:31 miod Exp $ */ | 1 | /* $OpenBSD: ocsp_ext.c,v 1.15 2016/12/27 16:01:19 jsing Exp $ */ |
2 | /* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL | 2 | /* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL |
3 | * project. */ | 3 | * project. */ |
4 | 4 | ||
@@ -314,50 +314,6 @@ OCSP_SINGLERESP_add_ext(OCSP_SINGLERESP *x, X509_EXTENSION *ex, int loc) | |||
314 | return X509v3_add_ext(&(x->singleExtensions), ex, loc) != NULL; | 314 | return X509v3_add_ext(&(x->singleExtensions), ex, loc) != NULL; |
315 | } | 315 | } |
316 | 316 | ||
317 | /* also CRL Entry Extensions */ | ||
318 | #if 0 | ||
319 | ASN1_STRING * | ||
320 | ASN1_STRING_encode(ASN1_STRING *s, i2d_of_void *i2d, void *data, | ||
321 | STACK_OF(ASN1_OBJECT) *sk) | ||
322 | { | ||
323 | int i; | ||
324 | unsigned char *p, *b = NULL; | ||
325 | |||
326 | if (data) { | ||
327 | if ((i = i2d(data, NULL)) <= 0) | ||
328 | goto err; | ||
329 | if (!(b = p = malloc(i))) | ||
330 | goto err; | ||
331 | if (i2d(data, &p) <= 0) | ||
332 | goto err; | ||
333 | } else if (sk) { | ||
334 | if ((i = i2d_ASN1_SET_OF_ASN1_OBJECT(sk, NULL, | ||
335 | (I2D_OF(ASN1_OBJECT))i2d, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL, | ||
336 | IS_SEQUENCE)) <= 0) | ||
337 | goto err; | ||
338 | if (!(b = p = malloc(i))) | ||
339 | goto err; | ||
340 | if (i2d_ASN1_SET_OF_ASN1_OBJECT(sk, &p, | ||
341 | (I2D_OF(ASN1_OBJECT))i2d, V_ASN1_SEQUENCE, | ||
342 | V_ASN1_UNIVERSAL, IS_SEQUENCE) <= 0) | ||
343 | goto err; | ||
344 | } else { | ||
345 | OCSPerr(OCSP_F_ASN1_STRING_ENCODE, OCSP_R_BAD_DATA); | ||
346 | goto err; | ||
347 | } | ||
348 | if (!s && !(s = ASN1_STRING_new())) | ||
349 | goto err; | ||
350 | if (!(ASN1_STRING_set(s, b, i))) | ||
351 | goto err; | ||
352 | free(b); | ||
353 | return s; | ||
354 | |||
355 | err: | ||
356 | free(b); | ||
357 | return NULL; | ||
358 | } | ||
359 | #endif | ||
360 | |||
361 | /* Nonce handling functions */ | 317 | /* Nonce handling functions */ |
362 | 318 | ||
363 | /* Add a nonce to an extension stack. A nonce can be specificed or if NULL | 319 | /* Add a nonce to an extension stack. A nonce can be specificed or if NULL |