aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/objects/obj_xref.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/crypto/objects/obj_xref.c')
-rw-r--r--openssl/crypto/objects/obj_xref.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/openssl/crypto/objects/obj_xref.c b/openssl/crypto/objects/obj_xref.c
index 152eca5c6..9f744bced 100644
--- a/openssl/crypto/objects/obj_xref.c
+++ b/openssl/crypto/objects/obj_xref.c
@@ -110,8 +110,10 @@ int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid)
#endif
if (rv == NULL)
return 0;
- *pdig_nid = rv->hash_id;
- *ppkey_nid = rv->pkey_id;
+ if (pdig_nid)
+ *pdig_nid = rv->hash_id;
+ if (ppkey_nid)
+ *ppkey_nid = rv->pkey_id;
return 1;
}
@@ -144,7 +146,8 @@ int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid)
#endif
if (rv == NULL)
return 0;
- *psignid = (*rv)->sign_id;
+ if (psignid)
+ *psignid = (*rv)->sign_id;
return 1;
}