OpenSSL 1.1.1-pre2
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include "internal/cryptlib.h"
|
||||
#include <openssl/lhash.h>
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/buffer.h>
|
||||
#include "internal/asn1_int.h"
|
||||
@@ -22,12 +21,12 @@ ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o)
|
||||
return NULL;
|
||||
/* If object isn't dynamic it's an internal OID which is never freed */
|
||||
if (!(o->flags & ASN1_OBJECT_FLAG_DYNAMIC))
|
||||
return ((ASN1_OBJECT *)o);
|
||||
return (ASN1_OBJECT *)o;
|
||||
|
||||
r = ASN1_OBJECT_new();
|
||||
if (r == NULL) {
|
||||
OBJerr(OBJ_F_OBJ_DUP, ERR_R_ASN1_LIB);
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Set dynamic flags so everything gets freed up on error */
|
||||
@@ -61,6 +60,6 @@ int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b)
|
||||
|
||||
ret = (a->length - b->length);
|
||||
if (ret)
|
||||
return (ret);
|
||||
return (memcmp(a->data, b->data, a->length));
|
||||
return ret;
|
||||
return memcmp(a->data, b->data, a->length);
|
||||
}
|
||||
Reference in New Issue
Block a user